hwmon: (lm87) Handle I2C read and write errors
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest3 patches 1 replyIn review
- v11 patch 1 replySuperseded
Changes in v2 from the cover letter
- 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.
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | hwmon: (lm87) Propagate sysfs write errorsdrivers/ | +61 | 0 replies | |
| 2/3 | hwmon: (lm87) Propagate cached sensor read errorsdrivers/ | +158 | 0 replies | |
| 3/3 | hwmon: (lm87) Check I2C errors during detection and setupdrivers/ | +65 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH v2 0/3] hwmon: (lm87) Handle I2C read and write errors
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/[email protected]/
Signature · 1 line
2.55.0