Devicetree
 help / color / mirror / Atom feed
From: Florian Fainelli <florian.fainelli@broadcom.com>
To: linux-hwmon@vger.kernel.org
Cc: Yuval Raviv <yuval.raviv@broadcom.com>,
	Florian Fainelli <florian.fainelli@broadcom.com>,
	Guenter Roeck <linux@roeck-us.net>, Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND
	FLATTENED DEVICE TREE BINDINGS),
	bcm-kernel-feedback-list@broadcom.com
Subject: [PATCH v2 3/3] hwmon: ina2xx: add support for TI INA236 power monitor
Date: Tue,  1 Dec 2026 09:45:32 -0800	[thread overview]
Message-ID: <20261201174532.3114634-4-florian.fainelli@broadcom.com> (raw)
In-Reply-To: <20261201174532.3114634-1-florian.fainelli@broadcom.com>

From: Yuval Raviv <yuval.raviv@broadcom.com>

The INA236 shares the same electrical characteristics as the already
supported INA232 (calibration value, shunt/bus-voltage/power LSBs,
alert support, update interval), and no code path in the driver needs
to tell the two apart. Add it to the I2C device ID table and OF match
table using the existing ina232 configuration, and list it in the Kconfig
help text and in the driver documentation.

Signed-off-by: Yuval Raviv <yuval.raviv@broadcom.com>
[florian: forward porting, commit message]
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
---
Changes in v2:
- Drop the ina236 enum value and the duplicated ina2xx_config[] entry,
  point the ina236 I2C ID and OF match entries at ina232 instead
- Update the SENSORS_INA2XX Kconfig help text and
  Documentation/hwmon/ina2xx.rst to list the INA236

 Documentation/hwmon/ina2xx.rst | 17 ++++++++++++++---
 drivers/hwmon/Kconfig          |  4 ++--
 drivers/hwmon/ina2xx.c         |  5 +++++
 3 files changed, 21 insertions(+), 5 deletions(-)

diff --git a/Documentation/hwmon/ina2xx.rst b/Documentation/hwmon/ina2xx.rst
index 78b8bbf936a2..c69108e57d23 100644
--- a/Documentation/hwmon/ina2xx.rst
+++ b/Documentation/hwmon/ina2xx.rst
@@ -94,6 +94,16 @@ Supported chips:
 
 	       https://www.ti.com/
 
+  * Texas Instruments INA236
+
+    Prefix: 'ina236'
+
+    Addresses: I2C 0x40 - 0x43 and 0x48 - 0x4b
+
+    Datasheet: Publicly available at the Texas Instruments website
+
+	       https://www.ti.com/
+
 Author: Lothar Felten <lothar.felten@gmail.com>
 
 Description
@@ -109,9 +119,9 @@ 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, INA231, INA232, 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.
+INA230, INA231, INA232, INA234, and INA236 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.
 
 INA260 is a high or low side current and power monitor with integrated shunt
 resistor.
@@ -154,6 +164,7 @@ Additional entries are available for the following chips:
   * ina231
   * ina232
   * ina234
+  * ina236
   * ina260
   * sy24655
 
diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
index 83916de08ea3..eb65fbd16af9 100644
--- a/drivers/hwmon/Kconfig
+++ b/drivers/hwmon/Kconfig
@@ -2456,8 +2456,8 @@ config SENSORS_INA2XX
 	select REGMAP_I2C
 	help
 	  If you say yes here you get support for INA219, INA220, INA226,
-	  INA230, INA231, INA232, INA234, INA260, and SY24655 power monitor
-	  chips.
+	  INA230, INA231, INA232, INA234, INA236, 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 aa5b39a87622..3ddc87986a42 100644
--- a/drivers/hwmon/ina2xx.c
+++ b/drivers/hwmon/ina2xx.c
@@ -1140,6 +1140,7 @@ static const struct i2c_device_id ina2xx_id[] = {
 	{ .name = "ina231", .driver_data = ina226 },
 	{ .name = "ina232", .driver_data = ina232 },
 	{ .name = "ina234", .driver_data = ina234 },
+	{ .name = "ina236", .driver_data = ina232 },
 	{ .name = "ina260", .driver_data = ina260 },
 	{ .name = "sy24655", .driver_data = sy24655 },
 	{ }
@@ -1179,6 +1180,10 @@ static const struct of_device_id __maybe_unused ina2xx_of_match[] = {
 		.compatible = "ti,ina234",
 		.data = (void *)ina234
 	},
+	{
+		.compatible = "ti,ina236",
+		.data = (void *)ina232
+	},
 	{
 		.compatible = "ti,ina260",
 		.data = (void *)ina260
-- 
2.34.1


      parent reply	other threads:[~2026-12-01 17:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-01 17:45 [PATCH v2 0/3] hwmon: ina2xx: add support for TI INA236 Florian Fainelli
2026-12-01 17:45 ` [PATCH v2 1/3] hwmon: ina2xx: document INA232 support Florian Fainelli
2026-12-01 17:45 ` [PATCH v2 2/3] dt-bindings: hwmon: ina2xx: add ti,ina236 compatible Florian Fainelli
2026-12-01 17:45 ` Florian Fainelli [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261201174532.3114634-4-florian.fainelli@broadcom.com \
    --to=florian.fainelli@broadcom.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=robh@kernel.org \
    --cc=yuval.raviv@broadcom.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox