All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC][PATCH] Enable async suspend/resume of i2c devices
@ 2011-04-05  3:47 Sonny Rao
       [not found] ` <BANLkTik7i0VQpJb+enUd9c4-XvZQ1S57fQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  2011-04-06  5:23 ` Mark Brown
  0 siblings, 2 replies; 35+ messages in thread
From: Sonny Rao @ 2011-04-05  3:47 UTC (permalink / raw)
  To: linux-i2c-u79uwXL29TY76Z2rM5mHXA
  Cc: linux-pm-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	Jean Delvare (PC drivers, core), Ben Dooks (embedded platforms)

This improves our resume time when we have devices on an i2c bus
that are slow to resume.  In particular we have a light sensor that
adds about 50ms of resume time on one device. We have to enable it
both on the i2c master and i2c client side and then we get fully async
suspend/resume.  I suspect we'll see nice gains on systems with more
i2c devices and will test that out soon.

Signed-off-by: Sonny Rao <sonnyrao-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
---
 drivers/i2c/i2c-core.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
index e5f76a0..bbe7569 100644
--- a/drivers/i2c/i2c-core.c
+++ b/drivers/i2c/i2c-core.c
@@ -547,6 +547,7 @@ i2c_new_device(struct i2c_adapter *adap, struct
i2c_board_info const *info)

        dev_dbg(&adap->dev, "client [%s] registered with bus id %s\n",
                client->name, dev_name(&client->dev));
+       device_enable_async_suspend(&client->dev);

        return client;

@@ -857,6 +858,7 @@ static int i2c_register_adapter(struct i2c_adapter *adap)
                dev_warn(&adap->dev,
                         "Failed to create compatibility class link\n");
 #endif
+       device_enable_async_suspend(&adap->dev);

        /* create pre-declared device nodes */
        if (adap->nr < __i2c_first_dynamic_bus_num)
-- 
1.7.3.1

^ permalink raw reply related	[flat|nested] 35+ messages in thread
* [RFC][PATCH] Enable async suspend/resume of i2c devices
@ 2011-04-05  3:47 Sonny Rao
  0 siblings, 0 replies; 35+ messages in thread
From: Sonny Rao @ 2011-04-05  3:47 UTC (permalink / raw)
  To: linux-i2c
  Cc: Jean Delvare (PC drivers, core), linux-pm,
	Ben Dooks (embedded platforms)

This improves our resume time when we have devices on an i2c bus
that are slow to resume.  In particular we have a light sensor that
adds about 50ms of resume time on one device. We have to enable it
both on the i2c master and i2c client side and then we get fully async
suspend/resume.  I suspect we'll see nice gains on systems with more
i2c devices and will test that out soon.

Signed-off-by: Sonny Rao <sonnyrao@chromium.org>
---
 drivers/i2c/i2c-core.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
index e5f76a0..bbe7569 100644
--- a/drivers/i2c/i2c-core.c
+++ b/drivers/i2c/i2c-core.c
@@ -547,6 +547,7 @@ i2c_new_device(struct i2c_adapter *adap, struct
i2c_board_info const *info)

        dev_dbg(&adap->dev, "client [%s] registered with bus id %s\n",
                client->name, dev_name(&client->dev));
+       device_enable_async_suspend(&client->dev);

        return client;

@@ -857,6 +858,7 @@ static int i2c_register_adapter(struct i2c_adapter *adap)
                dev_warn(&adap->dev,
                         "Failed to create compatibility class link\n");
 #endif
+       device_enable_async_suspend(&adap->dev);

        /* create pre-declared device nodes */
        if (adap->nr < __i2c_first_dynamic_bus_num)
-- 
1.7.3.1

^ permalink raw reply related	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2011-04-07 14:34 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-05  3:47 [RFC][PATCH] Enable async suspend/resume of i2c devices Sonny Rao
     [not found] ` <BANLkTik7i0VQpJb+enUd9c4-XvZQ1S57fQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-04-06  5:23   ` Mark Brown
2011-04-06  6:51     ` Sonny Rao
     [not found]     ` <20110406052335.GA25578-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2011-04-06  6:51       ` Sonny Rao
2011-04-06  7:52     ` Jean Delvare
2011-04-06  8:16       ` Sonny Rao
2011-04-06 14:49       ` Alan Stern
2011-04-07  5:18       ` Rafael J. Wysocki
     [not found]       ` <20110406095240.410b4e7e-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
2011-04-06  8:16         ` Sonny Rao
     [not found]           ` <BANLkTimaRdRNOYM43AhjrU70o=GL0Q-D-A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-04-06  8:23             ` Jean Delvare
2011-04-06  8:23           ` Jean Delvare
2011-04-06 14:49         ` [linux-pm] " Alan Stern
     [not found]           ` <Pine.LNX.4.44L0.1104061043220.1907-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2011-04-06 22:31             ` Mark Brown
2011-04-06 23:08               ` Sonny Rao
     [not found]               ` <20110406223123.GA5297-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2011-04-06 23:08                 ` [linux-pm] " Sonny Rao
2011-04-07  5:22                   ` Rafael J. Wysocki
     [not found]                   ` <BANLkTikApnXBtP7c=QLEvM9ye=_YZiSSqw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-04-07  5:22                     ` [linux-pm] " Rafael J. Wysocki
2011-04-07  6:45                       ` Sonny Rao
     [not found]                       ` <201104070722.44771.rjw-KKrjLPT3xs0@public.gmane.org>
2011-04-07  6:45                         ` [linux-pm] " Sonny Rao
2011-04-07  7:55                 ` Jean Delvare
2011-04-07  8:00                   ` Mark Brown
2011-04-07  8:19                   ` Sonny Rao
     [not found]                   ` <20110407095513.4c0b708e-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
2011-04-07  8:00                     ` Mark Brown
     [not found]                       ` <20110407080042.GF14519-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2011-04-07  8:25                         ` Jean Delvare
     [not found]                           ` <20110407102544.4c34dfeb-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
2011-04-07 14:34                             ` Alan Stern
2011-04-07 14:34                           ` Alan Stern
2011-04-07  8:25                       ` Jean Delvare
2011-04-07  8:19                     ` Sonny Rao
     [not found]                       ` <BANLkTikDc6QhtK6F5VTX4iCkT0CAiXvztg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-04-07  8:33                         ` Jean Delvare
2011-04-07  8:33                       ` Jean Delvare
2011-04-07  7:55               ` Jean Delvare
2011-04-06 22:31           ` Mark Brown
2011-04-07  5:18         ` Rafael J. Wysocki
2011-04-06  5:23 ` Mark Brown
  -- strict thread matches above, loose matches on Subject: below --
2011-04-05  3:47 Sonny Rao

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.