diff mbox series

[v2,17/17] regulator: s2mps11: more descriptive gpio consumer name

Message ID 20250606-s2mpg1x-regulators-v2-17-b03feffd2621@linaro.org
State New
Headers show
Series Samsung S2MPG10 regulator and S2MPG11 PMIC drivers | expand

Commit Message

André Draszik June 6, 2025, 3:03 p.m. UTC
Currently, GPIOs claimed by this driver for external rail control
all show up with "s2mps11-regulator" as consumer, which is not
very informative.

Switch to using the regulator name via desc->name instead, using the
device name as fallback.

Signed-off-by: André Draszik <andre.draszik@linaro.org>
---
 drivers/regulator/s2mps11.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/regulator/s2mps11.c b/drivers/regulator/s2mps11.c
index d46b743d4c6f5e745e101d054581a74e992fbaea..dcb813461e6d68505c21aa7deabfd03b450e1d3c 100644
--- a/drivers/regulator/s2mps11.c
+++ b/drivers/regulator/s2mps11.c
@@ -357,7 +357,8 @@  static int s2mps11_of_parse_gpiod(struct device_node *np,
 					   "samsung,ext-control", 0,
 					   GPIOD_OUT_HIGH |
 					   GPIOD_FLAGS_BIT_NONEXCLUSIVE,
-					   "s2mps11-regulator");
+					   desc->name
+					   ? : dev_name(config->dev));
 	if (IS_ERR(ena_gpiod)) {
 		ret = PTR_ERR(ena_gpiod);