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>
This commit is contained in:
Nuno Sá
2025-07-01 15:32:13 +01:00
committed by Lee Jones
parent 3bdbd0858d
commit 4bdef65554

View File

@@ -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 {
@@ -709,6 +710,10 @@ static int adp5585_i2c_probe(struct i2c_client *i2c)
if (IS_ERR(regmap_config))
return PTR_ERR(regmap_config);
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),