[PATCH v4 0/5] hwmon: AMPINEL telemetry support and shared fixes

From: Vas Zayarskiy

Date: Sun Sep 27 2026 - 14:38:09 EST


This revision limits AMPINEL support to read-only telemetry. It drops the
hid-generic change and the hwmon match callback, so the series no longer
needs a HID change. The separate keyboard interface is deliberately
unsupported and remains unbound with the default driver selection.

Changes since v3:
- Select the telemetry interface in the existing probe switch using its
vendor collection and input report layout. Reject the keyboard there,
following the Aquaero and Leakshield approach. Remove the USB parent
cast, USB header dependency and interface-number check.
- Split shared report type/length validation and unknown firmware-version
handling into their own patches. Check received status reports against
the HID descriptor length for all devices using the raw-event path.
- Add the missing trailing comma and correct the -ENODATA and unit
conversion wording in the numeric-fix commit message.
- Rebase onto hwmon-next 9edd5ab2656f (7.3-rc4). The relevant driver and
HID matching code are unchanged from the previous base.

The earlier probe-time callback concern was resolved in review: HID core
blocks callbacks throughout probe unless hid_device_io_start() is called.
This driver does not call it, so no initialization-race fix is included.

Validation of this revision:
- The changed hwmon object builds on x86_64 and i386 with W=1 and Sparse.
- All 995 previously captured reports pass the actual C parser/read replay
with ASan/UBSan, including simulated 32-bit long clamping.
- Shared regression cases cover invalid report types and lengths, power
and current conversion, unavailable readings, startup expiry and unknown
firmware offsets. Removing the new shared validation fails the tests.
- A userspace harness exercises the actual stock HID matching and probe
selection/error unwind: telemetry is accepted and the keyboard rejected.
This is not a live kernel binding test.
- All seven Python tests pass; the updated RST renders without warnings.

V3 was tested on physical AMPINEL hardware across loading, reload,
suspend/resume and reboot. The telemetry decoding is unchanged here, but
this exact revision has not been loaded on hardware. Validation of the
other Aquacomputer models remains synthetic. Channel labels follow report
order; alarm reporting and protection configuration are not supported.

AI assistance: Codex assisted with implementation, tests and submission
text; Sparse was used for static analysis.

V3: https://lore.kernel.org/linux-hwmon/20260914233728.22725-1-contact@xxxxxxxxx/
Review: https://lore.kernel.org/linux-hwmon/a968a02f-c513-42f0-993f-ede4f785025c@xxxxxxxxxxxx/
Probe clarification: https://lore.kernel.org/linux-hwmon/d45d4de8-6925-40ad-a5b7-b8cef6356175@xxxxxxxxxxxx/

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 | 101 ++++++++++++++++++--
3 files changed, 106 insertions(+), 12 deletions(-)


base-commit: 9edd5ab2656f040d726b5388f49ceac10bb2944f