Thread (45 messages) 45 messages, 3 authors, 2025-06-13

Re: [PATCH v4 18/20] mfd: adp5585: support getting vdd regulator

From: Lee Jones <lee@kernel.org>
Date: 2025-06-12 15:17:38
Also in: linux-gpio, linux-input, linux-pwm

On Wed, 21 May 2025, Nuno Sá via B4 Relay wrote:
From: Nuno Sá <nuno.sa@analog.com>

Make sure we get and enable the VDD supply (if available).

Signed-off-by: Nuno Sá <nuno.sa@analog.com>
---
 drivers/mfd/adp5585.c | 5 +++++
 1 file changed, 5 insertions(+)
Reviewed-by: Lee Jones <lee@kernel.org>
quoted hunk ↗ jump to hunk
diff --git a/drivers/mfd/adp5585.c b/drivers/mfd/adp5585.c
index 122e2c95385f8d5cbd7839db78dda77ad7ba4ae4..e8b9a0ef4ee654ac1abc4042152fe0933f1d9f0d 100644
--- a/drivers/mfd/adp5585.c
+++ b/drivers/mfd/adp5585.c
@@ -17,6 +17,7 @@
 #include <linux/mod_devicetable.h>
 #include <linux/module.h>
 #include <linux/regmap.h>
+#include <linux/regulator/consumer.h>
 #include <linux/types.h>
 
 enum {
@@ -713,6 +714,10 @@ static int adp5585_i2c_probe(struct i2c_client *i2c)
 	if (ret)
 		return ret;
 
+	ret = devm_regulator_get_enable(&i2c->dev, "vdd");
+	if (ret)
+		return ret;
+
 	adp5585->regmap = devm_regmap_init_i2c(i2c, &regmap_config);
 	if (IS_ERR(adp5585->regmap))
 		return dev_err_probe(&i2c->dev, PTR_ERR(adp5585->regmap),
-- 
2.49.0
-- 
Lee Jones [李琼斯]
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help