public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iio: light: tsl2772: fix reading proximity-diodes from device tree
@ 2023-04-04  1:14 Brian Masney
  2023-04-04  7:13 ` kernel test robot
  2023-04-08  9:47 ` Jonathan Cameron
  0 siblings, 2 replies; 6+ messages in thread
From: Brian Masney @ 2023-04-04  1:14 UTC (permalink / raw)
  To: jic23
  Cc: andriy.shevchenko, trix, lars, nathan, ndesaulniers,
	u.kleine-koenig, linux-iio, linux-kernel, hslester96

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>
---
 drivers/iio/light/tsl2772.c | 1 +
 1 file changed, 1 insertion(+)

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;
 }
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-04-08  9:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-04  1:14 [PATCH] iio: light: tsl2772: fix reading proximity-diodes from device tree Brian Masney
2023-04-04  7:13 ` kernel test robot
2023-04-04 11:13   ` Brian Masney
2023-04-04 12:35     ` Uwe Kleine-König
2023-04-04 22:36       ` Brian Masney
2023-04-08  9:47 ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox