Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754738AbcC1QF3 (ORCPT ); Mon, 28 Mar 2016 12:05:29 -0400 Received: from mga09.intel.com ([134.134.136.24]:44581 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753473AbcC1QF0 convert rfc822-to-8bit (ORCPT ); Mon, 28 Mar 2016 12:05:26 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,407,1455004800"; d="scan'208";a="920307852" From: "Tirdea, Irina" To: Peter Meerwald-Stadler , Jonathan Cameron CC: "linux-iio@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Hartmut Knaack , Lars-Peter Clausen , "Purdila, Octavian" , Markus Pargmann , "Pandruvada, Srinivas" Subject: RE: [PATCH 4/6] iio: accel: bmg160: optimize transfers in trigger handler Thread-Topic: [PATCH 4/6] iio: accel: bmg160: optimize transfers in trigger handler Thread-Index: AQHRha/AgVBx47mD6Eypa5CGv13xyJ9ulDWAgAADfICAAB5YcA== Date: Mon, 28 Mar 2016 16:05:19 +0000 Deferred-Delivery: Mon, 28 Mar 2016 16:05:00 +0000 Message-ID: <1F3AC3675D538145B1661F571FE1805F2F2155A7@irsmsx105.ger.corp.intel.com> References: <1458811771-25217-1-git-send-email-irina.tirdea@intel.com> <1458811771-25217-5-git-send-email-irina.tirdea@intel.com> <56F8FFED.2090703@kernel.org> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMjk4YTU1YzgtY2I3My00YWFmLWI1MzktMGY0M2JmNjBhMzcxIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IkQ3MFwvUTJDWnN3ZFM3Y01zdXJoUkVuajJDcThzWmxPd01YVm9sUVwvUDNjaz0ifQ== x-ctpclassification: CTP_IC x-originating-ip: [163.33.239.182] 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: 2201 Lines: 58 > -----Original Message----- > From: Peter Meerwald-Stadler [mailto:pmeerw@pmeerw.net] > Sent: 28 March, 2016 13:09 > To: Jonathan Cameron > Cc: Tirdea, Irina; linux-iio@vger.kernel.org; linux-kernel@vger.kernel.org; Hartmut Knaack; Lars-Peter Clausen; Purdila, Octavian; > Markus Pargmann; Pandruvada, Srinivas > Subject: Re: [PATCH 4/6] iio: accel: bmg160: optimize transfers in trigger handler > > Thanks for the review, Peter! > > > 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 bmc150 accel driver does > > should refer to bmg160 > > > > one bus transfer for each axis. This has an impact on the frequency > > > of the accelerometer at high sample rates due to additional delays > > > introduced by the bus at each transfer. > > > > > > Reading all axis values in one bus transfer reduces the delays > > > introduced by the bus. > > > > > > Signed-off-by: Irina Tirdea > > I forgot to highlight on the earlier driver that there is also 'technically' > > a bit of an ABI change here because we are now exporting as LE rather than CPU > > order. However, I 'hope' anyone actually accessing the buffered data is either > > doing it through a nice library or hasn't hacked the endian unwinding out of > > the generic_buffer example! > > the patch takes away the possibility to do buffered reads on individual > channels (not sure if this is useful per se) We can still read individual channels, but the demux is now handled by the iio core (through available_scan_masks, added in the previous patch). As Jonathan mentioned in a previous patch, this will impact performance for reading only a subset of the available channels (since we will read all 3 axes regardless of how many axes the user actually requested and will receive). > > this optimizes for the common case, ok; > > wondering if adding > .endianness = IIO_LE > is actually an unrelated fix > Thanks for catching this! I already covered this point in the reply to Jonathan. Thanks, Irina