On 11/06/2014 04:33 PM, Fabien Proriol wrote:
From 3f57e39e3c69476513c00cd5ec45703f58334972 Mon Sep 17 00:00:00 2001 From: Fabien Proriol <fabien.proriol@xxxxxxxx> Date: Tue, 4 Nov 2014 17:05:59 +0100 Subject: [PATCH] xilinx-xadc-core: Fix voltage offset When xilinx-xadc is used with hwmon driver to read voltage, offset used for temperature is always apply. This patch change the return for IIO_CHAN_INFO_OFFSET to -EINVAL except for temperature to avoid offset.
I think we should rather fix iio_channel_read() to check if the channel supports the property that we try to read. Other drivers are likely to suffer from the same issue and fixing it in a central place fixes them all.
- Lars -- 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