Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753494AbdIDK1f convert rfc822-to-8bit (ORCPT ); Mon, 4 Sep 2017 06:27:35 -0400 Received: from mga02.intel.com ([134.134.136.20]:18101 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753344AbdIDK1d (ORCPT ); Mon, 4 Sep 2017 06:27:33 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,474,1498546800"; d="scan'208";a="1168928513" From: "Mohandass, Divagar" To: Sakari Ailus CC: "robh+dt@kernel.org" , "mark.rutland@arm.com" , "wsa@the-dreams.de" , "devicetree@vger.kernel.org" , "linux-i2c@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "Mani, Rajmohan" Subject: RE: [PATCH v5 3/3] eeprom: at24: enable runtime pm support Thread-Topic: [PATCH v5 3/3] eeprom: at24: enable runtime pm support Thread-Index: AQHTJUjBoLAPnfkbqUaC9a3wn1dBGKKj+u+AgACDgRA= Date: Mon, 4 Sep 2017 10:27:26 +0000 Message-ID: <7B8CE47BD58441468D2BB13285B50E6031DE80FF@BGSMSX107.gar.corp.intel.com> References: <1504507245-12902-1-git-send-email-divagar.mohandass@intel.com> <1504507245-12902-4-git-send-email-divagar.mohandass@intel.com> <20170904073850.i77nk36k5extin56@valkosipuli.retiisi.org.uk> In-Reply-To: <20170904073850.i77nk36k5extin56@valkosipuli.retiisi.org.uk> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [10.223.10.10] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1846 Lines: 59 Hi Sakari, Thanks, I will fix this and send the patch v6. --- ^Divagar >-----Original Message----- >From: Sakari Ailus [mailto:sakari.ailus@iki.fi] >Sent: Monday, September 04, 2017 1:09 PM >To: Mohandass, Divagar >Cc: robh+dt@kernel.org; mark.rutland@arm.com; wsa@the-dreams.de; >devicetree@vger.kernel.org; linux-i2c@vger.kernel.org; linux- >kernel@vger.kernel.org; Mani, Rajmohan >Subject: Re: [PATCH v5 3/3] eeprom: at24: enable runtime pm support > >Hi Divagar, > >On Mon, Sep 04, 2017 at 12:10:45PM +0530, Divagar Mohandass wrote: >> Currently the device is kept in D0, there is an opportunity to save >> power by enabling runtime pm. >> >> Device can be daisy chained from PMIC and we can't rely on I2C core >> for auto resume/suspend. Driver will decide when to resume/suspend. >> >> Signed-off-by: Divagar Mohandass >> --- >> drivers/misc/eeprom/at24.c | 40 >> ++++++++++++++++++++++++++++++++++++++++ >> 1 file changed, 40 insertions(+) >> >> diff --git a/drivers/misc/eeprom/at24.c b/drivers/misc/eeprom/at24.c >> index 2199c42..03f5cb7 100644 >> --- a/drivers/misc/eeprom/at24.c >> +++ b/drivers/misc/eeprom/at24.c >> @@ -750,9 +782,12 @@ static int at24_probe(struct i2c_client *client, >const struct i2c_device_id *id) >> err = at24_read(at24, 0, &test_byte, 1); > >You do pm_runtime_put()s here and drop the ones below as it's needed >unconditionally. Then I think we're done. > >> if (err) { >> err = -ENODEV; >> + pm_runtime_put(&client->dev); >> goto err_clients; >> } >> >> + pm_runtime_put(&client->dev); >> + >> at24->nvmem_config.name = dev_name(&client->dev); >> at24->nvmem_config.dev = &client->dev; >> at24->nvmem_config.read_only = !writable; > >-- >Kind regards, > >Sakari Ailus >e-mail: sakari.ailus@iki.fi