Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1403406 > unrolled thread

[PATCH] i2c_hid: enable i2c-hid devices to suspend/resume asynchronously

Started by"Fu, Zhonghui" <zhonghui.fu@linux.intel.com>
First post2016-05-19 04:50 +0200
Last post2016-05-24 12:30 +0200
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] i2c_hid: enable i2c-hid devices to suspend/resume  asynchronously "Fu, Zhonghui" <zhonghui.fu@linux.intel.com> - 2016-05-19 04:50 +0200
    Re: [PATCH] i2c_hid: enable i2c-hid devices to suspend/resume  asynchronously Mika Westerberg <mika.westerberg@linux.intel.com> - 2016-05-23 10:30 +0200
    Re: [PATCH] i2c_hid: enable i2c-hid devices to suspend/resume  asynchronously Jiri Kosina <jikos@kernel.org> - 2016-05-24 12:30 +0200

#1403406 — [PATCH] i2c_hid: enable i2c-hid devices to suspend/resume asynchronously

From"Fu, Zhonghui" <zhonghui.fu@linux.intel.com>
Date2016-05-19 04:50 +0200
Subject[PATCH] i2c_hid: enable i2c-hid devices to suspend/resume asynchronously
Message-ID<rAmc9-2ff-5@gated-at.bofh.it>
i2c-hid devices' suspend/resume are usually time-consuming process.
For example, the touch controller(i2c-ATML1000:00) on ASUS T100 tablet
takes about 160ms for suspending and 120ms for resuming. This patch
enables i2c-hid devices to suspend/resume asynchronously. This will
take advantage of multicore and speed up system suspend/resume process.

Signed-off-by: Zhonghui Fu <zhonghui.fu@linux.intel.com>
---
 drivers/hid/i2c-hid/i2c-hid.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/hid/i2c-hid/i2c-hid.c b/drivers/hid/i2c-hid/i2c-hid.c
index 2e021ba..cc41e1e 100644
--- a/drivers/hid/i2c-hid/i2c-hid.c
+++ b/drivers/hid/i2c-hid/i2c-hid.c
@@ -1020,6 +1020,7 @@ static int i2c_hid_probe(struct i2c_client *client,
 	pm_runtime_get_noresume(&client->dev);
 	pm_runtime_set_active(&client->dev);
 	pm_runtime_enable(&client->dev);
+	device_enable_async_suspend(&client->dev);
 
 	ret = i2c_hid_fetch_hid_descriptor(ihid);
 	if (ret < 0)
-- 1.7.1

[toc] | [next] | [standalone]


#1405161

FromMika Westerberg <mika.westerberg@linux.intel.com>
Date2016-05-23 10:30 +0200
Message-ID<rBTpo-3tr-9@gated-at.bofh.it>
In reply to#1403406
On Thu, May 19, 2016 at 10:46:24AM +0800, Fu, Zhonghui wrote:
> i2c-hid devices' suspend/resume are usually time-consuming process.
> For example, the touch controller(i2c-ATML1000:00) on ASUS T100 tablet
> takes about 160ms for suspending and 120ms for resuming. This patch
> enables i2c-hid devices to suspend/resume asynchronously. This will
> take advantage of multicore and speed up system suspend/resume process.
> 
> Signed-off-by: Zhonghui Fu <zhonghui.fu@linux.intel.com>

Looks reasonable to me,

Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>

[toc] | [prev] | [next] | [standalone]


#1406041

FromJiri Kosina <jikos@kernel.org>
Date2016-05-24 12:30 +0200
Message-ID<rChL4-21U-27@gated-at.bofh.it>
In reply to#1403406
On Thu, 19 May 2016, Fu, Zhonghui wrote:

> i2c-hid devices' suspend/resume are usually time-consuming process.
> For example, the touch controller(i2c-ATML1000:00) on ASUS T100 tablet
> takes about 160ms for suspending and 120ms for resuming. This patch
> enables i2c-hid devices to suspend/resume asynchronously. This will
> take advantage of multicore and speed up system suspend/resume process.

Umm, why do we need this in the first place, given the fact that we are 
enabling async suspend for each and every HID device allocated via 
hid_allocate_device() already?

-- 
Jiri Kosina
SUSE Labs

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web