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>
This commit is contained in:
Antoniu Miclaus 2023-09-25 15:29:28 +03:00 committed by Guenter Roeck
parent 7b64906c98
commit 6dbd3e041d
1 changed files with 4 additions and 0 deletions

View File

@ -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;