From: Jonathan Cameron <jic23@kernel.org>
To: Matti Vaittinen <matti.vaittinen@linux.dev>
Cc: "Matti Vaittinen" <mazziesaccount@gmail.com>,
"Matti Vaittinen" <matti.vaittinen@fi.rohmeurope.com>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Mehdi Djait" <mehdi.djait.k@gmail.com>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 1/3] iio: light: rohm-bu27034: Fix infinite delay on error
Date: Sun, 6 Sep 2026 22:34:04 +0100 [thread overview]
Message-ID: <20260906223404.708e86a4@jic23-huawei> (raw)
In-Reply-To: <c8a41d775b7b83c87bd58cc7ea3e4a88160d2d2d.1788336588.git.mazziesaccount@gmail.com>
On Wed, 2 Sep 2026 11:48:46 +0300
Matti Vaittinen <matti.vaittinen@linux.dev> wrote:
> From: Matti Vaittinen <mazziesaccount@gmail.com>
>
> When reading an integration-time fails, the code will use error code to
> compute the sleep time.
>
> Fix this by using the smallest integration time as a default if
> reading fails.
>
> Fixes: e52afbd61039 ("iio: light: ROHM BU27034 Ambient Light Sensor")
> Suggested-by: Jonathan Cameron <jic23@kernel.org>
> Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
>
> ---
>
> I am not happy how intrusive this patch is for a fix. I really believe
> what I suggested in discussion:
>
> wait_ms = bu27034_get_int_time(data) / USEC_PER_MSEC;
> if (wait_ms < BU27034_INT_TIME_MIN_MS)
> wait_ms = BU27034_INT_TIME_MIN_MS;
I really dislike messing with error codes like that division is doing
so I do prefer this though I get that it is a bit noisy.
So applied to the fixes-togreg branch of iio.git and marked for stable.
Thanks,
Jonathan
next prev parent reply other threads:[~2026-09-06 21:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-02 8:48 [PATCH v3 0/3] ROHM IIO fixes Matti Vaittinen
2026-09-02 8:48 ` [PATCH v3 1/3] iio: light: rohm-bu27034: Fix infinite delay on error Matti Vaittinen
2026-09-06 21:34 ` Jonathan Cameron [this message]
2026-09-02 8:49 ` [PATCH v3 2/3] iio: accel: kionix-kx022a: Prevent memory leak and fix state Matti Vaittinen
2026-09-06 21:36 ` Jonathan Cameron
2026-09-02 8:49 ` [PATCH v3 3/3] iio: accel: kionix-kx022a: Fix IPOL macro name Matti Vaittinen
2026-09-06 21:38 ` Jonathan Cameron
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=20260906223404.708e86a4@jic23-huawei \
--to=jic23@kernel.org \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matti.vaittinen@fi.rohmeurope.com \
--cc=matti.vaittinen@linux.dev \
--cc=mazziesaccount@gmail.com \
--cc=mehdi.djait.k@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.