From: Nuno Sá Date: Tue, 1 Jul 2025 14:32:13 +0000 (+0100) Subject: mfd: adp5585: Support getting vdd regulator X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4bdef655542d8ed4bf3d57ea06ff128176f4927c;p=thirdparty%2Flinux.git mfd: adp5585: Support getting vdd regulator Make sure we get and enable the VDD supply (if available). Reviewed-by: Lee Jones Signed-off-by: Nuno Sá Link: https://lore.kernel.org/r/20250701-dev-adp5589-fw-v7-18-b1fcfe9e9826@analog.com Signed-off-by: Lee Jones --- diff --git a/drivers/mfd/adp5585.c b/drivers/mfd/adp5585.c index 8f0fd73744261..11a26f6686534 100644 --- a/drivers/mfd/adp5585.c +++ b/drivers/mfd/adp5585.c @@ -17,6 +17,7 @@ #include #include #include +#include #include 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),