diff options
| author | Jerome Brunet <jbrunet@baylibre.com> | 2024-12-02 13:28:00 +0300 |
|---|---|---|
| committer | Guenter Roeck <linux@roeck-us.net> | 2024-12-14 19:00:44 +0300 |
| commit | f40452577557caf0e5d0ff182da8479c3d492ac5 (patch) | |
| tree | 2c0048cb81515bb0bfcaea6a42ef5e02f6630736 /include | |
| parent | c26eef895794b31be8a2714b8a1b5d0b8b605bc4 (diff) | |
| download | linux-f40452577557caf0e5d0ff182da8479c3d492ac5.tar.xz | |
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>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/pmbus.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/pmbus.h b/include/linux/pmbus.h index fa9f08164c36..884040e1383b 100644 --- a/include/linux/pmbus.h +++ b/include/linux/pmbus.h @@ -73,6 +73,20 @@ */ #define PMBUS_USE_COEFFICIENTS_CMD BIT(5) +/* + * PMBUS_OP_PROTECTED + * Set if the chip OPERATION command is protected and protection is not + * determined by the standard WRITE_PROTECT command. + */ +#define PMBUS_OP_PROTECTED BIT(6) + +/* + * PMBUS_VOUT_PROTECTED + * Set if the chip VOUT_COMMAND command is protected and protection is not + * determined by the standard WRITE_PROTECT command. + */ +#define PMBUS_VOUT_PROTECTED BIT(7) + struct pmbus_platform_data { u32 flags; /* Device specific flags */ |
