]> git.baikalelectronics.ru Git - kernel.git/commit
iio: light: tsl2772: fix reading proximity-diodes from device tree
authorBrian Masney <bmasney@redhat.com>
Tue, 4 Apr 2023 01:14:55 +0000 (21:14 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Apr 2023 09:24:04 +0000 (11:24 +0200)
commitb7e6a4364c0b7b3e94219734de571e67ff9fc50c
tree753cbe1d987e50e6477a026c03b0f4b81535fd90
parent15ead009a0216c1a875faa6145beecfc3e8fdeaa
iio: light: tsl2772: fix reading proximity-diodes from device tree

commit b1cb00d51e361cf5af93649917d9790e1623647e upstream.

tsl2772_read_prox_diodes() will correctly parse the properties from
device tree to determine which proximity diode(s) to read from, however
it didn't actually set this value on the struct tsl2772_settings. Let's
go ahead and fix that.

Reported-by: Tom Rix <trix@redhat.com>
Link: https://lore.kernel.org/lkml/20230327120823.1369700-1-trix@redhat.com/
Fixes: ae1cb9808f8c ("iio: tsl2772: add support for reading proximity led settings from device tree")
Signed-off-by: Brian Masney <bmasney@redhat.com>
Link: https://lore.kernel.org/r/20230404011455.339454-1-bmasney@redhat.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iio/light/tsl2772.c