diff options
| author | Abdurrahman Hussain <abdurrahman@nexthop.ai> | 2026-05-20 15:42:40 -0700 |
|---|---|---|
| committer | Guenter Roeck <linux@roeck-us.net> | 2026-06-09 08:23:09 -0700 |
| commit | e7c1f9eb6e9f1138241f3bf28f8181f4f5ccd5eb (patch) | |
| tree | 6fb3ffb7796e84ee366408281e77a41ebcd734a7 /scripts/Makefile.thinlto | |
| parent | eb0d491e2787aa359f0d930151ff6e5e5df70fb9 (diff) | |
hwmon: (pmbus/adm1266) add clear_blackbox debugfs entry
The ADM1266 blackbox can be configured in two recording modes via
BLACKBOX_CONFIG[0]: cyclic, where the device overwrites the oldest
record once the 32-record buffer fills, and single, where it stops
recording until the buffer is cleared. Deployments that need to
preserve the full record history across multiple fault episodes
typically run in single mode and need a way to clear the buffer
after the records have been collected.
Expose a write-only debugfs file alongside sequencer_state. Writing
any data to it issues the documented clear-blackbox sub-command:
a 2-byte block-write to READ_BLACKBOX (0xDE) with payload
{0xFE, 0x00} (datasheet Rev. D).
The clear is taken under pmbus_lock because READ_BLACKBOX is also
used by adm1266_nvmem_read_blackbox() to walk records one at a
time; both paths run under pmbus_lock so the clear cannot
interleave mid-iteration and corrupt the read sequence.
Signed-off-by: Abdurrahman Hussain <abdurrahman@nexthop.ai>
Assisted-by: Claude-Code:claude-opus-4-7
Assisted-by: sashiko:gemini-3.1-pro-preview
Link: https://lore.kernel.org/r/20260520-adm1266-v5-1-c72ef1fac1ea@nexthop.ai
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
