Re: [PATCH 1/2] iio: core: add _bias channel information

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 09/15/11 16:33, Hennerich, Michael wrote:
> Jonathan Cameron wrote on 2011-09-15:
>> On 09/15/11 16:04, michael.hennerich@xxxxxxxxxx wrote:
>>> From: Michael Hennerich <michael.hennerich@xxxxxxxxxx>
>> 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.

--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux