Skip to content

Commit 4bdef65

Browse files
nunojsalag-linaro
authored andcommitted
mfd: adp5585: Support getting vdd regulator
Make sure we get and enable the VDD supply (if available). Reviewed-by: Lee Jones <lee@kernel.org> Signed-off-by: Nuno Sá <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20250701-dev-adp5589-fw-v7-18-b1fcfe9e9826@analog.com Signed-off-by: Lee Jones <lee@kernel.org>
1 parent 3bdbd08 commit 4bdef65

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

drivers/mfd/adp5585.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include <linux/mod_devicetable.h>
1818
#include <linux/module.h>
1919
#include <linux/regmap.h>
20+
#include <linux/regulator/consumer.h>
2021
#include <linux/types.h>
2122

2223
enum {
@@ -709,6 +710,10 @@ static int adp5585_i2c_probe(struct i2c_client *i2c)
709710
if (IS_ERR(regmap_config))
710711
return PTR_ERR(regmap_config);
711712

713+
ret = devm_regulator_get_enable(&i2c->dev, "vdd");
714+
if (ret)
715+
return ret;
716+
712717
adp5585->regmap = devm_regmap_init_i2c(i2c, regmap_config);
713718
if (IS_ERR(adp5585->regmap))
714719
return dev_err_probe(&i2c->dev, PTR_ERR(adp5585->regmap),

0 commit comments

Comments
 (0)