mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Revert "hwmon: (pmbus) Add regulator supply into macro"
@ 2022-11-04 23:46 Guenter Roeck
  2022-11-06 16:32 ` Marcello Sylverster Bauer
  0 siblings, 1 reply; 2+ messages in thread
From: Guenter Roeck @ 2022-11-04 23:46 UTC (permalink / raw)
  To: linux-hwmon
  Cc: linux-kernel, Guenter Roeck, Marcello Sylvester Bauer, Zev Weiss

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 <sylv@sylv.io>
Reported-by: Zev Weiss <zev@bewilderbeest.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
 drivers/hwmon/pmbus/pmbus.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/hwmon/pmbus/pmbus.h b/drivers/hwmon/pmbus/pmbus.h
index 7daaf0caf4d3..10fb17879f8e 100644
--- a/drivers/hwmon/pmbus/pmbus.h
+++ b/drivers/hwmon/pmbus/pmbus.h
@@ -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"),	\
-- 
2.36.2


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Revert "hwmon: (pmbus) Add regulator supply into macro"
  2022-11-04 23:46 [PATCH] Revert "hwmon: (pmbus) Add regulator supply into macro" Guenter Roeck
@ 2022-11-06 16:32 ` Marcello Sylverster Bauer
  0 siblings, 0 replies; 2+ messages in thread
From: Marcello Sylverster Bauer @ 2022-11-06 16:32 UTC (permalink / raw)
  To: Guenter Roeck, linux-hwmon; +Cc: linux-kernel, Zev Weiss, naresh.solanki

On 11/5/22 00:46, Guenter Roeck wrote:
> 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 <sylv@sylv.io>
> Reported-by: Zev Weiss <zev@bewilderbeest.net>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Marcello Sylvester Bauer <sylv@sylv.io>
> ---
>   drivers/hwmon/pmbus/pmbus.h | 1 -
>   1 file changed, 1 deletion(-)
>
> diff --git a/drivers/hwmon/pmbus/pmbus.h b/drivers/hwmon/pmbus/pmbus.h
> index 7daaf0caf4d3..10fb17879f8e 100644
> --- a/drivers/hwmon/pmbus/pmbus.h
> +++ b/drivers/hwmon/pmbus/pmbus.h
> @@ -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"),	\

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-11-06 16:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-04 23:46 [PATCH] Revert "hwmon: (pmbus) Add regulator supply into macro" Guenter Roeck
2022-11-06 16:32 ` Marcello Sylverster Bauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®