From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753511AbcHQMtA (ORCPT ); Wed, 17 Aug 2016 08:49:00 -0400 Received: from mga14.intel.com ([192.55.52.115]:47442 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753019AbcHQMs6 (ORCPT ); Wed, 17 Aug 2016 08:48:58 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,529,1464678000"; d="scan'208";a="749912106" From: "De Marchi, Lucas" To: "jarkko.nikula@linux.intel.com" , "linux-i2c@vger.kernel.org" CC: "mika.westerberg@linux.intel.com" , "linux-kernel@vger.kernel.org" , "christian.ruppert@alitech.com" , "Souza, Jose" Subject: Re: [PATCH v3 2/3] i2c: designware: detect when dynamic tar update is possible Thread-Topic: [PATCH v3 2/3] i2c: designware: detect when dynamic tar update is possible Thread-Index: AQHR6Rv03fkJBlPFWUimlh7oKQTTwKBMMCMAgAACIACAAS0gAIAATx+A Date: Wed, 17 Aug 2016 12:48:56 +0000 Message-ID: <1471438125.2406.6.camel@intel.com> References: <1469743424-2480-1-git-send-email-lucas.demarchi@intel.com> <1469743424-2480-3-git-send-email-lucas.demarchi@intel.com> <1471356468.2907.4.camel@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.254.69.171] Content-Type: text/plain; charset="utf-8" Content-ID: MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id u7HCn8El016217 On Wed, 2016-08-17 at 11:05 +0300, Jarkko Nikula wrote: > On 08/16/2016 05:07 PM, De Marchi, Lucas wrote: > > > > On Tue, 2016-08-16 at 17:00 +0300, Jarkko Nikula wrote: > > > > > > > > > > > +  */ > > > > + reg = dw_readl(dev, DW_IC_CON); > > > > + dw_writel(dev, reg ^ DW_IC_CON_10BITADDR_MASTER, > > > > DW_IC_CON); > > > > + > > > > + if ((dw_readl(dev, DW_IC_CON) & > > > > DW_IC_CON_10BITADDR_MASTER) == > > > > +     (reg & DW_IC_CON_10BITADDR_MASTER)) { > > > > + dev->dynamic_tar_update_enabled = true; > > > > + dev_dbg(dev->dev, "Dynamic TAR update > > > > enabled"); > > > > + } > > > > > > Is this possible to move to i2c_dw_probe()? I guess the enabled > > > status > > > doesn't change runtime? > > > > It was actually useful at this place during development of this > > patch > > because we could check any unexpected change in behavior when > > resuming. > > We did catch a bug because of this and fixed. > > I'm not sure if now it makes more sense to move to probe method. > > I'd > > leave it where it is, but I'm open to move it there. > > > Can you do a quick re-test that case to see does it change runtime? > If  > it does then this needs a comment why there is need to do this check  > each time when HW is reinitialized. Otherwise there is chance > someone  > may move this code to probe time in the future. I already tested and it doesn't change. I'll move it to i2c_dw_probe() then. thanks Lucas De Marchi