Linux IIO development
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Tsz Shan Chan <tsz.chan.dev@gmail.com>
Cc: "Subhajit Ghosh" <subhajit.ghosh@tweaklogic.com>,
	"David Lechner" <dlechner@baylibre.com>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Andy Shevchenko" <andriy.shevchenko@intel.com>,
	"Tsz Shan Chan" <tchan@jacques.com.au>
Subject: Re: [PATCH v3] iio: light: apds9306: fix default sampling frequency definition
Date: Sun, 6 Sep 2026 04:59:29 +0100	[thread overview]
Message-ID: <20260906045929.0a1c46fd@jic23-huawei> (raw)
In-Reply-To: <20260904-apds9306-v3-1-4f668393c2ae@jacques.com.au>

On Fri, 04 Sep 2026 11:19:48 +1000
Tsz Shan Chan <tsz.chan.dev@gmail.com> wrote:

> APDS9306_SAMP_FREQ_10HZ is defined as 0.
> 
> According to the datasheet (Broadcom AV02-4755EN, 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.
> 
> Datasheet: https://docs.broadcom.com/doc/AV02-4755EN
> Fixes: 620d1e6c7a3f ("iio: light: Add support for APDS9306 Light Sensor")
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
> Signed-off-by: Tsz Shan Chan <tchan@jacques.com.au>
Looks correct to me, but as driver is only a few years old, I'll leave 
some time to see if Subhajit is still about to take a look.

Jonathan
> ---
> Changes in v3:
> - Move datasheet URL to datasheet tag in the commit message
> - Link to v2: https://lore.kernel.org/r/20260903-apds9306-v2-1-e8673986ae56@jacques.com.au
> 
> Changes in v2:
> - Add datasheet link to commit message
> - Remove blank line in the tag block
> - Link to v1: https://lore.kernel.org/r/20260903-apds9306-v1-1-3f892aa4f156@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,


  reply	other threads:[~2026-09-06  3:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-04  1:19 [PATCH v3] iio: light: apds9306: fix default sampling frequency definition Tsz Shan Chan
2026-09-06  3:59 ` Jonathan Cameron [this message]
2026-09-12 10:59   ` Subhajit Ghosh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260906045929.0a1c46fd@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=andriy.shevchenko@intel.com \
    --cc=andy@kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    --cc=subhajit.ghosh@tweaklogic.com \
    --cc=tchan@jacques.com.au \
    --cc=tsz.chan.dev@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox