]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
hwmon: (pmbus) Do not set regulators_node for single-channel chips
authorGuenter Roeck <linux@roeck-us.net>
Sat, 22 Mar 2025 14:26:02 +0000 (07:26 -0700)
committerGuenter Roeck <linux@roeck-us.net>
Wed, 23 Apr 2025 14:18:27 +0000 (07:18 -0700)
commit0b3c04c81804197bf0025f3281e4463152f04bf1
treefe3a06c54835441dba74df45694d3f0fc598ae67
parent629cf8f6c23a987201558ffcca5590a60ae3959d
hwmon: (pmbus) Do not set regulators_node for single-channel chips

Single-channel regulators do not need and should not have a "regulators"
node. We can not entirely remove it due to existing bindings. To solve the
problem for new drivers, provide additional macros PMBUS_REGULATOR_ONE_NODE
and PMBUS_REGULATOR_STEP_ONE_NODE and convert existing drivers to use those
macros. The exception is the ir38064 driver because its devicetree files
and its description do not require or use the nested regulators node.

Modify PMBUS_REGULATOR_STEP_ONE and PMBUS_REGULATOR_ONE to set the
regulators_node pointer to NULL.

Cc: Cedricjustine.Encarnacion@analog.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20250322142602.560042-1-linux@roeck-us.net
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/pmbus/lm25066.c
drivers/hwmon/pmbus/mpq7932.c
drivers/hwmon/pmbus/pmbus.h
drivers/hwmon/pmbus/tda38640.c
drivers/hwmon/pmbus/tps25990.c