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, ®map_config);
if (IS_ERR(adp5585->regmap))
return dev_err_probe(&i2c->dev, PTR_ERR(adp5585->regmap),
--
2.49.0
--
Lee Jones [李琼斯]