max44000: Remove scale from proximity
authorCrestez Dan Leonard <leonard.crestez@intel.com>
Fri, 20 May 2016 14:44:36 +0000 (17:44 +0300)
committerJonathan Cameron <jic23@kernel.org>
Sat, 21 May 2016 19:21:17 +0000 (20:21 +0100)
This is not implemented and doesn't really make sense because IIO
proximity is unit-less.

Remove IIO_CHAN_INFO_SCALE from info_mask because so that the _scale
sysfs entry won't appear. This fixes userspace tools like generic_buffer
which abort when reads returns an error.

Signed-off-by: Crestez Dan Leonard <leonard.crestez@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/light/max44000.c

index e01e58a9bd1419397dda85160e7cc625ab7fd6e7..f17cb2ea18f59c9ea4f368e26488e50d114b05ec 100644 (file)
@@ -147,7 +147,6 @@ static const struct iio_chan_spec max44000_channels[] = {
        {
                .type = IIO_PROXIMITY,
                .info_mask_separate = BIT(IIO_CHAN_INFO_RAW),
-               .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE),
                .scan_index = MAX44000_SCAN_INDEX_PRX,
                .scan_type = {
                        .sign           = 'u',