* [PATCH V3 1/3] dt-bindings: hwmon: ti,ina2xx: Add INA234 device
2026-02-20 11:20 [PATCH V3 0/3] hwmon: INA234 Ian Ray
@ 2026-02-20 11:20 ` Ian Ray
2026-02-21 23:03 ` Guenter Roeck
2026-02-20 11:20 ` [PATCH V3 2/3] hwmon: (ina2xx) Make it easier to add more devices Ian Ray
2026-02-20 11:20 ` [PATCH V3 3/3] hwmon: (ina2xx) Add support for INA234 Ian Ray
2 siblings, 1 reply; 8+ messages in thread
From: Ian Ray @ 2026-02-20 11:20 UTC (permalink / raw)
To: Guenter Roeck, Jonathan Corbet, Shuah Khan, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: Ian Ray, Bence Csókás, Tomaž Zaman, linux-hwmon,
linux-doc, linux-kernel, Krzysztof Kozlowski, devicetree,
Krzysztof Kozlowski
Add a compatible string for the INA234 device, which is like INA226 but
has different scaling.
Note that the device tree compatible must be different since the driver
uses the compatible to configure the scaling.
Signed-off-by: Ian Ray <ian.ray@gehealthcare.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> # v1
---
Documentation/devicetree/bindings/hwmon/ti,ina2xx.yaml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Documentation/devicetree/bindings/hwmon/ti,ina2xx.yaml b/Documentation/devicetree/bindings/hwmon/ti,ina2xx.yaml
index d3cde8936686..009d78b30859 100644
--- a/Documentation/devicetree/bindings/hwmon/ti,ina2xx.yaml
+++ b/Documentation/devicetree/bindings/hwmon/ti,ina2xx.yaml
@@ -29,6 +29,7 @@ properties:
- ti,ina230
- ti,ina231
- ti,ina233
+ - ti,ina234
- ti,ina237
- ti,ina238
- ti,ina260
@@ -113,6 +114,7 @@ allOf:
- ti,ina228
- ti,ina230
- ti,ina231
+ - ti,ina234
- ti,ina237
- ti,ina238
- ti,ina260
@@ -134,6 +136,7 @@ allOf:
- ti,ina226
- ti,ina230
- ti,ina231
+ - ti,ina234
- ti,ina260
- ti,ina700
- ti,ina780
--
2.49.0
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH V3 1/3] dt-bindings: hwmon: ti,ina2xx: Add INA234 device
2026-02-20 11:20 ` [PATCH V3 1/3] dt-bindings: hwmon: ti,ina2xx: Add INA234 device Ian Ray
@ 2026-02-21 23:03 ` Guenter Roeck
0 siblings, 0 replies; 8+ messages in thread
From: Guenter Roeck @ 2026-02-21 23:03 UTC (permalink / raw)
To: Ian Ray
Cc: Jonathan Corbet, Shuah Khan, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Bence Csókás, Tomaž Zaman,
linux-hwmon, linux-doc, linux-kernel, Krzysztof Kozlowski,
devicetree, Krzysztof Kozlowski
On Fri, Feb 20, 2026 at 01:20:20PM +0200, Ian Ray wrote:
> Add a compatible string for the INA234 device, which is like INA226 but
> has different scaling.
>
> Note that the device tree compatible must be different since the driver
> uses the compatible to configure the scaling.
>
> Signed-off-by: Ian Ray <ian.ray@gehealthcare.com>
> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> # v1
Applied.
Thanks,
Guenter
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH V3 2/3] hwmon: (ina2xx) Make it easier to add more devices
2026-02-20 11:20 [PATCH V3 0/3] hwmon: INA234 Ian Ray
2026-02-20 11:20 ` [PATCH V3 1/3] dt-bindings: hwmon: ti,ina2xx: Add INA234 device Ian Ray
@ 2026-02-20 11:20 ` Ian Ray
2026-02-21 23:03 ` Guenter Roeck
2026-02-20 11:20 ` [PATCH V3 3/3] hwmon: (ina2xx) Add support for INA234 Ian Ray
2 siblings, 1 reply; 8+ messages in thread
From: Ian Ray @ 2026-02-20 11:20 UTC (permalink / raw)
To: Guenter Roeck, Jonathan Corbet, Shuah Khan, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: Ian Ray, Bence Csókás, Tomaž Zaman, linux-hwmon,
linux-doc, linux-kernel, Krzysztof Kozlowski, devicetree
* Make sysfs entries documentation easier to maintain.
* Use multi-line enum.
* Correct "has_power_average" comment.
Create a new "has_update_interval" member for chips which support
averaging.
Signed-off-by: Ian Ray <ian.ray@gehealthcare.com>
Reviewed-by: Bence Csókás <bence98@sch.bme.hu> # v2
---
Documentation/hwmon/ina2xx.rst | 12 ++++++++++--
drivers/hwmon/ina2xx.c | 18 ++++++++++++++----
2 files changed, 24 insertions(+), 6 deletions(-)
diff --git a/Documentation/hwmon/ina2xx.rst b/Documentation/hwmon/ina2xx.rst
index a3860aae444c..a4ddf4bd2b08 100644
--- a/Documentation/hwmon/ina2xx.rst
+++ b/Documentation/hwmon/ina2xx.rst
@@ -124,8 +124,16 @@ power1_input Power(uW) measurement channel
shunt_resistor Shunt resistance(uOhm) channel (not for ina260)
======================= ===============================================
-Additional sysfs entries for ina226, ina230, ina231, ina260, and sy24655
-------------------------------------------------------------------------
+Additional sysfs entries
+------------------------
+
+Additional entries are available for the following chips:
+
+ * ina226
+ * ina230
+ * ina231
+ * ina260
+ * sy24655
======================= ====================================================
curr1_lcrit Critical low current
diff --git a/drivers/hwmon/ina2xx.c b/drivers/hwmon/ina2xx.c
index 69ac0468dee4..cd0d39ee7616 100644
--- a/drivers/hwmon/ina2xx.c
+++ b/drivers/hwmon/ina2xx.c
@@ -135,13 +135,19 @@ static const struct regmap_config ina2xx_regmap_config = {
.writeable_reg = ina2xx_writeable_reg,
};
-enum ina2xx_ids { ina219, ina226, ina260, sy24655 };
+enum ina2xx_ids {
+ ina219,
+ ina226,
+ ina260,
+ sy24655
+};
struct ina2xx_config {
u16 config_default;
bool has_alerts; /* chip supports alerts and limits */
bool has_ishunt; /* chip has internal shunt resistor */
- bool has_power_average; /* chip has internal shunt resistor */
+ bool has_power_average; /* chip supports average power */
+ bool has_update_interval;
int calibration_value;
int shunt_div;
int bus_voltage_shift;
@@ -171,6 +177,7 @@ static const struct ina2xx_config ina2xx_config[] = {
.has_alerts = false,
.has_ishunt = false,
.has_power_average = false,
+ .has_update_interval = false,
},
[ina226] = {
.config_default = INA226_CONFIG_DEFAULT,
@@ -182,6 +189,7 @@ static const struct ina2xx_config ina2xx_config[] = {
.has_alerts = true,
.has_ishunt = false,
.has_power_average = false,
+ .has_update_interval = true,
},
[ina260] = {
.config_default = INA260_CONFIG_DEFAULT,
@@ -192,6 +200,7 @@ static const struct ina2xx_config ina2xx_config[] = {
.has_alerts = true,
.has_ishunt = true,
.has_power_average = false,
+ .has_update_interval = true,
},
[sy24655] = {
.config_default = SY24655_CONFIG_DEFAULT,
@@ -203,6 +212,7 @@ static const struct ina2xx_config ina2xx_config[] = {
.has_alerts = true,
.has_ishunt = false,
.has_power_average = true,
+ .has_update_interval = false,
},
};
@@ -706,7 +716,7 @@ static umode_t ina2xx_is_visible(const void *_data, enum hwmon_sensor_types type
const struct ina2xx_data *data = _data;
bool has_alerts = data->config->has_alerts;
bool has_power_average = data->config->has_power_average;
- enum ina2xx_ids chip = data->chip;
+ bool has_update_interval = data->config->has_update_interval;
switch (type) {
case hwmon_in:
@@ -768,7 +778,7 @@ static umode_t ina2xx_is_visible(const void *_data, enum hwmon_sensor_types type
case hwmon_chip:
switch (attr) {
case hwmon_chip_update_interval:
- if (chip == ina226 || chip == ina260)
+ if (has_update_interval)
return 0644;
break;
default:
--
2.49.0
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH V3 2/3] hwmon: (ina2xx) Make it easier to add more devices
2026-02-20 11:20 ` [PATCH V3 2/3] hwmon: (ina2xx) Make it easier to add more devices Ian Ray
@ 2026-02-21 23:03 ` Guenter Roeck
0 siblings, 0 replies; 8+ messages in thread
From: Guenter Roeck @ 2026-02-21 23:03 UTC (permalink / raw)
To: Ian Ray
Cc: Jonathan Corbet, Shuah Khan, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Bence Csókás, Tomaž Zaman,
linux-hwmon, linux-doc, linux-kernel, Krzysztof Kozlowski,
devicetree
On Fri, Feb 20, 2026 at 01:20:21PM +0200, Ian Ray wrote:
> * Make sysfs entries documentation easier to maintain.
> * Use multi-line enum.
> * Correct "has_power_average" comment.
>
> Create a new "has_update_interval" member for chips which support
> averaging.
>
> Signed-off-by: Ian Ray <ian.ray@gehealthcare.com>
> Reviewed-by: Bence Csókás <bence98@sch.bme.hu> # v2
Applied.
Thanks,
Guenter
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH V3 3/3] hwmon: (ina2xx) Add support for INA234
2026-02-20 11:20 [PATCH V3 0/3] hwmon: INA234 Ian Ray
2026-02-20 11:20 ` [PATCH V3 1/3] dt-bindings: hwmon: ti,ina2xx: Add INA234 device Ian Ray
2026-02-20 11:20 ` [PATCH V3 2/3] hwmon: (ina2xx) Make it easier to add more devices Ian Ray
@ 2026-02-20 11:20 ` Ian Ray
2026-02-21 23:04 ` Guenter Roeck
2026-03-02 14:55 ` Jonas Rebmann
2 siblings, 2 replies; 8+ messages in thread
From: Ian Ray @ 2026-02-20 11:20 UTC (permalink / raw)
To: Guenter Roeck, Jonathan Corbet, Shuah Khan, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: Ian Ray, Bence Csókás, Tomaž Zaman, linux-hwmon,
linux-doc, linux-kernel, Krzysztof Kozlowski, devicetree
INA234 is register compatible to INA226 (excepting manufacturer and die
or device id registers) but has different scaling.
Signed-off-by: Ian Ray <ian.ray@gehealthcare.com>
Reviewed-by: Bence Csókás <bence98@sch.bme.hu> # v2
---
Documentation/hwmon/ina2xx.rst | 13 ++++++++++++-
drivers/hwmon/Kconfig | 2 +-
drivers/hwmon/ina2xx.c | 18 ++++++++++++++++++
3 files changed, 31 insertions(+), 2 deletions(-)
diff --git a/Documentation/hwmon/ina2xx.rst b/Documentation/hwmon/ina2xx.rst
index a4ddf4bd2b08..d64e7af46a12 100644
--- a/Documentation/hwmon/ina2xx.rst
+++ b/Documentation/hwmon/ina2xx.rst
@@ -74,6 +74,16 @@ Supported chips:
https://us1.silergy.com/
+ * Texas Instruments INA234
+
+ Prefix: 'ina234'
+
+ Addresses: I2C 0x40 - 0x43
+
+ Datasheet: Publicly available at the Texas Instruments website
+
+ https://www.ti.com/
+
Author: Lothar Felten <lothar.felten@gmail.com>
Description
@@ -89,7 +99,7 @@ interface. The INA220 monitors both shunt drop and supply voltage.
The INA226 is a current shunt and power monitor with an I2C interface.
The INA226 monitors both a shunt voltage drop and bus supply voltage.
-INA230 and INA231 are high or low side current shunt and power monitors
+INA230, INA231, and INA234 are high or low side current shunt and power monitors
with an I2C interface. The chips monitor both a shunt voltage drop and
bus supply voltage.
@@ -132,6 +142,7 @@ Additional entries are available for the following chips:
* ina226
* ina230
* ina231
+ * ina234
* ina260
* sy24655
diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
index 41c381764c2b..6aa8a89f4747 100644
--- a/drivers/hwmon/Kconfig
+++ b/drivers/hwmon/Kconfig
@@ -2284,7 +2284,7 @@ config SENSORS_INA2XX
select REGMAP_I2C
help
If you say yes here you get support for INA219, INA220, INA226,
- INA230, INA231, INA260, and SY24655 power monitor chips.
+ INA230, INA231, INA234, INA260, and SY24655 power monitor chips.
The INA2xx driver is configured for the default configuration of
the part as described in the datasheet.
diff --git a/drivers/hwmon/ina2xx.c b/drivers/hwmon/ina2xx.c
index cd0d39ee7616..836e15a5a780 100644
--- a/drivers/hwmon/ina2xx.c
+++ b/drivers/hwmon/ina2xx.c
@@ -138,6 +138,7 @@ static const struct regmap_config ina2xx_regmap_config = {
enum ina2xx_ids {
ina219,
ina226,
+ ina234,
ina260,
sy24655
};
@@ -191,6 +192,18 @@ static const struct ina2xx_config ina2xx_config[] = {
.has_power_average = false,
.has_update_interval = true,
},
+ [ina234] = {
+ .config_default = INA226_CONFIG_DEFAULT,
+ .calibration_value = 2048,
+ .shunt_div = 400, /* 2.5 µV/LSB raw ADC reading from INA2XX_SHUNT_VOLTAGE */
+ .bus_voltage_shift = 4,
+ .bus_voltage_lsb = 25600,
+ .power_lsb_factor = 32,
+ .has_alerts = true,
+ .has_ishunt = false,
+ .has_power_average = false,
+ .has_update_interval = true,
+ },
[ina260] = {
.config_default = INA260_CONFIG_DEFAULT,
.shunt_div = 400,
@@ -992,6 +1005,7 @@ static const struct i2c_device_id ina2xx_id[] = {
{ "ina226", ina226 },
{ "ina230", ina226 },
{ "ina231", ina226 },
+ { "ina234", ina234 },
{ "ina260", ina260 },
{ "sy24655", sy24655 },
{ }
@@ -1023,6 +1037,10 @@ static const struct of_device_id __maybe_unused ina2xx_of_match[] = {
.compatible = "ti,ina231",
.data = (void *)ina226
},
+ {
+ .compatible = "ti,ina234",
+ .data = (void *)ina234
+ },
{
.compatible = "ti,ina260",
.data = (void *)ina260
--
2.49.0
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH V3 3/3] hwmon: (ina2xx) Add support for INA234
2026-02-20 11:20 ` [PATCH V3 3/3] hwmon: (ina2xx) Add support for INA234 Ian Ray
@ 2026-02-21 23:04 ` Guenter Roeck
2026-03-02 14:55 ` Jonas Rebmann
1 sibling, 0 replies; 8+ messages in thread
From: Guenter Roeck @ 2026-02-21 23:04 UTC (permalink / raw)
To: Ian Ray
Cc: Jonathan Corbet, Shuah Khan, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Bence Csókás, Tomaž Zaman,
linux-hwmon, linux-doc, linux-kernel, Krzysztof Kozlowski,
devicetree
On Fri, Feb 20, 2026 at 01:20:22PM +0200, Ian Ray wrote:
> INA234 is register compatible to INA226 (excepting manufacturer and die
> or device id registers) but has different scaling.
>
> Signed-off-by: Ian Ray <ian.ray@gehealthcare.com>
> Reviewed-by: Bence Csókás <bence98@sch.bme.hu> # v2
Applied.
Thanks,
Guenter
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH V3 3/3] hwmon: (ina2xx) Add support for INA234
2026-02-20 11:20 ` [PATCH V3 3/3] hwmon: (ina2xx) Add support for INA234 Ian Ray
2026-02-21 23:04 ` Guenter Roeck
@ 2026-03-02 14:55 ` Jonas Rebmann
1 sibling, 0 replies; 8+ messages in thread
From: Jonas Rebmann @ 2026-03-02 14:55 UTC (permalink / raw)
To: Ian Ray, Guenter Roeck, Jonathan Corbet, Shuah Khan, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: Bence Csókás, Tomaž Zaman, linux-hwmon, linux-doc,
linux-kernel, Krzysztof Kozlowski, devicetree
On 2026-02-20 12:20, Ian Ray wrote:
> INA234 is register compatible to INA226 (excepting manufacturer and die
> or device id registers) but has different scaling.
>
> Signed-off-by: Ian Ray <ian.ray@gehealthcare.com>
> Reviewed-by: Bence Csókás <bence98@sch.bme.hu> # v2
> ---
Hi Ian,
You were faster to mainline your take on the ina234 support :)
Tested-by: Jonas Rebmann <jre@pengutronix.de>
--
Pengutronix e.K. | Jonas Rebmann |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |
^ permalink raw reply [flat|nested] 8+ messages in thread