Re: [PATCH v3 1/5] hwmon: (pmbus/adm1266) add firmware_revision debugfs entry

From: Abdurrahman Hussain

Date: Thu May 14 2026 - 23:35:35 EST


On Thu May 14, 2026 at 6:42 PM PDT, Guenter Roeck wrote:
> On Tue, May 12, 2026 at 11:56:24AM -0700, Abdurrahman Hussain wrote:
>> The ADM1266 reports its firmware revision via the IC_DEVICE_REV
>> manufacturer-specific block-read command (0xAE, datasheet Rev. D
>> Table 80). The first three returned bytes are the firmware
>> major.minor.patch fields. This is useful when correlating field
>> behaviour against ADI release notes; expose it through debugfs
>> alongside the existing sequencer_state entry.
>>
>> The standard PMBus MFR_REVISION (0x9B) register is already exposed
>> by pmbus_core's debugfs auto-create path and reports the
>> manufacturer revision, which is a separate thing from the firmware
>> running on the device.
>>
>> Signed-off-by: Abdurrahman Hussain <abdurrahman@xxxxxxxxxx>
>
> Applied to hwmon-next.
>
> Thanks,
> Guenter

Thanks!

Status of the remaining three patches:

- Patch 2 (clear_blackbox): v5 will extend the pmbus_lock guard
up to adm1266_nvmem_read() to cover the memset/refill/memcpy on
data->dev_mem as one critical section (per an automated review
of v3).

- Patch 3 (powerup_counter): v5 will take pmbus_lock around the
block read, same reason.

- Patch 4 (rtc_class): blocked on your reply to my "drop entirely
or loop in linux-rtc?" question [1]. rtc_class is out for v5
either way.

The same review on patch 2 also surfaced four pre-existing
buffer-bound bugs in adm1266.c (stack overflow in
adm1266_nvmem_read_blackbox(), undersized DMA read buffer in
adm1266_pmbus_block_xfer(), an unbounded record_count loop, and an
out-of-bounds memcpy() in pmbus_block_xfer() using a device-supplied
length with no caller-side size knowledge). None of them are
introduced by this series. My plan is to send them as a separate
"hwmon: (pmbus/adm1266) fix ..." series with Fixes: tags first, then
respin this feature series on top. Let me know if you'd rather have
them folded into v5.

[1] https://lore.kernel.org/all/DII44YQHQRAQ.1BOWF2JZ2RY5N@xxxxxxxxxx/

Thanks,
Abdurrahman