On 14 June 2015 at 02:30, Jonathan Cameron <jic23@xxxxxxxxxx> wrote:
On 11/06/15 09:22, Gergely Imreh wrote:
The Xilinx XADC driver has both a temperature channel and 8 voltageWell spotted on the bug, but I think we are better off fixing this at the
channels. The voltage channels have no offset, but actually were still
set the same offset as the temperature channel. This did not cause
problems in /sys/bus/iio/ but can cause problems with other drivers
using iio data. For example iio-hwmon did return wrong voltage values
because of the offset.
Change tested with the Parallella board.
Signed-off-by: Gergely Imreh <imrehg@xxxxxxxxx>
true source of the problem which is in drivers/iio/inkern.c
iio_convert_raw_to_processed_unlocked which does a call to
iio_channel_read(chan, &offset, NULL, IIO_CHAN_INFO_OFFSET) then uses
the error return to check if the offset parameter is available. It should
be checking that before making this call with a call to iio_channel_has_info.
I don't suppose you could prepare a patch fixing that as you found the problem?
I'll check it out, and send an updated patch! Thanks for the pointers
to the core of the issue.