projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4173a5b
)
hwmon: ina2xx: add optional regulator support
author
Svyatoslav Ryhel
<clamor95@gmail.com>
Fri, 7 Apr 2023 16:05:08 +0000
(19:05 +0300)
committer
Guenter Roeck
<linux@roeck-us.net>
Wed, 19 Apr 2023 14:08:40 +0000
(07:08 -0700)
TI ina2xx sensors according to datasheets have dedicated
vs supplies. Add it for proper work.
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
Link:
https://lore.kernel.org/r/20230407160508.20479-3-clamor95@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/ina2xx.c
patch
|
blob
|
history
diff --git
a/drivers/hwmon/ina2xx.c
b/drivers/hwmon/ina2xx.c
index
00fc703
..
fd50d97
100644
(file)
--- a/
drivers/hwmon/ina2xx.c
+++ b/
drivers/hwmon/ina2xx.c
@@
-656,6
+656,10
@@
static int ina2xx_probe(struct i2c_client *client)
return PTR_ERR(data->regmap);
}
+ ret = devm_regulator_get_enable(dev, "vs");
+ if (ret)
+ return dev_err_probe(dev, ret, "failed to enable vs regulator\n");
+
ret = ina2xx_init(data);
if (ret < 0) {
dev_err(dev, "error configuring the device: %d\n", ret);