From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757110AbcFACE0 (ORCPT ); Tue, 31 May 2016 22:04:26 -0400 Received: from mga04.intel.com ([192.55.52.120]:22101 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757055AbcFACEZ (ORCPT ); Tue, 31 May 2016 22:04:25 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,398,1459839600"; d="scan'208";a="113805770" Subject: Re: [PATCH] i2c_hid: enable i2c-hid devices to suspend/resume asynchronously To: Dmitry Torokhov , Jiri Kosina References: <573D2900.6090903@linux.intel.com> Cc: Benjamin Tissoires , Benson Leung , Mika Westerberg , Andrew Duggan , k.kozlowski@samsung.com, Doug Anderson , gabriele.mzt@gmail.com, "linux-input@vger.kernel.org" , "linux-kernel@vger.kernel.org" From: "Fu, Zhonghui" Message-ID: <574E42A0.9080902@linux.intel.com> Date: Wed, 1 Jun 2016 10:04:17 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/25/2016 1:31 AM, Dmitry Torokhov wrote: > On Tue, May 24, 2016 at 3:24 AM, Jiri Kosina wrote: > >> 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? >> > i2c-hid is not a HID but I2C device on I2C bus and is currently resumed > synchronously, in-line. Since it tries to reset device as part of resume it > may take a while for the device to respond. Sorry for late reply. Yes, the devices driven by i2c-hid driver are I2C devices, not HID devices. > > BTW, I am not quite sure what async suspend enabled > in hid_allocate_device() does for us, given that I do not see HID bus > implementing the suspend/resume support for its devices (as far as I > remember we rely on underlying transports - USB or I2C - to resume the > devices properly). Even if HID bus does not implement the suspend/resume support for its devices, the power domain, device type, device class or device driver subsystem related to HID devices can still implement the suspend/resume support for HID devices. Thanks, Zhonghui > > Thanks, > Dmitry >