[PATCH v3 0/4] hwmon: AMPINEL support and shared fixes
From: Vas Zayarskiy
Date: Mon Sep 14 2026 - 19:38:35 EST
This revision addresses Guenter's review by separating shared fixes from
AMPINEL support and leaving the keyboard interface with hid-generic.
Changes since v2:
- Add a HID prerequisite: hid-generic must consult a specialized driver's
match callback before yielding. ID-table matching alone makes it yield
the keyboard even if the hwmon driver rejects that interface. The AMPINEL
match callback accepts only USB interface 1 and retains the transport
check before accessing the parent. HID maintainers are copied for review.
- Widen the shared power/current caches, clamp overflowing power to
LONG_MAX, handle unavailable power, and prevent negative Aquastream XT
calibration results from wrapping into the unsigned current cache.
- Expire the initial cache for every device in a separate patch.
- Use the existing raw-event path for serial numbers, temperatures and
timestamps. Store AMPINEL values in hwmon units during decoding.
- Omit current deviation until its semantics are established; remove
AMPINEL keyboard callbacks and the unrelated expiry documentation.
Validation:
- Both modules build and link against Linux 7.2.5. Both changed objects
build on this 7.3-rc3 base for x86_64 and i386 with W=1 and Sparse.
- All 995 captured AMPINEL reports pass the C replay harness with ASan/UBSan.
Shared regression cases cover High Flow Next power and unavailable data,
existing fan/pump power paths, Aquastream XT current, and initial expiry.
The tests reproduce failures with the previous conversion/cache code.
- A userspace harness extracts the actual core/generic/AMPINEL match
functions and tests both driver registration orders, keyboard fallback,
non-USB rejection and special-driver overrides. The original hid-generic
fails the fallback test. Probe descriptor validation is also covered.
- All seven Python tests pass. Strict checkpatch passes for all four
signed patches. The changed RST renders without warnings.
Both revised modules are now installed on Hearth, Linux 7.2.5. Their loaded
ELF build IDs match the packaged binaries. All 60 raw USB/hwmon comparisons
matched across initial loading, telemetry-driver reload, persistent
activation, deep suspend/resume and reboot. The AMPINEL keyboard stays bound
to hid-generic, with its input registration unchanged through the reload
and resume. HID input names and capabilities were preserved across reboot.
The reboot selected both revised binaries without manual intervention.
The installation journal had no warnings or faults. Resume reinitialized
the USB controller and reset several devices including AMPINEL; the same
warning pattern is present in logs from 2026-08-29, before v3. Both interfaces
recovered without intervention. No Oops, BUG or call trace was found during
resume or reboot. Boot had no AMPINEL failure or USB-controller reset warning;
it retained the expected out-of-tree module notice and existing system
warnings. Live loading used generic-first order; the opposite order is
covered only by the userspace harness. Power-off cold boot and alarm-generated
keys remain untested. Shared-device numeric tests are synthetic. The HID
prerequisite needs review with the AMPINEL patch.
Telemetry units were checked against the device display at idle and under
load. Channel labels are report order. Alarms, protection configuration,
negative hotspot temperatures and other firmware remain unverified.
AI assistance: Codex assisted with the implementation, tests and submission
text; Sparse was used for static analysis.
V2: https://lore.kernel.org/linux-hwmon/20260914220128.287145-1-contact@xxxxxxxxx/
Vas Zayarskiy (4):
HID: generic: Respect specialized drivers match callbacks
hwmon: (aquacomputer_d5next) Avoid truncating scaled sensor readings
hwmon: (aquacomputer_d5next) Expire the initial sensor cache
hwmon: (aquacomputer_d5next) Add AMPINEL support
Documentation/hwmon/aquacomputer_d5next.rst | 11 ++
drivers/hid/hid-generic.c | 8 +-
drivers/hwmon/Kconfig | 4 +-
drivers/hwmon/aquacomputer_d5next.c | 121 ++++++++++++++++++--
4 files changed, 132 insertions(+), 12 deletions(-)
base-commit: 46fde107b4e881f179bf02bca69d8a0020561b3c