Skip to content
Commit f2a71ebd authored by Srinivas Pandruvada's avatar Srinivas Pandruvada Committed by Jonathan Cameron
Browse files

iio: hid-sensor-als: Assign channels dynamically



Instead of assuming that every channel defined statically by
als_channels[] is present, assign dynamically based on presence of the
respective usage id in the descriptor. This will allow to register ALS
with limited channel support. Append the timestamp as the last channel.

Update available_scan_mask to specify all channels which are present.

There is no intentional function changes done.

Signed-off-by: default avatarSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Link: https://lore.kernel.org/r/20240205185926.3030521-2-srinivas.pandruvada@linux.intel.com


Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent ca2f16c3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment