Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: 596ef5cf654b ("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>

authored by

Ricardo Ribalda and committed by
Jonathan Cameron
0c45633c 954c06dd

+1
+1
drivers/iio/light/hid-sensor-prox.c
··· 94 94 *val2 = 0; 95 95 switch (mask) { 96 96 case IIO_CHAN_INFO_RAW: 97 + case IIO_CHAN_INFO_PROCESSED: 97 98 if (chan->scan_index >= prox_state->num_channels) 98 99 return -EINVAL; 99 100 address = prox_state->channel2usage[chan->scan_index];