lkml.org 
[lkml]   [2023]   [Sep]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2] drivers: hwmon: max31827: handle vref regulator
Date
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 v2:
- use the initial supply name of the supply ("vref") when handling
the regulator.
drivers/hwmon/max31827.c | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/drivers/hwmon/max31827.c b/drivers/hwmon/max31827.c
index 602f4e4f81ff..b47982cc2a30 100644
--- a/drivers/hwmon/max31827.c
+++ b/drivers/hwmon/max31827.c
@@ -427,6 +427,11 @@ 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 vdd regulator\n");
+
err = max31827_init_client(st);
if (err)
return err;
--
2.42.0
\
 
 \ /
  Last update: 2023-09-25 10:19    [W:0.363 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site