iio: hid-sensor-als: Use channel index to support more hub attributes
authorBasavaraj Natikar <Basavaraj.Natikar@amd.com>
Tue, 19 Sep 2023 08:10:46 +0000 (13:40 +0530)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 24 Sep 2023 12:22:52 +0000 (13:22 +0100)
commit286d528bf0fae9f334fba857825b9701df1675b2
tree262f76add6d2428514ede72b93370ff1c873d3ad
parent0bb80ecc33a8fb5a682236443c1e740d5c917d1d
iio: hid-sensor-als: Use channel index to support more hub attributes

Sensor hub attributes can be extended to support more channels. Repeat
the reading for the two existing channels and store them separately. It
still operates in the same manner as before where there was just one
entry. So in order to support more sensor hub attributes for ALS use
channel index to get specific sensor hub attributes.

Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
Acked-by: Srinivas Pandruvada<srinivas.pandruvada@linux.intel.com>
Link: https://lore.kernel.org/r/20230919081054.2050714-2-Basavaraj.Natikar@amd.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/light/hid-sensor-als.c