From: "Baek Kyu, Kim" <pocj8ur4in@gmail.com>
To: Guenter Roeck <linux@roeck-us.net>
Cc: linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2 0/3] hwmon: (lm87) Handle I2C read and write errors
Date: Fri, 30 Oct 2026 01:40:13 +0900 [thread overview]
Message-ID: <20261029164016.338450-1-pocj8ur4in@gmail.com> (raw)
In-Reply-To: <74e00272-306d-4d83-b6f6-10059ad3a91f@roeck-us.net>
The LM87 driver does not check I2C transfer results in its sysfs stores,
sensor cache refresh, and device setup. As a result, failed writes can
be reported as successful and failed reads can be used as sensor data.
This series propagates transfer errors to sysfs and probe callers.
Cached settings change only after successful writes; a failed cache
refresh is retried, with alarms already read retained for the retry.
Under ARM64 QEMU/KVM, 46 emulated SMBus scenarios passed for LM87 and
ADM1024. The earlier aout_output regression suite passed all 118 checks.
Baek Kyu, Kim (3):
hwmon: (lm87) Propagate sysfs write errors
hwmon: (lm87) Propagate cached sensor read errors
hwmon: (lm87) Check I2C errors during detection and setup
drivers/hwmon/lm87.c | 384 ++++++++++++++++++++++++++++++++-----------
1 file changed, 284 insertions(+), 100 deletions(-)
---
Changes in v2:
- Address the other unchecked I2C writes and reads noted in the v1
review, beyond the original aout_output store.
- Group the changes into sysfs writes, cache refresh, and device
setup instead of fixing one call site per patch.
- Preserve alarms if a cache refresh fails after an alarm read.
Link to v1: https://lore.kernel.org/linux-hwmon/20261025150800.49041-1-pocj8ur4in@gmail.com/
--
2.55.0
next prev parent reply other threads:[~2026-10-29 16:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-25 15:08 [PATCH] hwmon: (lm87) Propagate analog output " pocj8ur4in
2026-10-26 0:17 ` Guenter Roeck
2026-10-29 16:40 ` Baek Kyu, Kim [this message]
2026-10-29 16:40 ` [PATCH v2 1/3] hwmon: (lm87) Propagate sysfs " Baek Kyu, Kim
2026-10-29 16:40 ` [PATCH v2 2/3] hwmon: (lm87) Propagate cached sensor read errors Baek Kyu, Kim
2026-10-29 16:40 ` [PATCH v2 3/3] hwmon: (lm87) Check I2C errors during detection and setup Baek Kyu, Kim
2026-10-29 19:46 ` [PATCH v2 0/3] hwmon: (lm87) Handle I2C read and write errors Guenter Roeck
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=20261029164016.338450-1-pocj8ur4in@gmail.com \
--to=pocj8ur4in@gmail.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
/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®