Message ID | 20180726225508.74612-1-dbasehore@chromium.org |
---|---|
State | Superseded |
Headers | show |
Series | i2c: enable async suspend/resume on i2c devices | expand |
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.
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
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 <<a href="mailto:hdegoede@redhat.com">hdegoede@redhat.com</a>> 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> > On Fri, Jul 27, 2018 at 1:55 AM, Derek Basehore <<a href="mailto:dbasehore@chromium.org" target="_blank">dbasehore@chromium.org</a>> wrote:<br> >> This enables the async suspend property for i2c devices. This reduces<br> >> the suspend/resume time considerably on platforms with multiple i2c<br> >> devices (such as a trackpad or touchscreen).<br> > <br> > 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"> > <br> > Especially on Chromebooks based on Intel Cherrytrail / Braswell<br> > platforms, they have a painful PMIC vs. OS design solution.<br> > <br> > +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>
+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 --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) {
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(+)