diff mbox series

[v4] drivers: hwmon: max31827: handle vref regulator

Message ID 20230925122929.10610-1-antoniu.miclaus@analog.com (mailing list archive)
State Accepted
Headers show
Series [v4] drivers: hwmon: max31827: handle vref regulator | expand

Commit Message

Antoniu Miclaus Sept. 25, 2023, 12:29 p.m. UTC
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>
---
changes in v4:
 - remove "vref" from the dev_err_probe string.
 drivers/hwmon/max31827.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Guenter Roeck Oct. 26, 2023, 1:17 a.m. UTC | #1
On Mon, Sep 25, 2023 at 03:29:28PM +0300, Antoniu Miclaus wrote:
> 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>
> ---

Applied.

Thanks,
Guenter
diff mbox series

Patch

diff --git a/drivers/hwmon/max31827.c b/drivers/hwmon/max31827.c
index 602f4e4f81ff..0508b020a408 100644
--- a/drivers/hwmon/max31827.c
+++ b/drivers/hwmon/max31827.c
@@ -427,6 +427,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;