* Re: [PATCH] i2c_hid: enable i2c-hid devices to suspend/resume asynchronously
2016-05-19 2:46 [PATCH] i2c_hid: enable i2c-hid devices to suspend/resume asynchronously Fu, Zhonghui
@ 2016-05-23 8:22 ` Mika Westerberg
2016-05-24 10:24 ` Jiri Kosina
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Mika Westerberg @ 2016-05-23 8:22 UTC (permalink / raw)
To: Fu, Zhonghui
Cc: Jiri Kosina, benjamin.tissoires, dtor, bleung, aduggan,
k.kozlowski, dianders, gabriele.mzt, linux-input,
linux-kernel@vger.kernel.org
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>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] i2c_hid: enable i2c-hid devices to suspend/resume asynchronously
2016-05-19 2:46 [PATCH] i2c_hid: enable i2c-hid devices to suspend/resume asynchronously Fu, Zhonghui
2016-05-23 8:22 ` Mika Westerberg
@ 2016-05-24 10:24 ` Jiri Kosina
[not found] ` <CAE_wzQ-Rwpf3Cb8cpw11s=rcRTMZ5kpod7jLAhF84A82CLaVcA@mail.gmail.com>
2016-06-03 7:56 ` Benjamin Tissoires
2016-06-06 8:41 ` Jiri Kosina
3 siblings, 1 reply; 6+ messages in thread
From: Jiri Kosina @ 2016-05-24 10:24 UTC (permalink / raw)
To: Fu, Zhonghui
Cc: benjamin.tissoires, dtor, bleung, Mika Westerberg, aduggan,
k.kozlowski, dianders, gabriele.mzt, linux-input,
linux-kernel@vger.kernel.org
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] i2c_hid: enable i2c-hid devices to suspend/resume asynchronously
2016-05-19 2:46 [PATCH] i2c_hid: enable i2c-hid devices to suspend/resume asynchronously Fu, Zhonghui
2016-05-23 8:22 ` Mika Westerberg
2016-05-24 10:24 ` Jiri Kosina
@ 2016-06-03 7:56 ` Benjamin Tissoires
2016-06-06 8:41 ` Jiri Kosina
3 siblings, 0 replies; 6+ messages in thread
From: Benjamin Tissoires @ 2016-06-03 7:56 UTC (permalink / raw)
To: Fu, Zhonghui
Cc: Jiri Kosina, dtor, bleung, Mika Westerberg, aduggan, k.kozlowski,
dianders, gabriele.mzt, linux-input, linux-kernel@vger.kernel.org
On May 19 2016 or thereabouts, 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>
> ---
In regard with the discussion:
Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.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
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] i2c_hid: enable i2c-hid devices to suspend/resume asynchronously
2016-05-19 2:46 [PATCH] i2c_hid: enable i2c-hid devices to suspend/resume asynchronously Fu, Zhonghui
` (2 preceding siblings ...)
2016-06-03 7:56 ` Benjamin Tissoires
@ 2016-06-06 8:41 ` Jiri Kosina
3 siblings, 0 replies; 6+ messages in thread
From: Jiri Kosina @ 2016-06-06 8:41 UTC (permalink / raw)
To: Fu, Zhonghui
Cc: benjamin.tissoires, dtor, bleung, Mika Westerberg, aduggan,
k.kozlowski, dianders, gabriele.mzt, linux-input,
linux-kernel@vger.kernel.org
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.
>
> 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)
Applied to hid.git#for-4.8/i2c-hid.
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 6+ messages in thread