Linux IIO development
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: "Jose A. Perez de Azpillaga" <azpijr@gmail.com>
Cc: linux-iio@vger.kernel.org,
	"David Lechner" <dlechner@baylibre.com>,
	"Nuno Sá" <nuno.sa@analog.com>
Subject: Re: [RFC 0/4] iio: light: add driver for Broadcom APDS9999
Date: Mon, 11 May 2026 13:21:12 +0100	[thread overview]
Message-ID: <20260511132112.66246dc8@jic23-huawei> (raw)
In-Reply-To: <cover.1778491503.git.azpijr@gmail.com>

On Mon, 11 May 2026 12:14:42 +0200
"Jose A. Perez de Azpillaga" <azpijr@gmail.com> wrote:

> This series adds support for the Broadcom APDS9999 ambient light
> sensor. The APDS9999 is a digital proximity and RGB sensor with
> ALS capability, featuring I2C interface, programmable gain and
> integration time.
> 
> This chip is considered by Broadcom to be the 'successor' to the
> APDS-9960 which has technically been discontinued.
> 
> The initial driver implements the ALS/Lux functionality using the
> green channel, which approximates the human eye spectral response.

That's not normally a good approximation unless it is also has
very bad colour curves for green!  Better than any other channel
on it's own but still not good. If we had calibrated sRGB it would be:

 Something like: 0.2126R+0.7152G+0.0722B
for example.

The lux vs white light and lux vs incandecent light are fairly linear
so 'maybe' it's good enough but it's a bit of a stretch to describe it
as an illuminance measure which is what we'd need for it to be measured
in lux.

So I'm on the fence at the moment.  We might be better off teaching userspace
code to do it's own approximation if it has an RGB sensor.

Jonathan

> 
> Sent as RFC to gather feedback on the driver structure
> and DT binding.
> 
> Jose A. Perez de Azpillaga (4):
>   dt-bindings: iio: light: add DT binding for Broadcom APDS9999
>   iio: light: add support for APDS9999 sensor
>   iio: light: add build support for APDS9999
>   MAINTAINERS: add myself as APDS9999 maintainer
> 
>  .../bindings/iio/light/brcm,apds9999.yaml     |  33 ++
>  MAINTAINERS                                   |   7 +
>  drivers/iio/light/Kconfig                     |  10 +
>  drivers/iio/light/Makefile                    |   1 +
>  drivers/iio/light/apds9999.c                  | 325 ++++++++++++++++++
>  5 files changed, 376 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/iio/light/brcm,apds9999.yaml
>  create mode 100644 drivers/iio/light/apds9999.c
> 


  parent reply	other threads:[~2026-05-11 12:21 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-11 10:14 [RFC 0/4] iio: light: add driver for Broadcom APDS9999 Jose A. Perez de Azpillaga
2026-05-11 10:14 ` [RFC 1/4] dt-bindings: iio: light: add DT binding " Jose A. Perez de Azpillaga
2026-05-11 12:26   ` Jonathan Cameron
2026-05-11 15:28     ` Jose A. Perez de Azpillaga
2026-05-11 10:14 ` [RFC 2/4] iio: light: add support for APDS9999 sensor Jose A. Perez de Azpillaga
2026-05-11 13:06   ` Jonathan Cameron
2026-05-11 16:14     ` Jose A. Perez de Azpillaga
2026-05-11 10:14 ` [RFC 3/4] iio: light: add build support for APDS9999 Jose A. Perez de Azpillaga
2026-05-11 12:28   ` Jonathan Cameron
2026-05-11 15:30     ` Jose A. Perez de Azpillaga
2026-05-11 10:14 ` [RFC 4/4] MAINTAINERS: add myself as APDS9999 maintainer Jose A. Perez de Azpillaga
2026-05-11 12:29   ` Jonathan Cameron
2026-05-11 15:33     ` Jose A. Perez de Azpillaga
2026-05-11 12:21 ` Jonathan Cameron [this message]
2026-05-11 15:19   ` [RFC 0/4] iio: light: add driver for Broadcom APDS9999 Jose A. Perez de Azpillaga
2026-05-11 15:53     ` Jonathan Cameron
2026-05-11 16:19       ` Jose A. Perez de Azpillaga

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=20260511132112.66246dc8@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=azpijr@gmail.com \
    --cc=dlechner@baylibre.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=nuno.sa@analog.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