aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon
diff options
context:
space:
mode:
authorAntoniu Miclaus <antoniu.miclaus@analog.com>2023-09-25 15:29:28 +0300
committerGuenter Roeck <linux@roeck-us.net>2023-10-28 09:21:53 -0700
commit6dbd3e041d4b19c9654a630ca8c2933a1f85a7e1 (patch)
tree5a1e8d1499469c811080733aa04c1a6a5bdb2212 /drivers/hwmon
parent7b64906c98fe503338066b97d3ff2dad65debf2b (diff)
downloadlinux-6dbd3e041d4b19c9654a630ca8c2933a1f85a7e1.tar.gz
hwmon: (max31827) handle vref regulator
Add missing implementation for the max31827 supply regulator. This is a hardware required property that is not handled. Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com> Link: https://lore.kernel.org/r/20230925122929.10610-1-antoniu.miclaus@analog.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r--drivers/hwmon/max31827.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/hwmon/max31827.c b/drivers/hwmon/max31827.c
index 614bbf5d25fa4..fd1fed1a797cd 100644
--- a/drivers/hwmon/max31827.c
+++ b/drivers/hwmon/max31827.c
@@ -412,6 +412,10 @@ static int max31827_probe(struct i2c_client *client)
return dev_err_probe(dev, PTR_ERR(st->regmap),
"Failed to allocate regmap.\n");
+ err = devm_regulator_get_enable(dev, "vref");
+ if (err)
+ return dev_err_probe(dev, err, "failed to enable regulator\n");
+
err = max31827_init_client(st);
if (err)
return err;