mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Andy Shevchenko <andriy.shevchenko@intel.com>
Cc: "Jan Remes" <ciakval@gmail.com>,
	"David Lechner" <dlechner@baylibre.com>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	"Joe Sandom" <joe.g.sandom@gmail.com>,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
	martin.triska@mycroftmind.com,
	"Jan Remes" <jan.remes@mycroftmind.com>
Subject: Re: [PATCH v2 0/4] iio: light: tsl2591: fix lux calculation and precision, add I2C ID table, report saturation
Date: Sat, 17 Oct 2026 03:14:11 +0100	[thread overview]
Message-ID: <20261017031411.05dee323@jic23-hlaptop> (raw)
In-Reply-To: <atEdM6wi_FAGFjrr@ashevche-desk.local>

On Thu, 15 Oct 2026 21:36:35 +0300
Andy Shevchenko <andriy.shevchenko@intel.com> wrote:

> On Wed, Oct 14, 2026 at 04:16:46PM +0200, Jan Remes wrote:
> 
> > This series fixes several issues found while using the TSL2591 in
> > company products (Raspberry Pi CM5) and when testing (x86_64 laptops
> > with MCP2221 USB-I2C bridge).
> > 
> > The original field report found that the illumination value has always
> > been 0.0 (caused by division by zero on ARM).
> > 
> > Patch 1 fixes divisions by zero in the lux calculation, which occur with
> > LOW gain and short integration times, or in darkness when CH0 = 0.
> > 
> > Patch 2 adds an i2c_device_id table so the driver can be probed on systems
> > without CONFIG_OF.
> > 
> > Patch 3 makes the driver return an error instead of a bogus value when the
> > sensor is saturated.
> > 
> > Patch 4 improves the formula for calculating lux values to make the
> > returned value more accurate.
> > 
> > Patches 3 and 4 change existing behavior, I am OK with splitting the
> > series into two, if that makes things better.
> > 
> > AI assistance: Claude Code (Claude Opus 5.5) was used for research on
> > sensor behavior, datasheets and Adafruit library, to compare results
> > produced by old and new formula, to draft some code for patches 1 and 4.
> > I reviewed all of it and tested it on x86_64.  
> 
> From my view (haven't checked the calculations, though) this looks good,
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
> 
I'm guessing not huge urgency on patch 1, so to keep things simple I've
applied the lot to the testing branch of iio.git. That will get rebased
on rc1 once available in a couple of weeks.

If you want the fix to go in faster, shout and I'll do that at risk
of slowing down the rest.

Thanks,

Jonathan



      reply	other threads:[~2026-10-17  2:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-14 14:16 Jan Remes
2026-10-14 14:16 ` [PATCH v2 1/4] iio: light: tsl2591: don't divide by zero Jan Remes
2026-10-14 14:16 ` [PATCH v2 2/4] iio: light: tsl2591: add I2C device ID table Jan Remes
2026-10-14 14:16 ` [PATCH v2 3/4] iio: light: tsl2591: report saturation Jan Remes
2026-10-14 14:16 ` [PATCH v2 4/4] iio: light: tsl2591: improve lux calculation precision Jan Remes
2026-10-15 18:36 ` [PATCH v2 0/4] iio: light: tsl2591: fix lux calculation and precision, add I2C ID table, report saturation Andy Shevchenko
2026-10-17  2:14   ` Jonathan Cameron [this message]

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=20261017031411.05dee323@jic23-hlaptop \
    --to=jic23@kernel.org \
    --cc=andriy.shevchenko@intel.com \
    --cc=andy@kernel.org \
    --cc=ciakval@gmail.com \
    --cc=dlechner@baylibre.com \
    --cc=jan.remes@mycroftmind.com \
    --cc=joe.g.sandom@gmail.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.triska@mycroftmind.com \
    --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

all inboxes | Powered by JetHome®