* [PATCH v7 1/2] dt-bindings: hwmon: add STEF48H28
@ 2026-01-26 6:37 Charles Hsu
2026-01-26 6:37 ` [PATCH v7 2/2] hwmon: pmbus: add support for STEF48H28 Charles Hsu
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Charles Hsu @ 2026-01-26 6:37 UTC (permalink / raw)
To: robh
Cc: krzk+dt, conor+dt, linux, devicetree, linux-hwmon, linux-kernel,
Charles Hsu
Add device tree bindings for the hot-swap controller STEF48H28.
Signed-off-by: Charles Hsu <hsu.yungteng@gmail.com>
---
Changes in v6:
- This device is a simple I2C slave that does not require any custom
properties beyond the standard ones, just need add to trivial-devices schema.
Changes in v6:
- Fix patch formatting issues.
Changes in v5:
- Move the change list into the commit message.
Changes in v4:
- Fix an incorrect datasheet URL and update it to the correct reference.
Changes in v3:
- Move the STEF48H28 Device Tree binding from
trivial-devices.yaml to pmbus/stef48h28.yaml.
Changes in v2:
- Fix the entry in trivial-devices.yaml by correcting the comment
and compatible string ordering.
---
Documentation/devicetree/bindings/trivial-devices.yaml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/trivial-devices.yaml b/Documentation/devicetree/bindings/trivial-devices.yaml
index d0f7dbf15d6f..7ff5b1dbe61c 100644
--- a/Documentation/devicetree/bindings/trivial-devices.yaml
+++ b/Documentation/devicetree/bindings/trivial-devices.yaml
@@ -416,6 +416,8 @@ properties:
- smsc,emc6d103s
# SparkFun Qwiic Joystick (COM-15168) with i2c interface
- sparkfun,qwiic-joystick
+ # STMicroelectronics Hot-swap controller stef48h28
+ - st,stef48h28
# Sierra Wireless mangOH Green SPI IoT interface
- swir,mangoh-iotport-spi
# Synaptics I2C touchpad
--
2.34.1
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH v7 2/2] hwmon: pmbus: add support for STEF48H28 2026-01-26 6:37 [PATCH v7 1/2] dt-bindings: hwmon: add STEF48H28 Charles Hsu @ 2026-01-26 6:37 ` Charles Hsu 2026-01-27 0:12 ` Guenter Roeck 2026-01-26 20:27 ` [PATCH v7 1/2] dt-bindings: hwmon: add STEF48H28 Conor Dooley 2026-01-27 0:12 ` Guenter Roeck 2 siblings, 1 reply; 7+ messages in thread From: Charles Hsu @ 2026-01-26 6:37 UTC (permalink / raw) To: robh Cc: krzk+dt, conor+dt, linux, devicetree, linux-hwmon, linux-kernel, Charles Hsu Add support for STEF48H28 hot-swap controller. Signed-off-by: Charles Hsu <hsu.yungteng@gmail.com> --- Documentation/hwmon/index.rst | 1 + Documentation/hwmon/stef48h28.rst | 73 ++++++++++++++++++++++++++++++ MAINTAINERS | 7 +++ drivers/hwmon/pmbus/Kconfig | 9 ++++ drivers/hwmon/pmbus/Makefile | 1 + drivers/hwmon/pmbus/stef48h28.c | 75 +++++++++++++++++++++++++++++++ 6 files changed, 166 insertions(+) create mode 100644 Documentation/hwmon/stef48h28.rst create mode 100644 drivers/hwmon/pmbus/stef48h28.c diff --git a/Documentation/hwmon/index.rst b/Documentation/hwmon/index.rst index 85d7a686883e..c682751a1fe3 100644 --- a/Documentation/hwmon/index.rst +++ b/Documentation/hwmon/index.rst @@ -233,6 +233,7 @@ Hardware Monitoring Kernel Drivers shtc1 sis5595 sl28cpld + stef48h28 smpro-hwmon smsc47b397 smsc47m192 diff --git a/Documentation/hwmon/stef48h28.rst b/Documentation/hwmon/stef48h28.rst new file mode 100644 index 000000000000..00bef9e55651 --- /dev/null +++ b/Documentation/hwmon/stef48h28.rst @@ -0,0 +1,73 @@ +.. SPDX-License-Identifier: GPL-2.0 + +Kernel driver stef48h28 +======================= + +Supported chips: + + * Analog Devices STEF48H28 + + Prefix: 'stef48h28' + + Addresses scanned: - + + Datasheet: https://www.st.com/resource/en/data_brief/stef48h28.pdf + +Author: + + - Charles Hsu <hsu.yungteng@gmail.com> + + +Description +----------- + +The STEF48H28 is a 30 A integrated e-fuse for 9-80 V DC power rails. +It provides inrush control, undervoltage/overvoltage lockout and +overcurrent protection using an adaptive (I x t) scheme that permits +short high-current pulses typical of CPU/GPU loads. + +The device offers an analog current-monitor output and an on-chip +temperature-monitor signal for system supervision. Startup behavior is +programmable through insertion-delay and soft-start settings. + +Additional features include power-good indication, self-diagnostics, +thermal shutdown and a PMBus interface for telemetry and status +reporting. + +Platform data support +--------------------- + +The driver supports standard PMBus driver platform data. + +Sysfs entries +------------- + +========================================================= +in1_label "vin". +in1_input Measured voltage. From READ_VIN register. +in1_min Minimum Voltage. From VIN_UV_WARN_LIMIT register. +in1_max Maximum voltage. From VIN_OV_WARN_LIMIT register. + +in2_label "vout1". +in2_input Measured voltage. From READ_VOUT register. +in2_min Minimum Voltage. From VOUT_UV_WARN_LIMIT register. +in2_max Maximum voltage. From VOUT_OV_WARN_LIMIT register. + +curr1_label "iin". +curr1_input Measured current. From READ_IIN register. + +curr2_label "iout1". +curr2_input Measured current. From READ_IOUT register. + +power1_label "pin" +power1_input Measured input power. From READ_PIN register. + +power2_label "pout1" +power2_input Measured output power. From READ_POUT register. + +temp1_input Measured temperature. From READ_TEMPERATURE_1 register. +temp1_max Maximum temperature. From OT_WARN_LIMIT register. +temp1_crit Critical high temperature. From OT_FAULT_LIMIT register. + +temp2_input Measured temperature. From READ_TEMPERATURE_2 register. +========================================================= diff --git a/MAINTAINERS b/MAINTAINERS index d701a4d5b00e..be6b6e9ee79b 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -24665,6 +24665,13 @@ S: Maintained F: Documentation/devicetree/bindings/power/supply/st,stc3117.yaml F: drivers/power/supply/stc3117_fuel_gauge.c +ST STEF48H28 DRIVER +M: Charles Hsu <hsu.yungteng@gmail.com> +L: linux-hwmon@vger.kernel.org +S: Maintained +F: Documentation/hwmon/stef48h28.rst +F: drivers/hwmon/pmbus/stef48h28.c + ST STM32 FIREWALL M: Gatien Chevallier <gatien.chevallier@foss.st.com> S: Maintained diff --git a/drivers/hwmon/pmbus/Kconfig b/drivers/hwmon/pmbus/Kconfig index f3fb94cebf1a..5a18e2a37009 100644 --- a/drivers/hwmon/pmbus/Kconfig +++ b/drivers/hwmon/pmbus/Kconfig @@ -576,6 +576,15 @@ config SENSORS_Q54SJ108A2 This driver can also be built as a module. If so, the module will be called q54sj108a2. +config SENSORS_STEF48H28 + tristate "ST STEF48H28" + help + If you say yes here you get hardware monitoring support for ST + STEF48H28. + + This driver can also be built as a module. If so, the module will + be called stef48h28. + config SENSORS_STPDDC60 tristate "ST STPDDC60" help diff --git a/drivers/hwmon/pmbus/Makefile b/drivers/hwmon/pmbus/Makefile index 349a89b6d92e..b2497f1d7bd9 100644 --- a/drivers/hwmon/pmbus/Makefile +++ b/drivers/hwmon/pmbus/Makefile @@ -56,6 +56,7 @@ obj-$(CONFIG_SENSORS_PLI1209BC) += pli1209bc.o obj-$(CONFIG_SENSORS_PM6764TR) += pm6764tr.o obj-$(CONFIG_SENSORS_PXE1610) += pxe1610.o obj-$(CONFIG_SENSORS_Q54SJ108A2) += q54sj108a2.o +obj-$(CONFIG_SENSORS_STEF48H28) += stef48h28.o obj-$(CONFIG_SENSORS_STPDDC60) += stpddc60.o obj-$(CONFIG_SENSORS_TDA38640) += tda38640.o obj-$(CONFIG_SENSORS_TPS25990) += tps25990.o diff --git a/drivers/hwmon/pmbus/stef48h28.c b/drivers/hwmon/pmbus/stef48h28.c new file mode 100644 index 000000000000..4bde2215697c --- /dev/null +++ b/drivers/hwmon/pmbus/stef48h28.c @@ -0,0 +1,75 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Hardware monitoring driver for STMicroelectronics digital controller stef48h28 + */ + +#include <linux/err.h> +#include <linux/i2c.h> +#include <linux/mod_devicetable.h> +#include <linux/module.h> + +#include "pmbus.h" + +static struct pmbus_driver_info stef48h28_info = { + .pages = 1, + .format[PSC_VOLTAGE_IN] = direct, + .format[PSC_VOLTAGE_OUT] = direct, + .format[PSC_CURRENT_IN] = direct, + .format[PSC_CURRENT_OUT] = direct, + .format[PSC_POWER] = direct, + .format[PSC_TEMPERATURE] = direct, + .m[PSC_VOLTAGE_IN] = 50, + .b[PSC_VOLTAGE_IN] = 0, + .R[PSC_VOLTAGE_IN] = 0, + .m[PSC_VOLTAGE_OUT] = 50, + .b[PSC_VOLTAGE_OUT] = 0, + .R[PSC_VOLTAGE_OUT] = 0, + .m[PSC_CURRENT_IN] = 100, + .b[PSC_CURRENT_IN] = 0, + .R[PSC_CURRENT_IN] = 0, + .m[PSC_CURRENT_OUT] = 100, + .b[PSC_CURRENT_OUT] = 0, + .R[PSC_CURRENT_OUT] = 0, + .m[PSC_POWER] = 9765, + .b[PSC_POWER] = 0, + .R[PSC_POWER] = -3, + .m[PSC_TEMPERATURE] = 25, + .b[PSC_TEMPERATURE] = 500, + .R[PSC_TEMPERATURE] = 0, + .func[0] = PMBUS_HAVE_VIN | PMBUS_HAVE_IIN | PMBUS_HAVE_PIN + | PMBUS_HAVE_STATUS_INPUT | PMBUS_HAVE_TEMP | PMBUS_HAVE_TEMP2 + | PMBUS_HAVE_STATUS_TEMP | PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT + | PMBUS_HAVE_IOUT | PMBUS_HAVE_STATUS_IOUT | PMBUS_HAVE_POUT +}; + +static int stef48h28_probe(struct i2c_client *client) +{ + return pmbus_do_probe(client, &stef48h28_info); +} + +static const struct i2c_device_id stef48h28_id[] = { + {"stef48h28"}, + {} +}; +MODULE_DEVICE_TABLE(i2c, stef48h28_id); + +static const struct of_device_id __maybe_unused stef48h28_of_match[] = { + {.compatible = "st,stef48h28"}, + {} +}; + +static struct i2c_driver stef48h28_driver = { + .driver = { + .name = "stef48h28", + .of_match_table = of_match_ptr(stef48h28_of_match), + }, + .probe = stef48h28_probe, + .id_table = stef48h28_id, +}; + +module_i2c_driver(stef48h28_driver); + +MODULE_AUTHOR("Charles Hsu <hsu.yungteng@gmail.com>"); +MODULE_DESCRIPTION("PMBus driver for ST stef48h28"); +MODULE_LICENSE("GPL"); +MODULE_IMPORT_NS("PMBUS"); -- 2.34.1 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v7 2/2] hwmon: pmbus: add support for STEF48H28 2026-01-26 6:37 ` [PATCH v7 2/2] hwmon: pmbus: add support for STEF48H28 Charles Hsu @ 2026-01-27 0:12 ` Guenter Roeck 2026-01-29 7:17 ` Mauro Carvalho Chehab 0 siblings, 1 reply; 7+ messages in thread From: Guenter Roeck @ 2026-01-27 0:12 UTC (permalink / raw) To: Charles Hsu Cc: robh, krzk+dt, conor+dt, devicetree, linux-hwmon, linux-kernel On Mon, Jan 26, 2026 at 02:37:12PM +0800, Charles Hsu wrote: > Add support for STEF48H28 hot-swap controller. > > Signed-off-by: Charles Hsu <hsu.yungteng@gmail.com> Applied. Thanks, Guenter ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v7 2/2] hwmon: pmbus: add support for STEF48H28 2026-01-27 0:12 ` Guenter Roeck @ 2026-01-29 7:17 ` Mauro Carvalho Chehab 2026-01-29 14:14 ` Guenter Roeck 0 siblings, 1 reply; 7+ messages in thread From: Mauro Carvalho Chehab @ 2026-01-29 7:17 UTC (permalink / raw) To: Guenter Roeck Cc: Charles Hsu, robh, krzk+dt, conor+dt, devicetree, linux-hwmon, linux-kernel, Jonathan Corbet, huah Khan, linux-doc, Mark Brown Hi Gunter/Charles, On Mon, 26 Jan 2026 16:12:42 -0800 Guenter Roeck <linux@roeck-us.net> wrote: > On Mon, Jan 26, 2026 at 02:37:12PM +0800, Charles Hsu wrote: > > Add support for STEF48H28 hot-swap controller. > > > > Signed-off-by: Charles Hsu <hsu.yungteng@gmail.com> This patch completely broke docs build, as it is using a markup meant to identify section titles to mark the beginning/ending of a table. Also, please use get_maintainers.pl: $ ./scripts/get_maintainer.pl Documentation/hwmon/stef48h28.rst Charles Hsu <hsu.yungteng@gmail.com> (maintainer:ST STEF48H28 DRIVER) Guenter Roeck <linux@roeck-us.net> (maintainer:HARDWARE MONITORING) Jonathan Corbet <corbet@lwn.net> (maintainer:DOCUMENTATION) Shuah Khan <skhan@linuxfoundation.org> (reviewer:DOCUMENTATION) linux-hwmon@vger.kernel.org (open list:ST STEF48H28 DRIVER) linux-doc@vger.kernel.org (open list:DOCUMENTATION) linux-kernel@vger.kernel.org (open list) (adding documentation folks to C/C and also -next maintainer) Please apply the enclosed patch to fix linux-next. Thanks, Mauro --- [PATCH] docs: hwmon: stef48h28.rst: fix a documentation build breakage on -next The table there is completely misformatted, causing Sphinx to badly fail: Traceback ========= File "/usr/lib/python3.14/site-packages/sphinx/util/parallel.py", line 137, in _join_one raise SphinxParallelError(*result) sphinx.errors.SphinxParallelError: docutils.utils.SystemMessage: /new_devel/docs/Documentation/hwmon/stef48h28.rst:45: (SEVERE/4) Missing matching underline for section title overline. ========================================================= in1_label "vin". in1_input Measured voltage. From READ_VIN register. The full traceback has been saved in: /tmp/sphinx-err-wpoae2yk.log Fixes: aef6b6b5d5bc ("hwmon: pmbus: add support for STEF48H28") Cc: stable@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> diff --git a/Documentation/hwmon/stef48h28.rst b/Documentation/hwmon/stef48h28.rst index 00bef9e55651..3bfc37f3be8e 100644 --- a/Documentation/hwmon/stef48h28.rst +++ b/Documentation/hwmon/stef48h28.rst @@ -42,7 +42,7 @@ The driver supports standard PMBus driver platform data. Sysfs entries ------------- -========================================================= +================ ======================================================== in1_label "vin". in1_input Measured voltage. From READ_VIN register. in1_min Minimum Voltage. From VIN_UV_WARN_LIMIT register. @@ -53,11 +53,11 @@ in2_input Measured voltage. From READ_VOUT register. in2_min Minimum Voltage. From VOUT_UV_WARN_LIMIT register. in2_max Maximum voltage. From VOUT_OV_WARN_LIMIT register. -curr1_label "iin". -curr1_input Measured current. From READ_IIN register. +curr1_label "iin". +curr1_input Measured current. From READ_IIN register. -curr2_label "iout1". -curr2_input Measured current. From READ_IOUT register. +curr2_label "iout1". +curr2_input Measured current. From READ_IOUT register. power1_label "pin" power1_input Measured input power. From READ_PIN register. @@ -70,4 +70,4 @@ temp1_max Maximum temperature. From OT_WARN_LIMIT register. temp1_crit Critical high temperature. From OT_FAULT_LIMIT register. temp2_input Measured temperature. From READ_TEMPERATURE_2 register. -========================================================= +================ ======================================================== ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v7 2/2] hwmon: pmbus: add support for STEF48H28 2026-01-29 7:17 ` Mauro Carvalho Chehab @ 2026-01-29 14:14 ` Guenter Roeck 0 siblings, 0 replies; 7+ messages in thread From: Guenter Roeck @ 2026-01-29 14:14 UTC (permalink / raw) To: Mauro Carvalho Chehab Cc: Charles Hsu, robh, krzk+dt, conor+dt, devicetree, linux-hwmon, linux-kernel, Jonathan Corbet, huah Khan, linux-doc, Mark Brown On Thu, Jan 29, 2026 at 08:17:59AM +0100, Mauro Carvalho Chehab wrote: > Hi Gunter/Charles, > > On Mon, 26 Jan 2026 16:12:42 -0800 > Guenter Roeck <linux@roeck-us.net> wrote: > > > On Mon, Jan 26, 2026 at 02:37:12PM +0800, Charles Hsu wrote: > > > Add support for STEF48H28 hot-swap controller. > > > > > > Signed-off-by: Charles Hsu <hsu.yungteng@gmail.com> > > This patch completely broke docs build, as it is using a markup meant > to identify section titles to mark the beginning/ending of a table. Yes, I know. Randy already sent a patch to fix it. Guenter ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v7 1/2] dt-bindings: hwmon: add STEF48H28 2026-01-26 6:37 [PATCH v7 1/2] dt-bindings: hwmon: add STEF48H28 Charles Hsu 2026-01-26 6:37 ` [PATCH v7 2/2] hwmon: pmbus: add support for STEF48H28 Charles Hsu @ 2026-01-26 20:27 ` Conor Dooley 2026-01-27 0:12 ` Guenter Roeck 2 siblings, 0 replies; 7+ messages in thread From: Conor Dooley @ 2026-01-26 20:27 UTC (permalink / raw) To: Charles Hsu Cc: robh, krzk+dt, conor+dt, linux, devicetree, linux-hwmon, linux-kernel [-- Attachment #1: Type: text/plain, Size: 75 bytes --] Acked-by: Conor Dooley <conor.dooley@microchip.com> pw-bot: not-applicable [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 228 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v7 1/2] dt-bindings: hwmon: add STEF48H28 2026-01-26 6:37 [PATCH v7 1/2] dt-bindings: hwmon: add STEF48H28 Charles Hsu 2026-01-26 6:37 ` [PATCH v7 2/2] hwmon: pmbus: add support for STEF48H28 Charles Hsu 2026-01-26 20:27 ` [PATCH v7 1/2] dt-bindings: hwmon: add STEF48H28 Conor Dooley @ 2026-01-27 0:12 ` Guenter Roeck 2 siblings, 0 replies; 7+ messages in thread From: Guenter Roeck @ 2026-01-27 0:12 UTC (permalink / raw) To: Charles Hsu Cc: robh, krzk+dt, conor+dt, devicetree, linux-hwmon, linux-kernel On Mon, Jan 26, 2026 at 02:37:11PM +0800, Charles Hsu wrote: > Add device tree bindings for the hot-swap controller STEF48H28. > > Signed-off-by: Charles Hsu <hsu.yungteng@gmail.com> > Acked-by: Conor Dooley <conor.dooley@microchip.com> Applied. Thanks, Guenter ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-01-29 14:14 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-01-26 6:37 [PATCH v7 1/2] dt-bindings: hwmon: add STEF48H28 Charles Hsu 2026-01-26 6:37 ` [PATCH v7 2/2] hwmon: pmbus: add support for STEF48H28 Charles Hsu 2026-01-27 0:12 ` Guenter Roeck 2026-01-29 7:17 ` Mauro Carvalho Chehab 2026-01-29 14:14 ` Guenter Roeck 2026-01-26 20:27 ` [PATCH v7 1/2] dt-bindings: hwmon: add STEF48H28 Conor Dooley 2026-01-27 0:12 ` Guenter Roeck
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox