diff mbox series

i2c: enable async suspend/resume on i2c devices

Message ID 20180726225508.74612-1-dbasehore@chromium.org
State Superseded
Headers show
Series i2c: enable async suspend/resume on i2c devices | expand

Commit Message

dbasehore . July 26, 2018, 10:55 p.m. UTC
This enables the async suspend property for i2c devices. This reduces
the suspend/resume time considerably on platforms with multiple i2c
devices (such as a trackpad or touchscreen).

Signed-off-by: Derek Basehore <dbasehore@chromium.org>
---
 drivers/i2c/i2c-core-base.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Andy Shevchenko July 27, 2018, 10:44 a.m. UTC | #1
On Fri, Jul 27, 2018 at 1:55 AM, Derek Basehore <dbasehore@chromium.org> wrote:
> This enables the async suspend property for i2c devices. This reduces
> the suspend/resume time considerably on platforms with multiple i2c
> devices (such as a trackpad or touchscreen).

How did you test this?

Especially on Chromebooks based on Intel Cherrytrail / Braswell
platforms, they have a painful PMIC vs. OS design solution.

+Cc: Hans, who did a lot in this area.
Hans de Goede July 27, 2018, 12:07 p.m. UTC | #2
Hi,

On 07/27/2018 12:44 PM, Andy Shevchenko wrote:
> On Fri, Jul 27, 2018 at 1:55 AM, Derek Basehore <dbasehore@chromium.org> wrote:
>> This enables the async suspend property for i2c devices. This reduces
>> the suspend/resume time considerably on platforms with multiple i2c
>> devices (such as a trackpad or touchscreen).
> 
> How did you test this?
> 
> Especially on Chromebooks based on Intel Cherrytrail / Braswell
> platforms, they have a painful PMIC vs. OS design solution.
> 
> +Cc: Hans, who did a lot in this area.

We disable suspend of the i2c controller for the i2c-bus
to which the PMIc is connected on these platforms, so I do not
expect this to cause any new issues.

But this is something to keep an eye on,

Regards,

Hans
dbasehore . July 27, 2018, 4:17 p.m. UTC | #3
On Fri, Jul 27, 2018 at 5:07 AM Hans de Goede <hdegoede@redhat.com> wrote:

> Hi,
>
> On 07/27/2018 12:44 PM, Andy Shevchenko wrote:
> > On Fri, Jul 27, 2018 at 1:55 AM, Derek Basehore <dbasehore@chromium.org>
> wrote:
> >> This enables the async suspend property for i2c devices. This reduces
> >> the suspend/resume time considerably on platforms with multiple i2c
> >> devices (such as a trackpad or touchscreen).
> >
> > How did you test this?
>

It was tested on Apollolake Chromebook devices.


> >
> > Especially on Chromebooks based on Intel Cherrytrail / Braswell
> > platforms, they have a painful PMIC vs. OS design solution.
> >
> > +Cc: Hans, who did a lot in this area.
>
> We disable suspend of the i2c controller for the i2c-bus
> to which the PMIc is connected on these platforms, so I do not
> expect this to cause any new issues.
>
> But this is something to keep an eye on,
>
> Regards,
>
> Hans
>
>
<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Fri, Jul 27, 2018 at 5:07 AM Hans de Goede &lt;<a href="mailto:hdegoede@redhat.com">hdegoede@redhat.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
On 07/27/2018 12:44 PM, Andy Shevchenko wrote:<br>
&gt; On Fri, Jul 27, 2018 at 1:55 AM, Derek Basehore &lt;<a href="mailto:dbasehore@chromium.org" target="_blank">dbasehore@chromium.org</a>&gt; wrote:<br>
&gt;&gt; This enables the async suspend property for i2c devices. This reduces<br>
&gt;&gt; the suspend/resume time considerably on platforms with multiple i2c<br>
&gt;&gt; devices (such as a trackpad or touchscreen).<br>
&gt; <br>
&gt; How did you test this?<br></blockquote><div><br></div><div>It was tested on Apollolake Chromebook devices.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
&gt; <br>
&gt; Especially on Chromebooks based on Intel Cherrytrail / Braswell<br>
&gt; platforms, they have a painful PMIC vs. OS design solution.<br>
&gt; <br>
&gt; +Cc: Hans, who did a lot in this area.<br>
<br>
We disable suspend of the i2c controller for the i2c-bus<br>
to which the PMIc is connected on these platforms, so I do not<br>
expect this to cause any new issues.<br>
<br>
But this is something to keep an eye on,<br>
<br>
Regards,<br>
<br>
Hans<br>
<br>
</blockquote></div></div>
Andy Shevchenko Aug. 14, 2018, 5:52 p.m. UTC | #4
+Cc: Jarkko

On Fri, Jul 27, 2018 at 1:55 AM, Derek Basehore <dbasehore@chromium.org> wrote:
> This enables the async suspend property for i2c devices. This reduces
> the suspend/resume time considerably on platforms with multiple i2c
> devices (such as a trackpad or touchscreen).
>
> Signed-off-by: Derek Basehore <dbasehore@chromium.org>
> ---
>  drivers/i2c/i2c-core-base.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c
> index 1ba40bb2b966..3382bb7e1dcc 100644
> --- a/drivers/i2c/i2c-core-base.c
> +++ b/drivers/i2c/i2c-core-base.c
> @@ -749,6 +749,7 @@ i2c_new_device(struct i2c_adapter *adap, struct i2c_board_info const *info)
>         client->dev.of_node = info->of_node;
>         client->dev.fwnode = info->fwnode;
>
> +       device_enable_async_suspend(&client->dev);
>         i2c_dev_set_name(adap, client, info);
>
>         if (info->properties) {
> --
> 2.18.0.345.g5c9ce644c3-goog
>
diff mbox series

Patch

diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c
index 1ba40bb2b966..3382bb7e1dcc 100644
--- a/drivers/i2c/i2c-core-base.c
+++ b/drivers/i2c/i2c-core-base.c
@@ -749,6 +749,7 @@  i2c_new_device(struct i2c_adapter *adap, struct i2c_board_info const *info)
 	client->dev.of_node = info->of_node;
 	client->dev.fwnode = info->fwnode;
 
+	device_enable_async_suspend(&client->dev);
 	i2c_dev_set_name(adap, client, info);
 
 	if (info->properties) {