[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251022044708.314287-5-igor@reznichenko.net>
Date: Tue, 21 Oct 2025 21:47:07 -0700
From: Igor Reznichenko <igor@...nichenko.net>
To: linux@...ck-us.net,
robh@...nel.org,
krzk+dt@...nel.org,
conor+dt@...nel.org,
corbet@....net,
skhan@...uxfoundation.org,
david.hunter.linux@...il.com
Cc: linux-hwmon@...r.kernel.org,
devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org,
linux-doc@...r.kernel.org
Subject: [PATCH 4/5] Documentation/hwmon: Add TSC1641 driver documentation
Add hwmon documentation for the TSC1641 driver. This includes
description and the sysfs attributes.
Signed-off-by: Igor Reznichenko <igor@...nichenko.net>
---
Documentation/hwmon/index.rst | 1 +
Documentation/hwmon/tsc1641.rst | 73 +++++++++++++++++++++++++++++++++
2 files changed, 74 insertions(+)
create mode 100644 Documentation/hwmon/tsc1641.rst
diff --git a/Documentation/hwmon/index.rst b/Documentation/hwmon/index.rst
index 51a5bdf75b08..4fb9f91f83b3 100644
--- a/Documentation/hwmon/index.rst
+++ b/Documentation/hwmon/index.rst
@@ -253,6 +253,7 @@ Hardware Monitoring Kernel Drivers
tps40422
tps53679
tps546d24
+ tsc1641
twl4030-madc-hwmon
ucd9000
ucd9200
diff --git a/Documentation/hwmon/tsc1641.rst b/Documentation/hwmon/tsc1641.rst
new file mode 100644
index 000000000000..a93d1e72c70e
--- /dev/null
+++ b/Documentation/hwmon/tsc1641.rst
@@ -0,0 +1,73 @@
+Kernel driver tsc1641
+=====================
+
+Supported chips:
+
+ * ST TSC1641
+
+ Prefix: 'tsc1641'
+
+ Addresses scanned: -
+
+ Datasheet:
+ https://www.st.com/resource/en/datasheet/tsc1641.pdf
+
+Author:
+ - Igor Reznichenko <igor@...nichenko.net>
+
+
+Description
+-----------
+
+The TSC1641 is a high-precision current, voltage, power, and temperature
+monitoring analog front-end (AFE). It monitors current into a shunt resistor and load
+voltage up to 60 V in a synchronized way. Digital bus interface is I2C/SMbus.
+The TSC1641 allows the assertion of several alerts regarding the voltage, current,
+power and temperature.
+
+Sysfs entries
+-------------
+
+==================== =======================================================
+in0_input bus voltage (mV)
+in0_crit bus voltage crit alarm limit (mV)
+in0_crit_alarm bus voltage crit alarm limit exceeded
+in0_lcrit bus voltage low-crit alarm limit (mV)
+in0_lcrit_alarm bus voltage low-crit alarm limit exceeded
+
+curr1_input current measurement (mA)
+curr1_crit current crit alarm limit (mA)
+curr1_crit_alarm current crit alarm limit exceeded
+curr1_lcrit current low-crit alarm limit (mA)
+curr1_lcrit_alarm current low-crit alarm limit exceeded
+
+power1_input power measurement (uW)
+power1_crit power crit alarm limit (uW)
+power1_crit_alarm power crit alarm limit exceeded
+
+shunt_resistor shunt resistor value (uOhms)
+shunt_voltage_uvolts shunt voltage raw measurement (uV)
+
+temp1_input temperature measurement (mdegC)
+temp1_crit temperature crit alarm limit (mdegC)
+temp1_crit_alarm temperature crit alarm limit exceeded
+
+update_interval data conversion time (1 - 33ms), longer conversion time corresponds
+ to higher effective resolution in bits
+==================== =======================================================
+
+General Remarks
+---------------
+
+The TSC1641 driver requires the value of the external shunt resistor to
+correctly compute current and power measurements. The resistor value, in
+micro-ohms, should be provided either through the device tree property
+"shunt-resistor" or via the writable sysfs attribute "shunt_resistor".
+Please refer to the Documentation/devicetree/bindings/hwmon/st,tsc1641.yaml
+for bindings if the device tree is used.
+
+If the shunt resistor value is not specified in the device tree, the driver
+initializes it to 0 uOhm by default. In this state, current and power
+measurements will read as zero and are considered invalid. To enable these
+measurements, users must configure the correct shunt resistor value at
+runtime by writing to the "shunt_resistor" sysfs attribute.
--
2.43.0
Powered by blists - more mailing lists