From patchwork Thu May 19 02:46:24 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Fu, Zhonghui" X-Patchwork-Id: 9123551 X-Patchwork-Delegate: jikos@jikos.cz Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id EE6BD9F1D3 for ; Thu, 19 May 2016 02:46:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 217D92024D for ; Thu, 19 May 2016 02:46:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AE3A32022D for ; Thu, 19 May 2016 02:46:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751906AbcESCqa (ORCPT ); Wed, 18 May 2016 22:46:30 -0400 Received: from mga02.intel.com ([134.134.136.20]:17348 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751667AbcESCq3 (ORCPT ); Wed, 18 May 2016 22:46:29 -0400 Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga101.jf.intel.com with ESMTP; 18 May 2016 19:46:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,332,1459839600"; d="scan'208";a="810007289" Received: from honglili-mobl.ccr.corp.intel.com (HELO [10.254.215.181]) ([10.254.215.181]) by orsmga003.jf.intel.com with ESMTP; 18 May 2016 19:46:25 -0700 To: Jiri Kosina Cc: benjamin.tissoires@redhat.com, dtor@chromium.org, bleung@chromium.org, Mika Westerberg , aduggan@synaptics.com, k.kozlowski@samsung.com, dianders@chromium.org, gabriele.mzt@gmail.com, linux-input@vger.kernel.org, "linux-kernel@vger.kernel.org" From: "Fu, Zhonghui" Subject: [PATCH] i2c_hid: enable i2c-hid devices to suspend/resume asynchronously Message-ID: <573D2900.6090903@linux.intel.com> Date: Thu, 19 May 2016 10:46:24 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Reviewed-by: Mika Westerberg Acked-by: Benjamin Tissoires --- drivers/hid/i2c-hid/i2c-hid.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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)