From: Florian Fainelli <florian.fainelli@broadcom.com>
To: sashiko-reviews@lists.linux.dev
Cc: "open list:HARDWARE MONITORING" <linux-hwmon@vger.kernel.org>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@vger.kernel.org>,
robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH 2/2] hwmon: ina2xx: add support for TI INA236 power monitor
Date: Mon, 30 Nov 2026 14:54:03 -0800 [thread overview]
Message-ID: <92df1cda-a63c-41d2-b98a-a6b2ee170fc1@broadcom.com> (raw)
In-Reply-To: <sashiko-outbox-242124@kernel.org>
On 11/30/26 14:38, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 2 potential
> issues to consider:
> - [Low] hwmon: ina2xx: redundant ina236 enum and duplicate ina2xx_config
> entry
> - [Low] hwmon: ina2xx: missing INA236 in Documentation/hwmon/ina2xx.rst
> and Kconfig
> --
>
> commit 351424d3ad21da9a6be43b706bb618d413e818b0
> Author: Yuval Raviv <yuval.raviv@broadcom.com>
>
> hwmon: ina2xx: add support for TI INA236 power monitor
>
> This commit adds support for the Texas Instruments INA236 power monitor to
> the ina2xx driver by adding an enum value, configuration table entry, and
> I2C and OF match table entries.
>
>> diff --git a/drivers/hwmon/ina2xx.c b/drivers/hwmon/ina2xx.c
>> index 19b35f3bf3a3c..3cacf07f805d5 100644
>> --- a/drivers/hwmon/ina2xx.c
>> +++ b/drivers/hwmon/ina2xx.c
>> @@ -126,6 +126,7 @@ enum ina2xx_ids {
>> ina226,
>> ina232,
>> ina234,
>> + ina236,
>> ina260,
>> sy24655
>> };
>> @@ -225,6 +226,21 @@ static const struct ina2xx_config ina2xx_config[] = {
>> .current_shift = 0,
>> .has_update_interval = true,
>> },
>> + [ina236] = {
>> + /* same electrical characteristics as ina232 */
>> + .config_default = INA226_CONFIG_DEFAULT,
>> + .calibration_value = 2048,
>> + .shunt_div = 400,
>> + .shunt_voltage_shift = 0,
>> + .bus_voltage_shift = 0,
>> + .bus_voltage_lsb = 1600,
>> + .power_lsb_factor = 32,
>> + .has_alerts = true,
>> + .has_ishunt = false,
>> + .has_power_average = false,
>> + .current_shift = 0,
>> + .has_update_interval = true,
>> + },
>> [ina260] = {
>> .config_default = INA260_CONFIG_DEFAULT,
>> .shunt_div = 400,
>
> [Severity: Low]
> Since INA236 uses the exact same configuration as INA232 and no code path
> in the driver distinguishes between them, could the ina236 entries in
> ina2xx_id[] and ina2xx_of_match[] point directly to ina232 instead of
> adding a separate enum value and duplicating ina2xx_config[ina232]? Other
> compatible chips in this driver (ina220 using ina219, and ina230/ina231
> using ina226) share the existing enum ID directly.
Yes, will do.
>
>> @@ -1140,6 +1156,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 = ina236 },
>> { .name = "ina260", .driver_data = ina260 },
>> { .name = "sy24655", .driver_data = sy24655 },
>> { }
>
> [Severity: Low]
> Should Documentation/hwmon/ina2xx.rst and the SENSORS_INA2XX help text in
> drivers/hwmon/Kconfig also be updated to list INA236 among the supported
> chips, per Documentation/hwmon/submitting-patches.rst?
Yes both ina2xx.rst and Kconfig should be amended to include support for
the INA236. In fact, INA232 is not documented consistently everywhere so
I will start with a patch adding the missing entry and then add INA236
on top.
--
Florian
next prev parent reply other threads:[~2026-11-30 22:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-30 22:33 [PATCH 0/2] hwmon: TI INA236 support Florian Fainelli
2026-11-30 22:33 ` [PATCH 1/2] dt-bindings: hwmon: ina2xx: add ti,ina236 compatible Florian Fainelli
2026-11-30 22:33 ` [PATCH 2/2] hwmon: ina2xx: add support for TI INA236 power monitor Florian Fainelli
2026-11-30 22:38 ` sashiko-bot
2026-11-30 22:54 ` Florian Fainelli [this message]
2026-11-30 23:02 ` Guenter Roeck
2026-11-30 22:38 ` [PATCH 0/2] hwmon: TI INA236 support sashiko-bot
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=92df1cda-a63c-41d2-b98a-a6b2ee170fc1@broadcom.com \
--to=florian.fainelli@broadcom.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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