summaryrefslogtreecommitdiff
path: root/drivers/iio/light
diff options
context:
space:
mode:
authorBrian Masney <bmasney@redhat.com>2023-04-03 21:14:55 -0400
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2023-04-08 10:44:34 +0100
commitb1cb00d51e361cf5af93649917d9790e1623647e (patch)
treee102aca278ced5af6bc04dbe753302c73357641b /drivers/iio/light
parentffef73791574b8da872cfbf881d8e3e9955fc130 (diff)
downloadlwn-b1cb00d51e361cf5af93649917d9790e1623647e.tar.gz
lwn-b1cb00d51e361cf5af93649917d9790e1623647e.zip
iio: light: tsl2772: fix reading proximity-diodes from device tree
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: 94cd1113aaa0 ("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>
Diffstat (limited to 'drivers/iio/light')
-rw-r--r--drivers/iio/light/tsl2772.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/iio/light/tsl2772.c b/drivers/iio/light/tsl2772.c
index ad50baa0202c..e823c145f679 100644
--- a/drivers/iio/light/tsl2772.c
+++ b/drivers/iio/light/tsl2772.c
@@ -601,6 +601,7 @@ static int tsl2772_read_prox_diodes(struct tsl2772_chip *chip)
return -EINVAL;
}
}
+ chip->settings.prox_diode = prox_diode_mask;
return 0;
}