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 <[email protected]> Acked-by: Srinivas Pandruvada <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
1 parent 954c06d commit 0c45633

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

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)