Skip to content

Commit fe8429a

Browse files
andredbroonie
authored andcommitted
regulator: s2mps11: more descriptive gpio consumer name
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. Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Signed-off-by: André Draszik <andre.draszik@linaro.org> Link: https://patch.msgid.link/20260122-s2mpg1x-regulators-v7-20-3b1f9831fffd@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 979dd8d commit fe8429a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

drivers/regulator/s2mps11.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,8 @@ static int s2mps11_of_parse_gpiod(struct device_node *np,
362362
ena_gpiod = fwnode_gpiod_get_index(of_fwnode_handle(np), con_id, 0,
363363
GPIOD_OUT_HIGH |
364364
GPIOD_FLAGS_BIT_NONEXCLUSIVE,
365-
"s2mps11-regulator");
365+
desc->name
366+
? : dev_name(config->dev));
366367
if (IS_ERR(ena_gpiod)) {
367368
ret = PTR_ERR(ena_gpiod);
368369

0 commit comments

Comments
 (0)