Linux Hardware Monitor development
 help / color / mirror / Atom feed
* [PATCH 0/7] hwmon: (pmbus/adm1266) RTC fix, blackbox, FW rev, rtc_class
@ 2026-05-08 23:33 Abdurrahman Hussain via B4 Relay
  2026-05-08 23:33 ` [PATCH 1/7] hwmon: (pmbus/adm1266) use wall-clock seconds for SET_RTC Abdurrahman Hussain via B4 Relay
                   ` (7 more replies)
  0 siblings, 8 replies; 19+ messages in thread
From: Abdurrahman Hussain via B4 Relay @ 2026-05-08 23:33 UTC (permalink / raw)
  To: Guenter Roeck, Alexandru Tachici
  Cc: linux-hwmon, linux-kernel, Abdurrahman Hussain

This series fixes a few issues in the adm1266 driver and fills in
some gaps, as listed below.

Patch 1 is a wall-clock RTC bug fix: the driver currently seeds the
device's timestamp counter with CLOCK_MONOTONIC seconds, which makes
blackbox record timestamps non-comparable across reboots. It carries
a Fixes: tag.

Patch 2 writes the 16-bit fractional-seconds field of SET_RTC that
the driver was zeroing, restoring sub-second resolution on records.

Patch 3 exposes the firmware revision (IC_DEVICE_REV, 0xAE) via
debugfs alongside the existing sequencer_state entry.

Patch 4 adds a write-only clear_blackbox debugfs file. Devices
configured for single-recording mode (BLACKBOX_CONFIG[0] = 0) need
an explicit clear once the 32-record buffer fills; the documented
sub-command ({0xFE, 0x00} block-write to 0xDE) wasn't reachable
from userspace.

Patch 5 exposes the non-volatile POWERUP_COUNTER (0xE4) via debugfs.
The same value is embedded in every blackbox record, so the live
value lets userspace match a captured record back to the boot it
came from when correlating logs.

Patch 6 registers an rtc_class device backed by SET_RTC. The data
sheet (Rev. D, p. 22) explicitly recommends "frequently send the
time stamp to the ADM1266 to synchronize the UNIX time and reduce
the time from drifting" when running on the internal oscillator
(no external 32.768 kHz crystal). With this patch userspace can
drive the re-sync via standard tooling (hwclock, chrony,
systemd-timesyncd) against /dev/rtcN, with no driver-specific
sysfs ABI.

Patch 7 disambiguates GPIO line labels on platforms that fit two
ADM1266 devices on different I2C buses at the same slave address.

Signed-off-by: Abdurrahman Hussain <abdurrahman@nexthop.ai>
---
Abdurrahman Hussain (7):
      hwmon: (pmbus/adm1266) use wall-clock seconds for SET_RTC
      hwmon: (pmbus/adm1266) write fractional-seconds field of SET_RTC
      hwmon: (pmbus/adm1266) add firmware_revision debugfs entry
      hwmon: (pmbus/adm1266) add clear_blackbox debugfs entry
      hwmon: (pmbus/adm1266) add powerup_counter debugfs entry
      hwmon: (pmbus/adm1266) register rtc_class device backed by SET_RTC
      hwmon: (pmbus/adm1266) include adapter number in GPIO line label

 drivers/hwmon/pmbus/adm1266.c | 177 +++++++++++++++++++++++++++++++++++++++---
 1 file changed, 167 insertions(+), 10 deletions(-)
---
base-commit: 917719c412c48687d4a176965d1fa35320ec457c
change-id: 20260507-adm1266-cf3af42dc3d2

Best regards,
--  
Abdurrahman Hussain <abdurrahman@nexthop.ai>



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

end of thread, other threads:[~2026-05-11  3:46 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-08 23:33 [PATCH 0/7] hwmon: (pmbus/adm1266) RTC fix, blackbox, FW rev, rtc_class Abdurrahman Hussain via B4 Relay
2026-05-08 23:33 ` [PATCH 1/7] hwmon: (pmbus/adm1266) use wall-clock seconds for SET_RTC Abdurrahman Hussain via B4 Relay
2026-05-08 23:48   ` sashiko-bot
2026-05-08 23:33 ` [PATCH 2/7] hwmon: (pmbus/adm1266) write fractional-seconds field of SET_RTC Abdurrahman Hussain via B4 Relay
2026-05-09  0:06   ` sashiko-bot
2026-05-08 23:33 ` [PATCH 3/7] hwmon: (pmbus/adm1266) add firmware_revision debugfs entry Abdurrahman Hussain via B4 Relay
2026-05-09  0:38   ` sashiko-bot
2026-05-08 23:33 ` [PATCH 4/7] hwmon: (pmbus/adm1266) add clear_blackbox " Abdurrahman Hussain via B4 Relay
2026-05-09  1:10   ` sashiko-bot
2026-05-08 23:33 ` [PATCH 5/7] hwmon: (pmbus/adm1266) add powerup_counter " Abdurrahman Hussain via B4 Relay
2026-05-09  1:48   ` sashiko-bot
2026-05-08 23:33 ` [PATCH 6/7] hwmon: (pmbus/adm1266) register rtc_class device backed by SET_RTC Abdurrahman Hussain via B4 Relay
2026-05-09  2:26   ` sashiko-bot
2026-05-08 23:33 ` [PATCH 7/7] hwmon: (pmbus/adm1266) include adapter number in GPIO line label Abdurrahman Hussain via B4 Relay
2026-05-09  2:39   ` sashiko-bot
2026-05-09 14:14 ` [PATCH 0/7] hwmon: (pmbus/adm1266) RTC fix, blackbox, FW rev, rtc_class Guenter Roeck
2026-05-09 21:58   ` Abdurrahman Hussain
2026-05-09 23:49     ` Guenter Roeck
2026-05-11  3:46       ` Abdurrahman Hussain

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