From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754957AbcE3NpE (ORCPT ); Mon, 30 May 2016 09:45:04 -0400 Received: from mga04.intel.com ([192.55.52.120]:16731 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751137AbcE3NpB (ORCPT ); Mon, 30 May 2016 09:45:01 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,389,1459839600"; d="scan'208";a="711074300" Subject: Re: [PATCH v2 6/7] iio: inv_mpu6050: Reformat sample for active scan mask To: Jonathan Cameron , linux-iio@vger.kernel.org References: <7df4b331d35e3e6a19d13ccbcb5d12f0347b660c.1463582011.git.leonard.crestez@intel.com> <14d4a757-f60a-40c0-03b4-c36d1b22d30e@kernel.org> Cc: linux-kernel@vger.kernel.org, Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Daniel Baluta , Ge Gao , Peter Rosin , linux-i2c@vger.kernel.org, Wolfram Sang , devicetree@vger.kernel.org, Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala From: Crestez Dan Leonard Message-ID: <49c4a235-29fd-aa55-d9d2-8ead5cefd737@intel.com> Date: Mon, 30 May 2016 16:44:41 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.0 MIME-Version: 1.0 In-Reply-To: <14d4a757-f60a-40c0-03b4-c36d1b22d30e@kernel.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/29/2016 06:47 PM, Jonathan Cameron wrote: > On 18/05/16 16:00, Crestez Dan Leonard wrote: >> Right now it is possible to only enable some of the x/y/z channels, for >> example you can enable accel_z without x or y but if you actually do >> that what you get is actually only the x channel. >> >> Fix this by reformatting the hardware sample to only include the >> requested channels. > As it stands here there is no benefit in doing this over using the core > demux. In fact it's considerably less efficient (fair enough that you > are keeping it simple in the first instance). > The patch description should make that clear. Why is it less efficient? All it really does is a bunch of memcpy. > I'd definitely like to see simple extension of that option to handle > a callback to get the nearest scanmask that is possible (as an alternative > to the static scan_masks_available list.) > > This only gets interesting if we are dealing with the unaligned case and for > these parts that only kicks in I think if the slave devices have say 3 bytes in > their data type. But I want to deal with the unaligned case because it's better than introducing odd validations on slave channels. If I added an extension to get the nearest scanmask I would have to remove it in PATCH 7. -- Regards, Leonard