From: Vas Zayarskiy <contact@vasily.cc>
To: linux@roeck-us.net, Aleksa Savic <savicaleksa83@gmail.com>,
Jack Doan <me@jackdoan.com>
Cc: linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-doc@vger.kernel.org, Jonathan Corbet <corbet@lwn.net>,
Shuah Khan <skhan@linuxfoundation.org>,
Randy Dunlap <rdunlap@infradead.org>
Subject: [PATCH v5 0/5] hwmon: AMPINEL telemetry support and shared fixes
Date: Sun, 27 Sep 2026 22:13:11 +0300 [thread overview]
Message-ID: <20260927191316.4137752-1-contact@vasily.cc> (raw)
This series adds read-only AMPINEL telemetry to aquacomputer_d5next,
along with shared numeric, initial-cache and report-validation fixes.
The separate keyboard interface remains deliberately unsupported, and
there is no HID core or generic-HID change.
Changes since v4:
- In patch 1, read the power cache once with READ_ONCE(), check that
snapshot for -ENODATA and return the same value. Mark the power-cache
updates with WRITE_ONCE(). This addresses the check/use race identified
by Sashiko review; the HID callback does not take the hwmon read mutex.
- In patch 5, use WRITE_ONCE() for AMPINEL's power-cache update as well.
- Patches 2 through 4 are unchanged. The base remains hwmon-next
9edd5ab2656f (7.3-rc4).
Validation of this revision:
- The hwmon object builds on x86_64 and i386 with W=1 and Sparse.
- All 995 captured reports pass the actual C parser/read replay under
ASan/UBSan, including simulated 32-bit long clamping and the existing
shared numeric, expiry and report-validation regression cases.
- A userspace scheduling hook invokes the actual raw-event handler after
a power-cache read. Valid-to-unavailable, unavailable-to-valid and
valid-to-different-valid updates preserve the checked snapshot.
The old double read and two independent READ_ONCE() calls fail this
check. This models an interleaving, not a live-kernel race reproduction.
- The exact final source was built and installed on Linux 7.2.6 with
stock hid-generic. All 24 raw USB/hwmon comparisons matched after
module loading and system activation. Telemetry binds successfully,
the keyboard remains unbound, and other HID devices retain their
drivers and input capabilities. No AMPINEL fault or kernel WARN/Oops
appeared during installation. This revision has not been tested across
reboot or suspend/resume; the earlier v3 lifecycle results are separate.
The power snapshot does not provide atomic readings across different
sensors. Other Aquacomputer models have synthetic regression coverage,
not hardware validation here. Channel labels follow report order;
alarm reporting and protection configuration remain outside this series.
AI assistance: Codex assisted with implementation, tests and submission
text; Sparse was used for static analysis.
V4: https://lore.kernel.org/linux-hwmon/20260927183723.4078226-1-contact@vasily.cc/
V3: https://lore.kernel.org/linux-hwmon/20260914233728.22725-1-contact@vasily.cc/
Vas Zayarskiy (5):
hwmon: (aquacomputer_d5next) Avoid truncating scaled sensor readings
hwmon: (aquacomputer_d5next) Expire the initial sensor cache
hwmon: (aquacomputer_d5next) Validate incoming status reports
hwmon: (aquacomputer_d5next) Skip unknown firmware version offsets
hwmon: (aquacomputer_d5next) Add AMPINEL telemetry support
Documentation/hwmon/aquacomputer_d5next.rst | 13 +++
drivers/hwmon/Kconfig | 4 +-
drivers/hwmon/aquacomputer_d5next.c | 118 +++++++++++++++++---
3 files changed, 116 insertions(+), 19 deletions(-)
base-commit: 9edd5ab2656f040d726b5388f49ceac10bb2944f
next reply other threads:[~2026-09-27 19:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-27 19:13 Vas Zayarskiy [this message]
2026-09-27 19:13 ` [PATCH v5 1/5] hwmon: (aquacomputer_d5next) Avoid truncating scaled sensor readings Vas Zayarskiy
2026-09-27 19:13 ` [PATCH v5 2/5] hwmon: (aquacomputer_d5next) Expire the initial sensor cache Vas Zayarskiy
2026-09-27 19:13 ` [PATCH v5 3/5] hwmon: (aquacomputer_d5next) Validate incoming status reports Vas Zayarskiy
2026-09-27 19:13 ` [PATCH v5 4/5] hwmon: (aquacomputer_d5next) Skip unknown firmware version offsets Vas Zayarskiy
2026-09-27 19:13 ` [PATCH v5 5/5] hwmon: (aquacomputer_d5next) Add AMPINEL telemetry support Vas Zayarskiy
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=20260927191316.4137752-1-contact@vasily.cc \
--to=contact@vasily.cc \
--cc=corbet@lwn.net \
--cc=linux-doc@vger.kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=me@jackdoan.com \
--cc=rdunlap@infradead.org \
--cc=savicaleksa83@gmail.com \
--cc=skhan@linuxfoundation.org \
/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