From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753961AbbHUP7Z (ORCPT ); Fri, 21 Aug 2015 11:59:25 -0400 Received: from mga14.intel.com ([192.55.52.115]:50879 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751852AbbHUP7Y (ORCPT ); Fri, 21 Aug 2015 11:59:24 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,722,1432623600"; d="scan'208";a="752962015" From: "Pandruvada, Srinivas" To: "wsa@the-dreams.de" , "mpa@pengutronix.de" CC: "linux-kernel@vger.kernel.org" , "pmeerw@pmeerw.net" , "linux-iio@vger.kernel.org" , "jic23@kernel.org" , "Tirdea, Irina" , "linux-i2c@vger.kernel.org" Subject: Re: [PATCH v5 6/8] iio: gyro: bmg160: optimize i2c transfers in trigger handler Thread-Topic: [PATCH v5 6/8] iio: gyro: bmg160: optimize i2c transfers in trigger handler Thread-Index: AQHQ1Qu9QMDyVsCnck2r9Ts73ZOqlZ4O1gqAgAGOH4CABl1cgIAAXiOA Date: Fri, 21 Aug 2015 15:59:05 +0000 Message-ID: <1440172701.4081.1.camel@intel.com> References: <1439389900-10108-1-git-send-email-irina.tirdea@intel.com> <1439389900-10108-7-git-send-email-irina.tirdea@intel.com> <55D056DF.5020201@kernel.org> <20150817090943.GO19600@pengutronix.de> <20150821102125.GA1656@katana> In-Reply-To: <20150821102125.GA1656@katana> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.254.115.231] Content-Type: text/plain; charset="utf-8" Content-ID: <310BDCFF0E3AEE4A9E99F9940D1ABDE7@intel.com> 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 t7LFxUBn001781 On Fri, 2015-08-21 at 12:21 +0200, Wolfram Sang wrote: > On Mon, Aug 17, 2015 at 11:09:43AM +0200, Markus Pargmann wrote: > > On Sun, Aug 16, 2015 at 10:24:47AM +0100, Jonathan Cameron wrote: > > > On 12/08/15 15:31, Irina Tirdea wrote: > > > > Some i2c busses (e.g.: Synopsys DesignWare I2C adapter) need to > > > > enable/disable the bus at each i2c transfer and must wait for > > > > the enable/disable to happen before sending the data. > > > > > > > > When reading data in the trigger handler, the bmg160 driver > > > > does > > > > one i2c transfer for each axis. This has an impact on the > > > > frequency > > > > of the gyroscope at high sample rates due to additional delays > > > > introduced by the i2c bus at each transfer. > > > > > > > > Reading all axis values in one i2c transfer reduces the delays > > > > introduced by the i2c bus. Uses > > > > i2c_smbus_read_i2c_block_data_or_emulated > > > > that will fallback to reading each axis as a separate word in > > > > case i2c > > > > block read is not supported. > > > > > > > > Signed-off-by: Irina Tirdea > > > > Acked-by: Jonathan Cameron > > > > Acked-by: Srinivas Pandruvada < > > > > srinivas.pandruvada@linux.intel.com> > > > Note, that in the meantime the bmg160 driver just went all regmap > > > on us (as part of adding SPI support - though that step hasn't > > > happened yet). Hence we'll need a means of telling regmap about > > > this > > > possibility. > > > > Perhaps this is covered by a regmap_bulk_read()? > > > > The series[1] I am working on implements a i2c smbus block data > > regmap > > bus driver. Regmap should then automatically do a block read in > > regmap_bulk_read. > > Hmm, so doesn't your series make Irina's series obsolete? It > addresses > the same problem only at a different layer (i2c core vs. regmap), or? > It > would mean that i2c client drivers which want to support byte, word, > or > block transfers should be converted to regmap. I assume most of the > potential candidates are register based devices anyhow. Then, regmap > would be the proper abstraction layer. Have I overlooked something? > This is the only driver converted to use regmap, because of SPI mode support. The other drivers will still use Irina's changes. Thanks Srinivas > Thanks, > > Wolfram > {.n++%ݶw{.n+{G{ayʇڙ,jfhz_(階ݢj"mG?&~iOzv^m ?I