From: sashiko-bot@kernel.org
To: "Guenter Roeck" <linux@roeck-us.net>, linux-hwmon@vger.kernel.org
Subject: Re: [PATCH] hwmon: (tmp108) Fix initial conversion delay and wait until ready
Date: Sat, 31 Oct 2026 03:51:26 +0000 [thread overview]
Message-ID: <sashiko-outbox-191737@kernel.org> (raw)
In-Reply-To: <20261031034834.1079813-1-linux@roeck-us.net>
> In tmp108_common_probe(), the driver only adds the 30 ms conversion delay
> (TMP108_CONVERSION_TIME_MS) to ready_time if the sensor was previously in
> TMP108_MODE_SHUTDOWN. However, the TMP108 hardware defaults to continuous
> conversion mode (TMP108_MODE_CONTINUOUS) upon power-on reset, including
> immediately after enabling the vcc supply regulator during probe, while
> the temperature register retains its power-on reset value of 0x0000 (0°C)
> until the first conversion completes. Because the initial mode is not
> shutdown, the delay is bypassed and early reads via thermal zone
> registration or sysfs before the first conversion finishes return an
> uninitialized 0°C reading.
>
> In addition, returning -EAGAIN from tmp108_read() while waiting for a
> conversion to complete after probe or resume can trigger an unnecessary
> tight retry loop in callers or fail initial reads.
>
> Unconditionally set ready_time to TMP108_CONVERSION_TIME_MS ahead in
> tmp108_common_probe(), track ready_time as ktime_t, and wait for the
> remaining conversion time in tmp108_read() using usleep_range() instead
> of returning -EAGAIN.
>
> Reported-by: Sashiko <sashiko-bot@kernel.org>
> Fixes: 66e1c9171339 ("hwmon: Add Texas Instruments TMP108 temperature sensor driver.")
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261031034834.1079813-1-linux@roeck-us.net?part=1
prev parent reply other threads:[~2026-10-31 3:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-31 3:48 [PATCH] hwmon: (tmp108) Fix initial conversion delay and wait until ready Guenter Roeck
2026-10-31 3:51 ` sashiko-bot [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=sashiko-outbox-191737@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=sashiko-reviews@lists.linux.dev \
/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.