Skip to contentSkip to conversation

Revert "hwmon: (pmbus) Add regulator supply into macro"

PATCH In review Guenter Roeck 2 participants 2 messages Nov 4, 2022 – Nov 6, 2022 Hardware monitoring

lore
Share & tools
lore

Guenter Roeck

author maintainer
#0 lore raw

PATCH 1/1 Revert "hwmon: (pmbus) Add regulator supply into macro"

This reverts commit 54cc3dbfc10dc3db7cb1cf49aee4477a8398fbde.

Zev Weiss reports that the reverted patch may cause a regulator undercount. Here is his report:

... having regulator-dummy set as a supply on my PMBus regulators (instead of having them as their own top-level regulators without an upstream supply) leads to enable-count underflow errors when disabling them:

    # echo 0 > /sys/bus/platform/devices/efuse01/state
    [  906.094477] regulator-dummy: Underflow of regulator enable count
    [  906.100563] Failed to disable vout: -EINVAL
    [  136.992676] reg-userspace-consumer efuse01: Failed to configure state: -22

Zev reports that reverting the patch fixes the problem. So let's do that for now.

Fixes 54cc3dbfc10d ("hwmon: (pmbus) Add regulator supply into macro")
Cc Marcello Sylvester Bauer <[email protected]>
---
 drivers/hwmon/pmbus/pmbus.h | 1 -
 1 file changed, 1 deletion(-)
drivers/hwmon/pmbus/pmbus.h +0 -1
index 7daaf0caf4d3..10fb17879f8e 100644
@@ -467,7 +467,6 @@ extern const struct regulator_ops pmbus_regulator_ops;
 #define PMBUS_REGULATOR_STEP(_name, _id, _voltages, _step)  \
 	[_id] = {						\
 		.name = (_name # _id),				\
-		.supply_name = "vin",				\
 		.id = (_id),					\
 		.of_match = of_match_ptr(_name # _id),		\
 		.regulators_node = of_match_ptr("regulators"),	\
Signature · 1 line
2.36.2
Acked-by on v1 1/1
#1 lore raw
Quoted 15 lines · Guenter Roeck

This reverts commit 54cc3dbfc10dc3db7cb1cf49aee4477a8398fbde.

Zev Weiss reports that the reverted patch may cause a regulator undercount. Here is his report:

... having regulator-dummy set as a supply on my PMBus regulators (instead of having them as their own top-level regulators without an upstream supply) leads to enable-count underflow errors when disabling them:

     # echo 0 > /sys/bus/platform/devices/efuse01/state
     [  906.094477] regulator-dummy: Underflow of regulator enable count
     [  906.100563] Failed to disable vout: -EINVAL
     [  136.992676] reg-userspace-consumer efuse01: Failed to configure state: -22
Quoted 7 lines

Zev reports that reverting the patch fixes the problem. So let's do that for now.

Fixes 54cc3dbfc10d ("hwmon: (pmbus) Add regulator supply into macro")
Cc Marcello Sylvester Bauer <[email protected]>
Quoted 16 lines
---
  drivers/hwmon/pmbus/pmbus.h | 1 -
  1 file changed, 1 deletion(-)
drivers/hwmon/pmbus/pmbus.h +0 -1
index 7daaf0caf4d3..10fb17879f8e 100644
@@ -467,7 +467,6 @@ extern const struct regulator_ops pmbus_regulator_ops;
  #define PMBUS_REGULATOR_STEP(_name, _id, _voltages, _step)  \
  	[_id] = {						\
  		.name = (_name # _id),				\
-		.supply_name = "vin",				\
  		.id = (_id),					\
  		.of_match = of_match_ptr(_name # _id),		\
  		.regulators_node = of_match_ptr("regulators"),	\