From: Jonathan Cameron <jic23@cam.ac.uk>
To: "Hennerich, Michael" <Michael.Hennerich@analog.com>
Cc: "linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
"device-drivers-devel@blackfin.uclinux.org"
<device-drivers-devel@blackfin.uclinux.org>,
Drivers <Drivers@analog.com>
Subject: Re: [PATCH 1/2] iio: core: add _bias channel information
Date: Thu, 15 Sep 2011 17:04:03 +0100 [thread overview]
Message-ID: <4E7221F3.30604@cam.ac.uk> (raw)
In-Reply-To: <544AC56F16B56944AEC3BD4E3D59177146E719B40E@LIMKCMBX1.ad.analog.com>
On 09/15/11 16:33, Hennerich, Michael wrote:
> Jonathan Cameron wrote on 2011-09-15:
>> On 09/15/11 16:04, michael.hennerich@analog.com wrote:
>>> From: Michael Hennerich <michael.hennerich@analog.com>
>> Sorry, I must be dozing, why can't this be covered by the _offset
>> equivalent? Admittedly it will then be tied up with the _scale
>> parameter changing, but surely with a bit of care this can still be done?
>>
>> As I read it, with this we would have
>>
>> X_input = (X_raw + X_offset)*X_scale + X_bias ?
>>
>> Can be transformed with care to
>>
>> X_input = (X_raw + X_offset + X_bias/X_scale)*X_scale
>>
>> Annoying to do, but still it would keep us in line with current abi.
>>
>> We could do this, but I'm unclear on whether it is justified.
>>
>> Please argue your case!
>
> Hi Jonathan,
>
> We talked about this in the 'Re: IIO: Interface for capacitance inputs (and outputs)'
> email thread we had some time ago. And I think you agreed on the _bias introduction.
>
> The idea was to use _bias for the CAPDACs on the CDC devices.
> But you are right, we could use _offset here too, if we eliminate _scale form the value.
>
> Greetings,
> Michael
Hmm.. I'd forgotten about that sorry!
Seeing what you've actually done with it, I'm not sure there is a reason to introduce
the bias attribute. As ever real code use does tend to clear these discussions up.
I'd rather not introduce this, as much as anything because it will add confusion for
other device types.
prev parent reply other threads:[~2011-09-15 15:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-15 15:04 [PATCH 1/2] iio: core: add _bias channel information michael.hennerich
2011-09-15 15:04 ` [PATCH 2/2] iio: adc: Replace, rewrite ad7745 from scratch michael.hennerich
2011-09-15 16:01 ` Jonathan Cameron
2011-09-16 10:57 ` Michael Hennerich
2011-09-15 15:31 ` [PATCH 1/2] iio: core: add _bias channel information Jonathan Cameron
2011-09-15 15:33 ` Hennerich, Michael
2011-09-15 16:04 ` Jonathan Cameron [this message]
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=4E7221F3.30604@cam.ac.uk \
--to=jic23@cam.ac.uk \
--cc=Drivers@analog.com \
--cc=Michael.Hennerich@analog.com \
--cc=device-drivers-devel@blackfin.uclinux.org \
--cc=linux-iio@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).