Re: [PATCH v8 3/3] iio: adc: add support for Allwinner SoCs ADC

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

 



Hi Peter,

On 10/12/2016 08:04, Peter Meerwald-Stadler wrote:
> 
>> [...]
>>>> +	case IIO_CHAN_INFO_SCALE:
>>>> +		if (chan->type == IIO_VOLTAGE) {
>>>> +			/* 3000mV / 4096 * raw */
>>>> +			*val = 0;
>>>> +			*val2 = 732421875;
>>>
>>> this looks more like INT_PLUS_NANO, beyond range of micro?
>>>
>>>> +			return IIO_VAL_INT_PLUS_MICRO;
>>
>> No, this is rather a mistake.
>>
>> The scale to convert to mV is 0.732421875 (3000mV / 4096). The scale to
> 
> correct
> 
>> convert to uV is thus 732.421875.
> 
> yes, but we want millivolt in IIO (ABI/testing/see sysfs-bus-iio)
> 
> I think you should change _PLUS_MICRO to _PLUS_NANO
> 

Then, obviously yes. I'll check the other scales as well to be sure.

Thanks!

Quentin

-- 
Quentin Schulz, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
--
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