From patchwork Thu Sep 24 06:26:23 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Fu, Zhonghui" X-Patchwork-Id: 522110 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id C6ECE1401CD for ; Thu, 24 Sep 2015 16:26:29 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753212AbbIXG02 (ORCPT ); Thu, 24 Sep 2015 02:26:28 -0400 Received: from mga09.intel.com ([134.134.136.24]:18163 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752680AbbIXG01 (ORCPT ); Thu, 24 Sep 2015 02:26:27 -0400 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP; 23 Sep 2015 23:26:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,579,1437462000"; d="scan'208";a="775877972" Received: from liri-mobl3.ccr.corp.intel.com (HELO [10.254.213.156]) ([10.254.213.156]) by orsmga001.jf.intel.com with ESMTP; 23 Sep 2015 23:26:24 -0700 Message-ID: <5603978F.8020403@linux.intel.com> Date: Thu, 24 Sep 2015 14:26:23 +0800 From: "Fu, Zhonghui" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: wsa@the-dreams.de CC: linux-i2c@vger.kernel.org, "linux-kernel@vger.kernel.org" Subject: [PATCH v2] i2c: enable i2c device to suspend/resume asynchronously Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org Now, PM core supports asynchronous suspend/resume mode for devices during system suspend/resume, and the power state transition of one device may be completed in separate kernel thread. PM core ensures all power state transition timing dependency between devices. This patch enables i2c device to suspend/resume asynchronously. This will take advantage of multicore and improve system suspend/resume speed. Signed-off-by: Zhonghui Fu --- Changes in v2: - Amend commit message. drivers/i2c/i2c-core.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" 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/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index 5f89f1e..74e322b 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c @@ -1036,6 +1036,7 @@ i2c_new_device(struct i2c_adapter *adap, struct i2c_board_info const *info) client->dev.of_node = info->of_node; client->dev.fwnode = info->fwnode; + device_enable_async_suspend(&client->dev); i2c_dev_set_name(adap, client); status = device_register(&client->dev); if (status)