aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNuno Sá <[email protected]>2025-07-01 14:32:13 +0000
committerLee Jones <[email protected]>2025-07-01 20:50:51 +0000
commit4bdef655542d8ed4bf3d57ea06ff128176f4927c (patch)
tree04fe08149f081b621fb9331799c33da99c53d2a2
parentInput: adp5589: remove the driver (diff)
downloadkernel-4bdef655542d8ed4bf3d57ea06ff128176f4927c.tar.gz
kernel-4bdef655542d8ed4bf3d57ea06ff128176f4927c.zip
mfd: adp5585: Support getting vdd regulator
Make sure we get and enable the VDD supply (if available). Reviewed-by: Lee Jones <[email protected]> Signed-off-by: Nuno Sá <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lee Jones <[email protected]>
-rw-r--r--drivers/mfd/adp5585.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/mfd/adp5585.c b/drivers/mfd/adp5585.c
index 8f0fd7374426..11a26f668653 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 {
@@ -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),