Skip to contentSkip to conversation

A backport request for SY24655 driver in INA2XX driver for Linux kernel 6.6.

PATCH In review Rush Chen 2 participants 3 messages Feb 6, 2025 – Feb 7, 2025

Subsystems (2)
lore
Share & tools
lore

Rush Chen

author
#0 lore raw

PATCH 1/1 A backport request for SY24655 driver in INA2XX driver for Linux kernel 6.6.

From: Rush Chen <[email protected]>

Summary:
The driver SY24655 has been supported by INA2XX driver, since Linux kernel version 6.13.

Issue a backport request to Linux kernel 6.6.

---
 Documentation/hwmon/ina2xx.rst |  50 +-
 drivers/hwmon/Kconfig          |   2 +-
 drivers/hwmon/ina2xx.c         | 988 ++++++++++++++++++++++-----------
 3 files changed, 695 insertions(+), 345 deletions(-)
Documentation/hwmon/ina2xx.rst +45 -5
index 27d2e39bc8ac..a3860aae444c 100644
@@ -53,6 +53,27 @@ Supported chips:
 
               https://www.ti.com/
 
+  * Texas Instruments INA260
+
+    Prefix: 'ina260'
+
+    Addresses: I2C 0x40 - 0x4f
+
+    Datasheet: Publicly available at the Texas Instruments website
+
+              https://www.ti.com/
+
+  * Silergy SY24655
+
+    Prefix: 'sy24655'
+
+    Addresses: I2C 0x40 - 0x4f
+
+    Datasheet: Publicly available at the Silergy website
+
+              https://us1.silergy.com/
+
+
 Author: Lothar Felten <[email protected]>
 
 Description
@@ -72,6 +93,14 @@ INA230 and INA231 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.
+
+The SY24655 is a high- and low-side current shunt and power monitor with an I2C
+interface. The SY24655 supports both shunt drop and supply voltage, with
+programmable calibration value and conversion times. The SY24655 can also
+calculate average power for use in energy conversion.
+
 The shunt value in micro-ohms can be set via platform data or device tree at
 compile-time or via the shunt_resistor attribute in sysfs at run-time. Please
 refer to the Documentation/devicetree/bindings/hwmon/ti,ina2xx.yaml for bindings
@@ -87,18 +116,22 @@ The actual programmed interval may vary from the desired value.
 General sysfs entries
 ---------------------
 
-======================= ===============================
+======================= ===============================================
 in0_input              Shunt voltage(mV) channel
 in1_input              Bus voltage(mV) channel
 curr1_input            Current(mA) measurement channel
 power1_input           Power(uW) measurement channel
-shunt_resistor         Shunt resistance(uOhm) channel
-======================= ===============================
+shunt_resistor         Shunt resistance(uOhm) channel (not for ina260)
+======================= ===============================================
 
-Sysfs entries for ina226, ina230 and ina231 only
-------------------------------------------------
+Additional sysfs entries for ina226, ina230, ina231, ina260, and sy24655
+------------------------------------------------------------------------
 
 ======================= ====================================================
+curr1_lcrit            Critical low current
+curr1_crit             Critical high current
+curr1_lcrit_alarm      Current critical low alarm
+curr1_crit_alarm       Current critical high alarm
 in0_lcrit              Critical low shunt voltage
 in0_crit               Critical high shunt voltage
 in0_lcrit_alarm                Shunt voltage critical low alarm
@@ -113,6 +146,13 @@ update_interval            data conversion time; affects number of samples used
                        to average results for shunt and bus voltages.
 ======================= ====================================================
 
+Sysfs entries for sy24655 only
+------------------------------
+
+======================= ====================================================
+power1_average         average power from last reading to the present.
+======================= ====================================================
+
 .. note::
 
    - Configure `shunt_resistor` before configure `power1_crit`, because power
drivers/hwmon/Kconfig +1 -1
index 97318b9237af..abb437e5f8a0 100644
@@ -2042,7 +2042,7 @@ config SENSORS_INA2XX
        select REGMAP_I2C
        help
          If you say yes here you get support for INA219, INA220, INA226,
