* [PATCH 1/3] dt-bindings: hwmon: pmbus: add Delta E50SN12051 binding
2026-04-29 9:41 [PATCH 0/3] add support for Delta E50SN12051 Colin Huang via B4 Relay
@ 2026-04-29 9:41 ` Colin Huang via B4 Relay
2026-04-29 9:56 ` sashiko-bot
2026-04-29 9:41 ` [PATCH 2/3] Documentation/hwmon: add Delta E50SN12051 documentation Colin Huang via B4 Relay
2026-04-29 9:42 ` [PATCH 3/3] hwmon: (pmbus) add support for Delta E50SN12051 Colin Huang via B4 Relay
2 siblings, 1 reply; 6+ messages in thread
From: Colin Huang via B4 Relay @ 2026-04-29 9:41 UTC (permalink / raw)
To: Guenter Roeck, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Kevin Chang, Jonathan Corbet, Shuah Khan
Cc: linux-hwmon, devicetree, linux-kernel, linux-doc, Colin Huang,
Colin Huang
From: Colin Huang <u8813345@gmail.com>
Add devicetree binding documentation for the Delta E50SN12051
PMBus-compliant device.
Signed-off-by: Colin Huang <u8813345@gmail.com>
---
.../bindings/hwmon/pmbus/delta,e50sn12051.yaml | 40 ++++++++++++++++++++++
1 file changed, 40 insertions(+)
diff --git a/Documentation/devicetree/bindings/hwmon/pmbus/delta,e50sn12051.yaml b/Documentation/devicetree/bindings/hwmon/pmbus/delta,e50sn12051.yaml
new file mode 100644
index 000000000000..362cbbf10bfe
--- /dev/null
+++ b/Documentation/devicetree/bindings/hwmon/pmbus/delta,e50sn12051.yaml
@@ -0,0 +1,40 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+---
+$id: http://devicetree.org/schemas/hwmon/pmbus/delta,e50sn12051.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Delta E50SN12051 PMBus Sensor
+
+maintainers:
+ - Kevin Chang <kevin.chang2@amd.com>
+
+description: |
+ This binding describes the Delta E50SN12051 PMBus sensor.
+ The driver supports reading voltage, current, and temperature
+ using the PMBus interface.
+
+properties:
+ compatible:
+ const: delta,e50sn12051
+
+ reg:
+ maxItems: 1
+ description: I2C bus address of the PMBus device
+
+required:
+ - compatible
+ - reg
+
+additionalProperties: false
+
+examples:
+ - |
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ e50sn12051@40 {
+ compatible = "delta,e50sn12051";
+ reg = <0x40>;
+ };
+ };
--
2.34.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH 1/3] dt-bindings: hwmon: pmbus: add Delta E50SN12051 binding
2026-04-29 9:41 ` [PATCH 1/3] dt-bindings: hwmon: pmbus: add Delta E50SN12051 binding Colin Huang via B4 Relay
@ 2026-04-29 9:56 ` sashiko-bot
0 siblings, 0 replies; 6+ messages in thread
From: sashiko-bot @ 2026-04-29 9:56 UTC (permalink / raw)
To: Colin Huang via B4 Relay; +Cc: linux-hwmon
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Low] The devicetree binding schema is missing the '%YAML 1.2' declaration.
- [Low] The devicetree example uses a device-specific node name 'e50sn12051@40' instead of a generic class name.
--
commit 91ccfd1047b5355c8ba1210c7c4b1e1a74f2e8cc
Author: Colin Huang <u8813345@gmail.com>
dt-bindings: hwmon: pmbus: add Delta E50SN12051 binding
This commit adds the devicetree binding documentation for the Delta
E50SN12051 PMBus-compliant device. It supports reading voltage, current,
and temperature over the PMBus interface.
> diff --git a/Documentation/devicetree/bindings/hwmon/pmbus/delta,e50sn12051.yaml b/Documentation/devicetree/bindings/hwmon/pmbus/delta,e50sn12051.yaml
> new file mode 100644
> index 000000000000..362cbbf10bfe
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/hwmon/pmbus/delta,e50sn12051.yaml
> @@ -0,0 +1,40 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
This isn't a bug, but shouldn't this include the %YAML 1.2 declaration
immediately after the SPDX license identifier and before the '---' document
separator? Without this, schema validation tooling might fail to process the
file correctly or report formatting errors.
> +---
> +$id: http://devicetree.org/schemas/hwmon/pmbus/delta,e50sn12051.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
[ ... ]
> +examples:
> + - |
> + i2c {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + e50sn12051@40 {
This isn't a bug, but could this example use a generic node name like
sensor@40 or hwmon@40 instead of the device-specific e50sn12051@40? This
would help comply with standard devicetree practices and prevent dtc
warnings during validation.
> + compatible = "delta,e50sn12051";
> + reg = <0x40>;
> + };
> + };
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260429-add-e50sn12051-v1-0-c101e6c80bbb@gmail.com?part=1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 2/3] Documentation/hwmon: add Delta E50SN12051 documentation
2026-04-29 9:41 [PATCH 0/3] add support for Delta E50SN12051 Colin Huang via B4 Relay
2026-04-29 9:41 ` [PATCH 1/3] dt-bindings: hwmon: pmbus: add Delta E50SN12051 binding Colin Huang via B4 Relay
@ 2026-04-29 9:41 ` Colin Huang via B4 Relay
2026-04-29 9:42 ` [PATCH 3/3] hwmon: (pmbus) add support for Delta E50SN12051 Colin Huang via B4 Relay
2 siblings, 0 replies; 6+ messages in thread
From: Colin Huang via B4 Relay @ 2026-04-29 9:41 UTC (permalink / raw)
To: Guenter Roeck, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Kevin Chang, Jonathan Corbet, Shuah Khan
Cc: linux-hwmon, devicetree, linux-kernel, linux-doc, Colin Huang,
Colin Huang
From: Colin Huang <u8813345@gmail.com>
Document the hardware monitoring support for the Delta E50SN12051
device.
The documentation describes the supported sensors exposed via the
hwmon subsystem, including voltage, current, and temperature measurements.
Signed-off-by: Colin Huang <u8813345@gmail.com>
---
Documentation/hwmon/e50sn12051.rst | 81 ++++++++++++++++++++++++++++++++++++++
Documentation/hwmon/index.rst | 1 +
2 files changed, 82 insertions(+)
diff --git a/Documentation/hwmon/e50sn12051.rst b/Documentation/hwmon/e50sn12051.rst
new file mode 100644
index 000000000000..cbbfa7895d82
--- /dev/null
+++ b/Documentation/hwmon/e50sn12051.rst
@@ -0,0 +1,81 @@
+.. SPDX-License-Identifier: GPL-2.0-or-later
+
+Kernel driver e50sn12051
+========================
+
+Supported chips:
+
+ * Delta E50SN12051
+
+ Prefix: 'e50sn12051'
+
+ Addresses scanned: -
+
+ Datasheet:
+
+ Provided by Delta upon request and NDA
+
+Description
+-----------
+
+E50SN12051 is a 600W non-isolated 1/8th brick DC-DC power module.
+
+This driver supports the E50SN12051 PMBus compliant monitor device.
+
+The device provides measurements for:
+
+* Input voltage
+* Output current
+* Output voltage
+* Temperature
+
+The driver is based on the PMBus core and exposes standard hwmon
+sysfs attributes.
+
+Sysfs attributes
+----------------
+
+======================= =======================================================
+curr1_label "iout1"
+curr1_crit Critical maximum current.
+ From IOUT_OC_FAULT_LIMIT register.
+curr1_crit_alarm Current critical high alarm.
+ From IOUT_OC_FAULT status.
+curr1_input Measured current.
+ From READ_IOUT register.
+curr1_max Maximum current.
+ From IOUT_OC_WARN_LIMIT register.
+curr1_max_alarm Current high alarm.
+ From IOUT_OC_WARN_LIMIT status.
+
+in1_label "vin"
+in1_alarm Input voltage alarm.
+in1_input Measured voltage.
+ From READ_VIN register.
+
+in2_label "vout1"
+in2_crit Critical maximum voltage.
+ From VOUT_OV_FAULT_LIMIT register.
+in2_crit_alarm Voltage critical high alarm.
+ From VOLTAGE_OV_FAULT status.
+in2_input Measured voltage.
+ From READ_VOUT register.
+in2_max Maximum voltage.
+ From VOUT_OV_WARN_LIMIT register.
+in2_max_alarm Voltage high alarm.
+ From VOLTAGE_OV_WARNING status.
+
+temp1_crit Critical high temperature.
+ From OT_FAULT_LIMIT register.
+temp1_crit_alarm Module temperature critical high alarm.
+ Set by comparing READ_TEMPERATURE_1 with OT_FAULT_LIMIT
+ if TEMP_OT_FAULT status is set.
+temp1_input Measured module's hot spot temperature.
+ From READ_TEMPERATURE_1 register.
+temp1_max Maximum temperature.
+ From OT_WARN_LIMIT register.
+temp1_max_alarm Module temperature high alarm.
+ Set by comparing READ_TEMPERATURE_1 with OT_WARN_LIMIT if
+ TEMP_OT_WARNING status is set.
+======================= =======================================================
+
diff --git a/Documentation/hwmon/index.rst b/Documentation/hwmon/index.rst
index 8b655e5d6b68..ba08655fc496 100644
--- a/Documentation/hwmon/index.rst
+++ b/Documentation/hwmon/index.rst
@@ -68,6 +68,7 @@ Hardware Monitoring Kernel Drivers
drivetemp
ds1621
ds620
+ e50sn12051
emc1403
emc2103
emc2305
--
2.34.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH 3/3] hwmon: (pmbus) add support for Delta E50SN12051
2026-04-29 9:41 [PATCH 0/3] add support for Delta E50SN12051 Colin Huang via B4 Relay
2026-04-29 9:41 ` [PATCH 1/3] dt-bindings: hwmon: pmbus: add Delta E50SN12051 binding Colin Huang via B4 Relay
2026-04-29 9:41 ` [PATCH 2/3] Documentation/hwmon: add Delta E50SN12051 documentation Colin Huang via B4 Relay
@ 2026-04-29 9:42 ` Colin Huang via B4 Relay
2026-04-29 10:19 ` sashiko-bot
2 siblings, 1 reply; 6+ messages in thread
From: Colin Huang via B4 Relay @ 2026-04-29 9:42 UTC (permalink / raw)
To: Guenter Roeck, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Kevin Chang, Jonathan Corbet, Shuah Khan
Cc: linux-hwmon, devicetree, linux-kernel, linux-doc, Colin Huang,
Colin Huang
From: Colin Huang <u8813345@gmail.com>
Add the pmbus driver for Delta E50SN12051 600W Non-isolated
1/8th Brick DCDC Power Modules.
Signed-off-by: Colin Huang <u8813345@gmail.com>
---
drivers/hwmon/pmbus/Kconfig | 9 ++++++
drivers/hwmon/pmbus/Makefile | 1 +
drivers/hwmon/pmbus/e50sn12051.c | 60 ++++++++++++++++++++++++++++++++++++++++
3 files changed, 70 insertions(+)
diff --git a/drivers/hwmon/pmbus/Kconfig b/drivers/hwmon/pmbus/Kconfig
index 8f4bff375ecb..4fbfcbc4a9c5 100644
--- a/drivers/hwmon/pmbus/Kconfig
+++ b/drivers/hwmon/pmbus/Kconfig
@@ -161,6 +161,15 @@ config SENSORS_DPS920AB
This driver can also be built as a module. If so, the module will
be called dps920ab.
+config SENSORS_E50SN12051
+ tristate "Delta E50SN12051 Power Modules"
+ help
+ If you say yes here you get hardware monitoring support for Delta
+ E50SN12051 Power Modules.
+
+ This driver can also be built as a module. If so, the module will
+ be called e50sn12051.
+
config SENSORS_INA233
tristate "Texas Instruments INA233 and compatibles"
help
diff --git a/drivers/hwmon/pmbus/Makefile b/drivers/hwmon/pmbus/Makefile
index 7129b62bc00f..fc910bf34fe3 100644
--- a/drivers/hwmon/pmbus/Makefile
+++ b/drivers/hwmon/pmbus/Makefile
@@ -17,6 +17,7 @@ obj-$(CONFIG_SENSORS_FSP_3Y) += fsp-3y.o
obj-$(CONFIG_SENSORS_HAC300S) += hac300s.o
obj-$(CONFIG_SENSORS_IBM_CFFPS) += ibm-cffps.o
obj-$(CONFIG_SENSORS_DPS920AB) += dps920ab.o
+obj-$(CONFIG_SENSORS_E50SN12051) += e50sn12051.o
obj-$(CONFIG_SENSORS_INA233) += ina233.o
obj-$(CONFIG_SENSORS_INSPUR_IPSPS) += inspur-ipsps.o
obj-$(CONFIG_SENSORS_IR35221) += ir35221.o
diff --git a/drivers/hwmon/pmbus/e50sn12051.c b/drivers/hwmon/pmbus/e50sn12051.c
new file mode 100644
index 000000000000..56935e9543b6
--- /dev/null
+++ b/drivers/hwmon/pmbus/e50sn12051.c
@@ -0,0 +1,60 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Hardware monitoring driver for E50SN12051
+ */
+
+#include <linux/debugfs.h>
+#include <linux/i2c.h>
+#include <linux/kstrtox.h>
+#include <linux/module.h>
+#include <linux/of_device.h>
+#include "pmbus.h"
+
+static struct pmbus_driver_info e50sn12051_info = {
+ .pages = 1,
+ .format[PSC_VOLTAGE_IN] = linear,
+ .format[PSC_VOLTAGE_OUT] = linear,
+ .format[PSC_CURRENT_OUT] = linear,
+ .format[PSC_TEMPERATURE] = linear,
+ .func[0] = PMBUS_HAVE_VIN | PMBUS_HAVE_STATUS_INPUT |
+ PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT |
+ PMBUS_HAVE_IOUT | PMBUS_HAVE_STATUS_IOUT |
+ PMBUS_HAVE_TEMP | PMBUS_HAVE_STATUS_TEMP,
+};
+
+static const struct i2c_device_id e50sn12051_id[] = { { "e50sn12051", 0 }, {} };
+MODULE_DEVICE_TABLE(i2c, e50sn12051_id);
+
+static const struct of_device_id e50sn12051_of_match[] = {
+ { .compatible = "delta,e50sn12051" },
+ {},
+};
+MODULE_DEVICE_TABLE(of, e50sn12051_of_match);
+
+static int e50sn12051_probe(struct i2c_client *client)
+{
+ struct pmbus_driver_info *info;
+
+ info = devm_kmemdup(&client->dev, &e50sn12051_info, sizeof(*info),
+ GFP_KERNEL);
+ if (!info)
+ return -ENOMEM;
+
+ return pmbus_do_probe(client, info);
+}
+
+static struct i2c_driver e50sn12051_driver = {
+ .driver = {
+ .name = "e50sn12051",
+ .of_match_table = e50sn12051_of_match,
+ },
+ .probe = e50sn12051_probe,
+
+ .id_table = e50sn12051_id,
+};
+
+module_i2c_driver(e50sn12051_driver);
+
+MODULE_AUTHOR("Kevin Chang <kevin.chang2@amd.com>");
+MODULE_DESCRIPTION("PMBus driver for E50SN12051");
+MODULE_LICENSE("GPL");
--
2.34.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH 3/3] hwmon: (pmbus) add support for Delta E50SN12051
2026-04-29 9:42 ` [PATCH 3/3] hwmon: (pmbus) add support for Delta E50SN12051 Colin Huang via B4 Relay
@ 2026-04-29 10:19 ` sashiko-bot
0 siblings, 0 replies; 6+ messages in thread
From: sashiko-bot @ 2026-04-29 10:19 UTC (permalink / raw)
To: Colin Huang via B4 Relay; +Cc: linux-hwmon
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Low] The driver uses `pmbus_do_probe()` which is exported in the `PMBUS` namespace, but fails to include `MODULE_IMPORT_NS("PMBUS");`.
- [Low] The driver includes `<linux/debugfs.h>`, `<linux/kstrtox.h>`, and `<linux/of_device.h>` when they are either unused or technically incorrect.
--
commit 8b9d265ffa7130b1c2d0afd9fd591168b6c43156
Author: Colin Huang <u8813345@gmail.com>
hwmon: (pmbus) add support for Delta E50SN12051
Add the pmbus driver for Delta E50SN12051 600W Non-isolated 1/8th Brick
DCDC Power Modules.
> diff --git a/drivers/hwmon/pmbus/e50sn12051.c b/drivers/hwmon/pmbus/e50sn12051.c
> new file mode 100644
> index 000000000000..56935e9543b6
> --- /dev/null
> +++ b/drivers/hwmon/pmbus/e50sn12051.c
> @@ -0,0 +1,60 @@
> +// SPDX-License-Identifier: GPL-2.0-or-later
> +/*
> + * Hardware monitoring driver for E50SN12051
> + */
> +
> +#include <linux/debugfs.h>
> +#include <linux/i2c.h>
> +#include <linux/kstrtox.h>
> +#include <linux/module.h>
> +#include <linux/of_device.h>
Are linux/debugfs.h and linux/kstrtox.h used in this driver? I don't see
any debugfs interfaces or string parsing functions being utilized.
Also, since this driver only uses of_device_id from linux/of_device.h,
should it include linux/mod_devicetable.h instead to follow the standard
device match table patterns?
[ ... ]
> +static int e50sn12051_probe(struct i2c_client *client)
> +{
> + struct pmbus_driver_info *info;
> +
> + info = devm_kmemdup(&client->dev, &e50sn12051_info, sizeof(*info),
> + GFP_KERNEL);
> + if (!info)
> + return -ENOMEM;
> +
> + return pmbus_do_probe(client, info);
> +}
[ ... ]
> +MODULE_AUTHOR("Kevin Chang <kevin.chang2@amd.com>");
> +MODULE_DESCRIPTION("PMBus driver for E50SN12051");
> +MODULE_LICENSE("GPL");
Since this driver calls pmbus_do_probe() which is exported in the PMBUS
namespace, does it need a MODULE_IMPORT_NS("PMBUS") declaration?
Without it, modpost might fail the build with a missing namespace import
error if CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS is not enabled.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260429-add-e50sn12051-v1-0-c101e6c80bbb@gmail.com?part=3
^ permalink raw reply [flat|nested] 6+ messages in thread