Linux IIO development
 help / color / mirror / Atom feed
From: "Jose A. Perez de Azpillaga" <azpijr@gmail.com>
To: Jonathan Cameron <jic23@kernel.org>
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 17:19:54 +0200	[thread overview]
Message-ID: <agHzLu-W7MBNXxmx@gmail.com> (raw)
In-Reply-To: <20260511132112.66246dc8@jic23-huawei>

On Mon, May 11, 2026 at 01:21:12PM +0100, Jonathan Cameron wrote:
> 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.

the datasheet states: "Approximates human eye response with green
channel" and "Uses optical coating technology to emulate human eye
spectral response."

that's the reason why I chose to use green channel.

> 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.

I'll also add IIO_INTENSITY channels for R, G, B in v2 so userspace can
comapute its own weighted lux if it prefers.

--
jose a. p-a

  reply	other threads:[~2026-05-11 15:19 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 ` [RFC 0/4] iio: light: add driver for Broadcom APDS9999 Jonathan Cameron
2026-05-11 15:19   ` Jose A. Perez de Azpillaga [this message]
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=agHzLu-W7MBNXxmx@gmail.com \
    --to=azpijr@gmail.com \
    --cc=dlechner@baylibre.com \
    --cc=jic23@kernel.org \
    --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