]> www.infradead.org Git - users/jedix/linux-maple.git/commit
hwmon: (pmbus/core) improve handling of write protected regulators
authorJerome Brunet <jbrunet@baylibre.com>
Mon, 2 Dec 2024 10:28:00 +0000 (11:28 +0100)
committerGuenter Roeck <linux@roeck-us.net>
Sat, 14 Dec 2024 16:00:44 +0000 (08:00 -0800)
commitf40452577557caf0e5d0ff182da8479c3d492ac5
tree2c0048cb81515bb0bfcaea6a42ef5e02f6630736
parentc26eef895794b31be8a2714b8a1b5d0b8b605bc4
hwmon: (pmbus/core) improve handling of write protected regulators

Writing PMBus protected registers does succeed from the smbus perspective,
even if the write is ignored by the device and a communication fault is
raised. This fault will silently be caught and cleared by pmbus irq if one
has been registered.

This means that the regulator call may return succeed although the
operation was ignored.

With this change, the operation which are not supported will be properly
flagged as such and the regulator framework won't even try to execute them.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
[groeck: Adjust to EXPORT_SYMBOL_NS_GPL API change]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Documentation/hwmon/pmbus-core.rst
drivers/hwmon/pmbus/pmbus.h
drivers/hwmon/pmbus/pmbus_core.c
include/linux/pmbus.h