]> git.ipfire.org Git - thirdparty/linux.git/commit
hwmon: (pmbus) Mark lowest/average/highest/rated attributes as read-only
authorGuenter Roeck <linux@roeck-us.net>
Tue, 24 Mar 2026 23:41:07 +0000 (16:41 -0700)
committerGuenter Roeck <linux@roeck-us.net>
Wed, 25 Mar 2026 20:32:24 +0000 (13:32 -0700)
commit805a5bd1c3f307d45ae4e9cf8915ef16d585a54a
tree762f35fb1690afaf0254fb6b12373cc4b51ca392
parentbf08749a6abb6d1959bfdc0edc32c640df407558
hwmon: (pmbus) Mark lowest/average/highest/rated attributes as read-only

Writing those attributes is not supported, so mark them as read-only.

Prior to this change, attempts to write into these attributes returned
an error.

Mark boolean fields in struct pmbus_limit_attr and in struct
pmbus_sensor_attr as bit fields to reduce configuration data size.
The data is scanned only while probing, so performance is not a concern.

Fixes: 6f183d33a02e6 ("hwmon: (pmbus) Add support for peak attributes")
Reviewed-by: Sanman Pradhan <psanman@juniper.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/pmbus/pmbus_core.c