* [PATCH] iio: light: apds9306: fix default sampling frequency definition
@ 2026-09-03 5:38 Tsz Shan Chan
2026-09-03 6:41 ` Andy Shevchenko
0 siblings, 1 reply; 3+ messages in thread
From: Tsz Shan Chan @ 2026-09-03 5:38 UTC (permalink / raw)
To: Subhajit Ghosh, Jonathan Cameron, David Lechner, Nuno Sá,
Andy Shevchenko
Cc: linux-iio, linux-kernel, Jonathan Cameron, Tsz Shan Chan
APDS9306_SAMP_FREQ_10HZ is defined as 0.
According to the datasheet (page 11, ALS_MEAS_RATE), bits[2:0] set the
measurement rate:
- 000: 25ms (40Hz)
- 001: 20ms (20Hz)
- 010: 100ms (10Hz)
Change APDS9306_SAMP_FREQ_10HZ from 0 to 2 to write the correct value
for 10Hz.
Fixes: 620d1e6c7a3f ("iio: light: Add support for APDS9306 Light Sensor")
Signed-off-by: Tsz Shan Chan <tchan@jacques.com.au>
---
drivers/iio/light/apds9306.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iio/light/apds9306.c b/drivers/iio/light/apds9306.c
index f681b02e4922..7dd41136734f 100644
--- a/drivers/iio/light/apds9306.c
+++ b/drivers/iio/light/apds9306.c
@@ -61,7 +61,7 @@
#define APDS9306_NUM_REPEAT_RATES 7
#define APDS9306_INT_SRC_CLEAR 0
#define APDS9306_INT_SRC_ALS 1
-#define APDS9306_SAMP_FREQ_10HZ 0
+#define APDS9306_SAMP_FREQ_10HZ 2
/**
* struct part_id_gts_multiplier - Part no. and corresponding gts multiplier
---
base-commit: 940de590b839f71d6dc846160534bf202401b8b7
change-id: 20260903-apds9306-bedba7b74e59
Best regards,
--
Tsz Shan Chan <tchan@jacques.com.au>
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] iio: light: apds9306: fix default sampling frequency definition
2026-09-03 5:38 [PATCH] iio: light: apds9306: fix default sampling frequency definition Tsz Shan Chan
@ 2026-09-03 6:41 ` Andy Shevchenko
2026-09-03 7:02 ` Tsz Shan Chan
0 siblings, 1 reply; 3+ messages in thread
From: Andy Shevchenko @ 2026-09-03 6:41 UTC (permalink / raw)
To: Tsz Shan Chan
Cc: Subhajit Ghosh, Jonathan Cameron, David Lechner, Nuno Sá,
Andy Shevchenko, linux-iio, linux-kernel, Tsz Shan Chan
On Thu, Sep 03, 2026 at 03:38:47PM +1000, Tsz Shan Chan wrote:
> APDS9306_SAMP_FREQ_10HZ is defined as 0.
>
> According to the datasheet (page 11, ALS_MEAS_RATE), bits[2:0] set the
Can you add a Datasheet link? (Or at least the version and name)
> measurement rate:
> - 000: 25ms (40Hz)
> - 001: 20ms (20Hz)
> - 010: 100ms (10Hz)
>
> Change APDS9306_SAMP_FREQ_10HZ from 0 to 2 to write the correct value
> for 10Hz.
> Fixes: 620d1e6c7a3f ("iio: light: Add support for APDS9306 Light Sensor")
>
> Signed-off-by: Tsz Shan Chan <tchan@jacques.com.au>
No blank lines in the tag block (at the end of the commit message).
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] iio: light: apds9306: fix default sampling frequency definition
2026-09-03 6:41 ` Andy Shevchenko
@ 2026-09-03 7:02 ` Tsz Shan Chan
0 siblings, 0 replies; 3+ messages in thread
From: Tsz Shan Chan @ 2026-09-03 7:02 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Subhajit Ghosh, Jonathan Cameron, David Lechner, Nuno Sá,
Andy Shevchenko, linux-iio, linux-kernel, Tsz Shan Chan
On Thu, Sep 03, 2026 at 09:41:27AM +0300, Andy Shevchenko wrote:
> On Thu, Sep 03, 2026 at 03:38:47PM +1000, Tsz Shan Chan wrote:
> > APDS9306_SAMP_FREQ_10HZ is defined as 0.
> >
> > According to the datasheet (page 11, ALS_MEAS_RATE), bits[2:0] set the
>
> Can you add a Datasheet link? (Or at least the version and name)
>
> > measurement rate:
> > - 000: 25ms (40Hz)
> > - 001: 20ms (20Hz)
> > - 010: 100ms (10Hz)
> >
> > Change APDS9306_SAMP_FREQ_10HZ from 0 to 2 to write the correct value
> > for 10Hz.
>
> > Fixes: 620d1e6c7a3f ("iio: light: Add support for APDS9306 Light Sensor")
> >
> > Signed-off-by: Tsz Shan Chan <tchan@jacques.com.au>
>
> No blank lines in the tag block (at the end of the commit message).
I'll add the datasheet link and remove the blank line in v2 commit
message. Thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-09-03 7:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-03 5:38 [PATCH] iio: light: apds9306: fix default sampling frequency definition Tsz Shan Chan
2026-09-03 6:41 ` Andy Shevchenko
2026-09-03 7:02 ` Tsz Shan Chan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox