]> www.infradead.org Git - users/jedix/linux-maple.git/commit
hwmon: (pmbus/core) add wp module param
authorJerome Brunet <jbrunet@baylibre.com>
Mon, 2 Dec 2024 10:28:01 +0000 (11:28 +0100)
committerGuenter Roeck <linux@roeck-us.net>
Sat, 14 Dec 2024 16:00:44 +0000 (08:00 -0800)
commit83bed3c159f44bf2e205875feb8d932bbcf1b656
tree12fb9fbc711d6d8d068efbc4c9361375c09623dd
parentf40452577557caf0e5d0ff182da8479c3d492ac5
hwmon: (pmbus/core) add wp module param

Add a module parameter to force the write protection mode of pmbus chips.

4 protections modes are provided to start with:
* 0: Remove the write protection
* 1: Disable all writes except to the WRITE_PROTECT, OPERATION,
     PAGE, ON_OFF_CONFIG and VOUT_COMMAND commands
* 2: Disable all writes except to the WRITE_PROTECT, OPERATION and
     PAGE commands
* 3: Disable all writes except to the WRITE_PROTECT command

Of course, if the parameter is not provided, the default write protection
status of the pmbus chips is left untouched.

Suggested-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Documentation/hwmon/pmbus-core.rst
drivers/hwmon/pmbus/pmbus_core.c