Linux Hardware Monitor development
 help / color / mirror / Atom feed
* [PATCH] hwmon: (ina2xx) make regulator 'vs' support optional
@ 2025-04-03 10:15 Ciprian Costea
  2025-04-03 12:15 ` Guenter Roeck
  0 siblings, 1 reply; 7+ messages in thread
From: Ciprian Costea @ 2025-04-03 10:15 UTC (permalink / raw)
  To: Jean Delvare, Guenter Roeck
  Cc: linux-hwmon, linux-kernel, NXP S32 Linux, imx, Christophe Lizzi,
	Alberto Ruiz, Enric Balletbo, Eric Chanudet,
	Ciprian Marian Costea, Florin Buica

From: Ciprian Marian Costea <ciprianmarian.costea@oss.nxp.com>

S32G2/S32G3 based boards which integrate the ina231 sensor do not have a
dedicated voltage regulator.

Co-developed-by: Florin Buica <florin.buica@nxp.com>
Signed-off-by: Florin Buica <florin.buica@nxp.com>
Signed-off-by: Ciprian Marian Costea <ciprianmarian.costea@oss.nxp.com>
---
 drivers/hwmon/ina2xx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/hwmon/ina2xx.c b/drivers/hwmon/ina2xx.c
index 345fe7db9de9..ab4972f94a8c 100644
--- a/drivers/hwmon/ina2xx.c
+++ b/drivers/hwmon/ina2xx.c
@@ -959,8 +959,8 @@ static int ina2xx_probe(struct i2c_client *client)
 		return PTR_ERR(data->regmap);
 	}
 
-	ret = devm_regulator_get_enable(dev, "vs");
-	if (ret)
+	ret = devm_regulator_get_enable_optional(dev, "vs");
+	if (ret < 0 && ret != -ENODEV)
 		return dev_err_probe(dev, ret, "failed to enable vs regulator\n");
 
 	ret = ina2xx_init(dev, data);
-- 
2.45.2


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

end of thread, other threads:[~2025-04-09  7:03 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-03 10:15 [PATCH] hwmon: (ina2xx) make regulator 'vs' support optional Ciprian Costea
2025-04-03 12:15 ` Guenter Roeck
2025-04-03 14:29   ` Ciprian Marian Costea
2025-04-03 16:06     ` Guenter Roeck
2025-04-04  8:36       ` Ciprian Marian Costea
2025-04-08 18:07         ` Guenter Roeck
2025-04-09  7:03           ` Ciprian Marian Costea

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