mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Crestez Dan Leonard <leonard.crestez@intel.com>,
	linux-iio@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Hartmut Knaack <knaack.h@gmx.de>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	Daniel Baluta <daniel.baluta@intel.com>,
	Ge Gao <ggao@invensense.com>, Peter Rosin <peda@axentia.se>,
	linux-i2c@vger.kernel.org, Wolfram Sang <wsa@the-dreams.de>,
	devicetree@vger.kernel.org, Rob Herring <robh+dt@kernel.org>,
	Pawel Moll <pawel.moll@arm.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	Kumar Gala <galak@codeaurora.org>
Subject: Re: [PATCH v2 6/7] iio: inv_mpu6050: Reformat sample for active scan mask
Date: Tue, 31 May 2016 17:33:50 +0100	[thread overview]
Message-ID: <5D99415E-09D3-45D1-B4C9-7354625B2DEF@kernel.org> (raw)
In-Reply-To: <3169df0b-78d8-a35c-bd31-f2d4e7e17bde@intel.com>



On 31 May 2016 09:56:51 BST, Crestez Dan Leonard <leonard.crestez@intel.com> wrote:
>On 05/31/2016 12:42 AM, Jonathan Cameron wrote:
>> On 30 May 2016 14:44:41 BST, Crestez Dan Leonard
><leonard.crestez@intel.com> wrote:
>>> 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.
>> 
>> Not doing agglomeration of neighbouring copies (iirc) not git either
>set of code to
>> hand!
>
>You're right about that. But the total data rate is still very low.
>
>>>> 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.
>> Hmm I must have misread that. Though you were only supporting 16 bit
>channels
>>  for aux sensors.
>
>That was in a previous version, I dropped that limitation now.
>
>> Then for now can we give this a slightly less generic name. I am not
>happy
>>  enough that we want this in the core 'yet'. 
>> Easy to rename later if it makes sense.
>
>Ok, I will rename these functions to start with inv_mpu_* instead of
>iio_*.
>
>In theory it would be interesting to refactor the iio demuxing code to
>support this but then this patch serios would grow even more
>complicated.

Agreed. Let's leave that for a separate effort!

I was vaguely wondering about letting the core demux input be unaligned but
 enforce the output keeping current alignment.  Fiddly even then however.

J

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

  reply	other threads:[~2016-05-31 16:34 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-18 15:00 [PATCH v2 0/7] iio: inv_mpu6050: Support i2c master and external readings Crestez Dan Leonard
2016-05-18 15:00 ` [PATCH v2 1/7] iio: inv_mpu6050: Do burst reads using spi/i2c directly Crestez Dan Leonard
2016-05-29 16:05   ` Jonathan Cameron
2016-05-18 15:00 ` [PATCH v2 2/7] iio: inv_mpu6050: Initial regcache support Crestez Dan Leonard
2016-05-20  2:34   ` Matt Ranostay
2016-05-20  6:39     ` Peter Rosin
2016-05-20 11:01       ` Crestez Dan Leonard
2016-05-29 15:27         ` Jonathan Cameron
2016-05-18 15:00 ` [PATCH v2 3/7] iio: inv_mpu6050: Only toggle DATA_RDY_EN in inv_reset_fifo Crestez Dan Leonard
2016-05-29 15:29   ` Jonathan Cameron
2016-05-18 15:00 ` [PATCH v2 4/7] iio: inv_mpu6050: Cache non-volatile bits of user_ctrl Crestez Dan Leonard
2016-05-29 15:30   ` Jonathan Cameron
2016-05-18 15:00 ` [RFC v2 5/7] iio: inv_mpu6050: Add support for auxiliary I2C master Crestez Dan Leonard
2016-05-18 23:46   ` Rob Herring
2016-05-18 15:00 ` [PATCH v2 6/7] iio: inv_mpu6050: Reformat sample for active scan mask Crestez Dan Leonard
2016-05-29 15:47   ` Jonathan Cameron
2016-05-30 13:44     ` Crestez Dan Leonard
2016-05-30 21:42       ` Jonathan Cameron
2016-05-31  8:56         ` Crestez Dan Leonard
2016-05-31 16:33           ` Jonathan Cameron [this message]
2016-05-18 15:00 ` [RFC v2 7/7] iio: inv_mpu6050: Expose channels from slave sensors Crestez Dan Leonard
2016-05-18 23:49   ` Rob Herring
2016-05-29 16:03   ` Jonathan Cameron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5D99415E-09D3-45D1-B4C9-7354625B2DEF@kernel.org \
    --to=jic23@kernel.org \
    --cc=daniel.baluta@intel.com \
    --cc=devicetree@vger.kernel.org \
    --cc=galak@codeaurora.org \
    --cc=ggao@invensense.com \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=leonard.crestez@intel.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=pawel.moll@arm.com \
    --cc=peda@axentia.se \
    --cc=pmeerw@pmeerw.net \
    --cc=robh+dt@kernel.org \
    --cc=wsa@the-dreams.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®