* [PATCH v2 0/2] Add power supply for INA2XX
@ 2023-04-07 16:05 Svyatoslav Ryhel
2023-04-07 16:05 ` [PATCH v2 1/2] dt-bindings: hwmon: ina2xx: add supply property Svyatoslav Ryhel
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Svyatoslav Ryhel @ 2023-04-07 16:05 UTC (permalink / raw)
To: Guenter Roeck, Jean Delvare, Rob Herring, Krzysztof Kozlowski,
Svyatoslav Ryhel
Cc: linux-hwmon, devicetree, linux-kernel
TI ina2xx hwmon has vs power supply, add one for correct work.
Svyatoslav Ryhel (2):
dt-bindings: hwmon: ina2xx: add supply property
hwmon: ina2xx: add optional regulator support
Documentation/devicetree/bindings/hwmon/ti,ina2xx.yaml | 5 +++++
drivers/hwmon/ina2xx.c | 4 ++++
2 files changed, 9 insertions(+)
--
2.37.2
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2 1/2] dt-bindings: hwmon: ina2xx: add supply property
2023-04-07 16:05 [PATCH v2 0/2] Add power supply for INA2XX Svyatoslav Ryhel
@ 2023-04-07 16:05 ` Svyatoslav Ryhel
2023-04-12 15:00 ` Rob Herring
2023-04-12 15:18 ` Guenter Roeck
2023-04-07 16:05 ` [PATCH v2 2/2] hwmon: ina2xx: add optional regulator support Svyatoslav Ryhel
2023-04-07 16:22 ` [PATCH v2 0/2] Add power supply for INA2XX Guenter Roeck
2 siblings, 2 replies; 7+ messages in thread
From: Svyatoslav Ryhel @ 2023-04-07 16:05 UTC (permalink / raw)
To: Guenter Roeck, Jean Delvare, Rob Herring, Krzysztof Kozlowski,
Svyatoslav Ryhel
Cc: linux-hwmon, devicetree, linux-kernel
Add vs-supply property.
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
---
Documentation/devicetree/bindings/hwmon/ti,ina2xx.yaml | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/Documentation/devicetree/bindings/hwmon/ti,ina2xx.yaml b/Documentation/devicetree/bindings/hwmon/ti,ina2xx.yaml
index 47af97bb4ced..8648877d2d01 100644
--- a/Documentation/devicetree/bindings/hwmon/ti,ina2xx.yaml
+++ b/Documentation/devicetree/bindings/hwmon/ti,ina2xx.yaml
@@ -57,6 +57,10 @@ properties:
$ref: /schemas/types.yaml#/definitions/uint32
enum: [1, 2, 4, 8]
+ vs-supply:
+ description: phandle to the regulator that provides the VS supply typically
+ in range from 2.7 V to 5.5 V.
+
required:
- compatible
- reg
@@ -73,5 +77,6 @@ examples:
compatible = "ti,ina220";
reg = <0x44>;
shunt-resistor = <1000>;
+ vs-supply = <&vdd_3v0>;
};
};
--
2.37.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v2 2/2] hwmon: ina2xx: add optional regulator support
2023-04-07 16:05 [PATCH v2 0/2] Add power supply for INA2XX Svyatoslav Ryhel
2023-04-07 16:05 ` [PATCH v2 1/2] dt-bindings: hwmon: ina2xx: add supply property Svyatoslav Ryhel
@ 2023-04-07 16:05 ` Svyatoslav Ryhel
2023-04-12 15:19 ` Guenter Roeck
2023-04-07 16:22 ` [PATCH v2 0/2] Add power supply for INA2XX Guenter Roeck
2 siblings, 1 reply; 7+ messages in thread
From: Svyatoslav Ryhel @ 2023-04-07 16:05 UTC (permalink / raw)
To: Guenter Roeck, Jean Delvare, Rob Herring, Krzysztof Kozlowski,
Svyatoslav Ryhel
Cc: linux-hwmon, devicetree, linux-kernel
TI ina2xx sensors according to datasheets have dedicated
vs supplies. Add it for proper work.
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
---
drivers/hwmon/ina2xx.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/hwmon/ina2xx.c b/drivers/hwmon/ina2xx.c
index 00fc70305a89..fd50d9785ccb 100644
--- 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);
--
2.37.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v2 0/2] Add power supply for INA2XX
2023-04-07 16:05 [PATCH v2 0/2] Add power supply for INA2XX Svyatoslav Ryhel
2023-04-07 16:05 ` [PATCH v2 1/2] dt-bindings: hwmon: ina2xx: add supply property Svyatoslav Ryhel
2023-04-07 16:05 ` [PATCH v2 2/2] hwmon: ina2xx: add optional regulator support Svyatoslav Ryhel
@ 2023-04-07 16:22 ` Guenter Roeck
2 siblings, 0 replies; 7+ messages in thread
From: Guenter Roeck @ 2023-04-07 16:22 UTC (permalink / raw)
To: Svyatoslav Ryhel
Cc: Jean Delvare, Rob Herring, Krzysztof Kozlowski, linux-hwmon,
devicetree, linux-kernel
On Fri, Apr 07, 2023 at 07:05:06PM +0300, Svyatoslav Ryhel wrote:
> TI ina2xx hwmon has vs power supply, add one for correct work.
>
> Svyatoslav Ryhel (2):
> dt-bindings: hwmon: ina2xx: add supply property
> hwmon: ina2xx: add optional regulator support
>
Change log missing.
Guenter
> Documentation/devicetree/bindings/hwmon/ti,ina2xx.yaml | 5 +++++
> drivers/hwmon/ina2xx.c | 4 ++++
> 2 files changed, 9 insertions(+)
>
> --
> 2.37.2
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 1/2] dt-bindings: hwmon: ina2xx: add supply property
2023-04-07 16:05 ` [PATCH v2 1/2] dt-bindings: hwmon: ina2xx: add supply property Svyatoslav Ryhel
@ 2023-04-12 15:00 ` Rob Herring
2023-04-12 15:18 ` Guenter Roeck
1 sibling, 0 replies; 7+ messages in thread
From: Rob Herring @ 2023-04-12 15:00 UTC (permalink / raw)
To: Svyatoslav Ryhel
Cc: linux-hwmon, Rob Herring, Jean Delvare, linux-kernel,
Guenter Roeck, devicetree, Krzysztof Kozlowski
On Fri, 07 Apr 2023 19:05:07 +0300, Svyatoslav Ryhel wrote:
> Add vs-supply property.
>
> Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
> ---
> Documentation/devicetree/bindings/hwmon/ti,ina2xx.yaml | 5 +++++
> 1 file changed, 5 insertions(+)
>
Acked-by: Rob Herring <robh@kernel.org>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 1/2] dt-bindings: hwmon: ina2xx: add supply property
2023-04-07 16:05 ` [PATCH v2 1/2] dt-bindings: hwmon: ina2xx: add supply property Svyatoslav Ryhel
2023-04-12 15:00 ` Rob Herring
@ 2023-04-12 15:18 ` Guenter Roeck
1 sibling, 0 replies; 7+ messages in thread
From: Guenter Roeck @ 2023-04-12 15:18 UTC (permalink / raw)
To: Svyatoslav Ryhel
Cc: Jean Delvare, Rob Herring, Krzysztof Kozlowski, linux-hwmon,
devicetree, linux-kernel
On Fri, Apr 07, 2023 at 07:05:07PM +0300, Svyatoslav Ryhel wrote:
> Add vs-supply property.
>
> Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
> Acked-by: Rob Herring <robh@kernel.org>
Applied to hwmon-next.
Thanks,
Guenter
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 2/2] hwmon: ina2xx: add optional regulator support
2023-04-07 16:05 ` [PATCH v2 2/2] hwmon: ina2xx: add optional regulator support Svyatoslav Ryhel
@ 2023-04-12 15:19 ` Guenter Roeck
0 siblings, 0 replies; 7+ messages in thread
From: Guenter Roeck @ 2023-04-12 15:19 UTC (permalink / raw)
To: Svyatoslav Ryhel
Cc: Jean Delvare, Rob Herring, Krzysztof Kozlowski, linux-hwmon,
devicetree, linux-kernel
On Fri, Apr 07, 2023 at 07:05:08PM +0300, Svyatoslav Ryhel wrote:
> TI ina2xx sensors according to datasheets have dedicated
> vs supplies. Add it for proper work.
>
> Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
Applied to hwmon-next.
Thanks,
Guenter
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-04-12 15:19 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-07 16:05 [PATCH v2 0/2] Add power supply for INA2XX Svyatoslav Ryhel
2023-04-07 16:05 ` [PATCH v2 1/2] dt-bindings: hwmon: ina2xx: add supply property Svyatoslav Ryhel
2023-04-12 15:00 ` Rob Herring
2023-04-12 15:18 ` Guenter Roeck
2023-04-07 16:05 ` [PATCH v2 2/2] hwmon: ina2xx: add optional regulator support Svyatoslav Ryhel
2023-04-12 15:19 ` Guenter Roeck
2023-04-07 16:22 ` [PATCH v2 0/2] Add power supply for INA2XX Guenter Roeck
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).