Linux Input/HID development
 help / color / mirror / Atom feed
* [PATCH v3 0/4] hwmon: AMPINEL support and shared fixes
@ 2026-09-14 23:37 Vas Zayarskiy
  2026-09-14 23:37 ` [PATCH v3 1/4] HID: generic: Respect specialized drivers match callbacks Vas Zayarskiy
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Vas Zayarskiy @ 2026-09-14 23:37 UTC (permalink / raw)
  To: linux, Aleksa Savic, Jack Doan, Jiri Kosina, Benjamin Tissoires
  Cc: linux-hwmon, linux-input, linux-kernel, linux-doc,
	Jonathan Corbet, Shuah Khan, Randy Dunlap

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@vasily.cc/

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

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2026-09-15 17:09 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-14 23:37 [PATCH v3 0/4] hwmon: AMPINEL support and shared fixes Vas Zayarskiy
2026-09-14 23:37 ` [PATCH v3 1/4] HID: generic: Respect specialized drivers match callbacks Vas Zayarskiy
2026-09-14 23:45   ` sashiko-bot
2026-09-15  4:31   ` Guenter Roeck
2026-09-15  5:22     ` Vas Zayarskiy
2026-09-14 23:37 ` [PATCH v3 2/4] hwmon: (aquacomputer_d5next) Avoid truncating scaled sensor readings Vas Zayarskiy
2026-09-14 23:44   ` sashiko-bot
2026-09-15  4:38   ` Guenter Roeck
2026-09-14 23:37 ` [PATCH v3 3/4] hwmon: (aquacomputer_d5next) Expire the initial sensor cache Vas Zayarskiy
2026-09-14 23:52   ` sashiko-bot
2026-09-14 23:37 ` [PATCH v3 4/4] hwmon: (aquacomputer_d5next) Add AMPINEL support Vas Zayarskiy
2026-09-14 23:47   ` sashiko-bot
2026-09-15  4:30   ` Guenter Roeck
2026-09-15  5:29     ` Vas Zayarskiy
2026-09-15 17:09       ` Guenter Roeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox