mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v3] drivers: hwmon: max31827: handle vref regulator
@ 2023-09-25  8:23 Antoniu Miclaus
  2023-09-25 12:14 ` Guenter Roeck
  0 siblings, 1 reply; 2+ messages in thread
From: Antoniu Miclaus @ 2023-09-25  8:23 UTC (permalink / raw)
  To: Daniel Matyas, Jean Delvare, Guenter Roeck, linux-hwmon, linux-kernel
  Cc: Antoniu Miclaus

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 v3:
 - revert also the dev_err_probe output to use "vref" instead of "vdd".
 drivers/hwmon/max31827.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/hwmon/max31827.c b/drivers/hwmon/max31827.c
index 602f4e4f81ff..2a61fb9a408a 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 vref regulator\n");
+
 	err = max31827_init_client(st);
 	if (err)
 		return err;
-- 
2.42.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH v3] drivers: hwmon: max31827: handle vref regulator
  2023-09-25  8:23 [PATCH v3] drivers: hwmon: max31827: handle vref regulator Antoniu Miclaus
@ 2023-09-25 12:14 ` Guenter Roeck
  0 siblings, 0 replies; 2+ messages in thread
From: Guenter Roeck @ 2023-09-25 12:14 UTC (permalink / raw)
  To: Antoniu Miclaus; +Cc: Daniel Matyas, Jean Delvare, linux-hwmon, linux-kernel

On Mon, Sep 25, 2023 at 11:23:33AM +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>
> ---
> changes in v3:
>  - revert also the dev_err_probe output to use "vref" instead of "vdd".
>  drivers/hwmon/max31827.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/hwmon/max31827.c b/drivers/hwmon/max31827.c
> index 602f4e4f81ff..2a61fb9a408a 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 vref regulator\n");

Please drop the "vref". "failed to enable regulator" is sufficient.

Guenter

> +
>  	err = max31827_init_client(st);
>  	if (err)
>  		return err;
> -- 
> 2.42.0
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-09-25 12:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-25  8:23 [PATCH v3] drivers: hwmon: max31827: handle vref regulator Antoniu Miclaus
2023-09-25 12:14 ` Guenter Roeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®