Skip to content

Commit 0c45633

Browse files
ribaldajic23
authored andcommitted
iio: hid-sensor-prox: Fix invalid read_raw for attention
The attention channel is a IIO_CHAN_INFO_PROCESSED, not a IIO_CHAN_INFO_RAW. Modify prox_read_raw() to support it. Fixes: 596ef5c ("iio: hid-sensor-prox: Add support for more channels") Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Link: https://patch.msgid.link/20241122-fix-processed-v2-1-b9f606d3b519@chromium.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
1 parent 954c06d commit 0c45633

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

drivers/iio/light/hid-sensor-prox.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ static int prox_read_raw(struct iio_dev *indio_dev,
9494
*val2 = 0;
9595
switch (mask) {
9696
case IIO_CHAN_INFO_RAW:
97+
case IIO_CHAN_INFO_PROCESSED:
9798
if (chan->scan_index >= prox_state->num_channels)
9899
return -EINVAL;
99100
address = prox_state->channel2usage[chan->scan_index];

0 commit comments

Comments
 (0)