-         INA230, and INA231 power monitor chips.
+         INA230, INA231, INA260, and SY24655 power monitor chips.
 
          The INA2xx driver is configured for the default configuration of
          the part as described in the datasheet.
drivers/hwmon/ina2xx.c +649 -339

1,275 lines not on this page · raw message

--
2.34.1

WIWYNN PROPRIETARY
This email (and any attachments) contains proprietary or confidential information and is for the sole use of its intended recipient. Any unauthorized review, use, copying or distribution of this email or the content of this email is strictly prohibited. If you are not the intended recipient, please notify the sender and delete this email immediately.

#1 lore raw

Hi Rush,

Quoted 9 lines · Rush Chen

From: Rush Chen <[email protected]>

Summary:
The driver SY24655 has been supported by INA2XX driver, since Linux kernel version 6.13.

Issue a backport request to Linux kernel 6.6.

From the way you've structured the subject prefix I expect you are asking for this to be applied to OpenBMC's kernel fork (openbmc/linux).

If that's the case, this patch has no business bothering upstream maintainers (Guenter, Jean, Jonathan) or the upstream mailing lists (linux-hwmon@, linux-kernel@, linux-doc@). The only people this should be sent to are myself and Joel, and the only list it should be sent to is openbmc@.

If you send a backport patch for openbmc/linux and are using git send- email to do so, then in nearly all cases you should use the -- suppress-cc=all option to make sure upstream maintainers and lists are _not_ automatically copied on the mail.

However, if you wish this change to be back-ported to an _upstream_ stable tree (e.g. the v6.6 series), please _first_ familiarise yourself with the stable tree rules, satisfy yourself that the change meets all the requirements and constraints, and only then follow one of the documented processes:

https://docs.kernel.org/process/stable-kernel-rules.html#stable-kernel-rules

If you have any questions do follow up with myself, Joel and the OpenBMC mailing list, but make sure to exclude the upstream maintainers and lists for now.

Thanks,

Andrew

#2 lore raw

Hi Andrew,

Thanks for your reply.
I will resend an email to the relevant.
If there is still any problem, please let me know. Thank you.

Rush

-----Original Message-----
From: Andrew Jeffery <[email protected]>
Sent: Friday, February 7, 2025 7:48 AM
To: Rush Chen/WYHQ/Wiwynn <[email protected]>; [email protected]; [email protected]; Guenter Roeck <[email protected]>; Jean Delvare <[email protected]>; Jonathan Corbet <[email protected]>
Cc: [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH linux dev-6.6] A backport request for SY24655 driver in INA2XX driver for Linux kernel 6.6.

[You don't often get email from [email protected]. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]

[External Sender]

Hi Rush,

Quoted 9 lines · Rush Chen

From: Rush Chen <[email protected]>

Summary:
The driver SY24655 has been supported by INA2XX driver, since Linux kernel version 6.13.

Issue a backport request to Linux kernel 6.6.

From the way you've structured the subject prefix I expect you are asking for this to be applied to OpenBMC's kernel fork (openbmc/linux).

If that's the case, this patch has no business bothering upstream maintainers (Guenter, Jean, Jonathan) or the upstream mailing lists (linux-hwmon@, linux-kernel@, linux-doc@). The only people this should be sent to are myself and Joel, and the only list it should be sent to is openbmc@.

If you send a backport patch for openbmc/linux and are using git send- email to do so, then in nearly all cases you should use the -- suppress-cc=all option to make sure upstream maintainers and lists are _not_ automatically copied on the mail.

However, if you wish this change to be back-ported to an _upstream_ stable tree (e.g. the v6.6 series), please _first_ familiarise yourself with the stable tree rules, satisfy yourself that the change meets all the requirements and constraints, and only then follow one of the documented processes:

https://docs.kernel.org/process/stable-kernel-rules.html#stable-kernel-rules

If you have any questions do follow up with myself, Joel and the OpenBMC mailing list, but make sure to exclude the upstream maintainers and lists for now.

Thanks,

Andrew
WIWYNN PROPRIETARY
This email (and any attachments) contains proprietary or confidential information and is for the sole use of its intended recipient. Any unauthorized review, use, copying or distribution of this email or the content of this email is strictly prohibited. If you are not the intended recipient, please notify the sender and delete this email immediately.