diff options
| author | Jerome Brunet <jbrunet@baylibre.com> | 2024-12-02 11:28:00 +0100 |
|---|---|---|
| committer | Guenter Roeck <linux@roeck-us.net> | 2024-12-14 08:00:44 -0800 |
| commit | f40452577557caf0e5d0ff182da8479c3d492ac5 (patch) | |
| tree | 2c0048cb81515bb0bfcaea6a42ef5e02f6630736 /Documentation/hwmon | |
| parent | c26eef895794b31be8a2714b8a1b5d0b8b605bc4 (diff) | |
| download | linux-f40452577557caf0e5d0ff182da8479c3d492ac5.tar.gz | |
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 'Documentation/hwmon')
| -rw-r--r-- | Documentation/hwmon/pmbus-core.rst | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Documentation/hwmon/pmbus-core.rst b/Documentation/hwmon/pmbus-core.rst index 686a00265bf712..0a251960f8910f 100644 --- a/Documentation/hwmon/pmbus-core.rst +++ b/Documentation/hwmon/pmbus-core.rst @@ -312,6 +312,10 @@ currently provides a flags field with four bits used:: #define PMBUS_USE_COEFFICIENTS_CMD BIT(5) + #define PMBUS_OP_PROTECTED BIT(6) + + #define PMBUS_VOUT_PROTECTED BIT(7) + struct pmbus_platform_data { u32 flags; /* Device specific flags */ @@ -373,3 +377,13 @@ PMBUS_USE_COEFFICIENTS_CMD When this flag is set the PMBus core driver will use the COEFFICIENTS register to initialize the coefficients for the direct mode format. + +PMBUS_OP_PROTECTED + +Set if the chip OPERATION command is protected and protection is not +determined by the standard WRITE_PROTECT command. + +PMBUS_VOUT_PROTECTED + +Set if the chip VOUT_COMMAND command is protected and protection is not +determined by the standard WRITE_PROTECT command. |
