From nobody Tue Jun 16 20:36:35 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 39C623793DB; Wed, 29 Apr 2026 09:42:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777455726; cv=none; b=Z+tZwq1jhhwwBU6UCkMQN/N2EVHbrqNR2HP+8U1IFamjWtIeALcI9+YTjAG/uZQRsmUCSNBI3KxnwcLkA66TcGXxBy1VEZ8KjQXBVbeP1/zLj4aD1IbtNwlu9SaDNuhpsHeFib+AsGr2ntkgC6fU6JlJ7Tv4ZvSYvynR8F+f6Js= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777455726; c=relaxed/simple; bh=9mATjHy/p92zdocodNNWbLZIIdHAStQKLxfvQ0r+77c=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=QGhjy1lOs/CD9XSeGQvudFROKjiofCe3fjUul3XLFvG59T3hzlDRORor4TR27JYh2AyYKYbz4a409WmreYzHA+1MnIv5X4TcVoDygx+m4T5xyTVF+EbCMCYkrD3aM4r+eLsioxG26PtwgvGuTs2qEUm1sf4zcv4ayER1mr6+VuM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=TmMxhhT3; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="TmMxhhT3" Received: by smtp.kernel.org (Postfix) with ESMTPS id D3634C2BCC4; Wed, 29 Apr 2026 09:42:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1777455725; bh=9mATjHy/p92zdocodNNWbLZIIdHAStQKLxfvQ0r+77c=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=TmMxhhT38l/2E5hjRN5zAVx/VF93Yt74UxHpbf6lRRhL8FmJkClc+BfWafBK+OBoI 0H46IrMRkkyItpaZLyqHDhuWEf1Sv0uu1CXUg57h2LxtMUirVyIu+SXj8Vo7Xl9aO1 JDb/pR/8Zm98dioy+A1G6Mu6qoFnkt62qrIEy901usT38kVN32JKL5cOmVzwgU23YQ mia7Fx1iAwPSjyu1dlO1meJybJOODuYtARpnEPRiRk/V6WVmRC3ivVuJQT+ShD3sTN hvDcDIJB0RIEsRVz7CQdfm9/63MbN9GNJ7+XJhQILiaAbysYl4uEyRb9b9K6ksn+WE rZfW0JX6WVQvQ== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id C2754FF8875; Wed, 29 Apr 2026 09:42:05 +0000 (UTC) From: Colin Huang via B4 Relay Date: Wed, 29 Apr 2026 17:41:58 +0800 Subject: [PATCH 1/3] dt-bindings: hwmon: pmbus: add Delta E50SN12051 binding Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260429-add-e50sn12051-v1-1-c101e6c80bbb@gmail.com> References: <20260429-add-e50sn12051-v1-0-c101e6c80bbb@gmail.com> In-Reply-To: <20260429-add-e50sn12051-v1-0-c101e6c80bbb@gmail.com> To: Guenter Roeck , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Kevin Chang , Jonathan Corbet , Shuah Khan Cc: linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Colin Huang , Colin Huang X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1777455724; l=1513; i=u8813345@gmail.com; s=20260202; h=from:subject:message-id; bh=4ai3gQorriR95uJn5LyCKNAUfjhgHd9lSkC+s7TUrI8=; b=a221JMOGHN2o9wbB6pOEIlq4J//kGnqL99ROnMmLVkYapRPebeu8B5/gLt0jB3dJyj2OVUXZJ 7QYkvSSrVMVA4OlYnv8JNf/p0vdGTO3wzfFuzrW6NUHSYia97vwZeyf X-Developer-Key: i=u8813345@gmail.com; a=ed25519; pk=Zlg0WqpCw4qbswOqamTBTXIchwR/3SnYZpy7rjaGMdQ= X-Endpoint-Received: by B4 Relay for u8813345@gmail.com/20260202 with auth_id=761 X-Original-From: Colin Huang Reply-To: u8813345@gmail.com From: Colin Huang Add devicetree binding documentation for the Delta E50SN12051 PMBus-compliant device. Signed-off-by: Colin Huang --- .../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 + +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 =3D <1>; + #size-cells =3D <0>; + + e50sn12051@40 { + compatible =3D "delta,e50sn12051"; + reg =3D <0x40>; + }; + }; --=20 2.34.1 From nobody Tue Jun 16 20:36:35 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 39A9B1DF736; Wed, 29 Apr 2026 09:42:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777455726; cv=none; b=p7JsUrEAznHN/O61oD8yZZb7zVGaN7+pRKzEgjHmw1fv5SBrYsPp8rUt6ryhwvtSOGbAs8VeklKoCPpoXBwaIDKmFEIFhCAbsFzM3qwN6GvtajeaUV/bIXYe92u7p9Jye1IrvD33z2xSeDQQG8aofIlBqXVWTeLxL0L99WDRV+A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777455726; c=relaxed/simple; bh=S+G5f1v55KF/VQLbCDiNNSR5kkKkvNfM7BwvHCeUeBg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=FyhikDsAw8AX4mV23leLdbeUlcXKuMNW6+KnfOKYaSbpRvE9XUn/cI5L24oqXOffwHX3wuXaKl022iesmqa5is3cqf65qRl2vdVhUK1KNwFrZfSg/HfaoEinmTKUlkmMybL3E49yf7zxu7zk8vb3Ryec7nDkRDy4fcijxzMqvtg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=HXXQsdYO; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="HXXQsdYO" Received: by smtp.kernel.org (Postfix) with ESMTPS id E1160C2BCB3; Wed, 29 Apr 2026 09:42:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1777455726; bh=S+G5f1v55KF/VQLbCDiNNSR5kkKkvNfM7BwvHCeUeBg=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=HXXQsdYOn3+u6oLbU1f6H0UcN0dlMOYU9IwNrGlAmh7hYPA722XQ5SVg/dAJqb7dt zu7Y/rtHTcKHnVGDO4TaUDmn/ae601+Aej3J9LNpKjCd8CxBQ+5ltBLpas9jy3oerI qhEjsYxh1bHwtOy8/DoE8KJUUdt+y+9Q7hhMqbKH0knfc24TofczEEMsa+rzsa8kWB pLJ8oeNXjuWedxGiNOHSA45DUvKAVet4kqJPbSEjOciWJLqvm2ary3aFQi5xRCKbHn qso2IXIrG8KLaNDg5VWBuFq689ygfsqIcDXdXgmfzsM8MSUS3zhNFE7rJ64ubi36Pc q6xVfLWGrODpQ== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id D482AFF8867; Wed, 29 Apr 2026 09:42:05 +0000 (UTC) From: Colin Huang via B4 Relay Date: Wed, 29 Apr 2026 17:41:59 +0800 Subject: [PATCH 2/3] Documentation/hwmon: add Delta E50SN12051 documentation Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260429-add-e50sn12051-v1-2-c101e6c80bbb@gmail.com> References: <20260429-add-e50sn12051-v1-0-c101e6c80bbb@gmail.com> In-Reply-To: <20260429-add-e50sn12051-v1-0-c101e6c80bbb@gmail.com> To: Guenter Roeck , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Kevin Chang , Jonathan Corbet , Shuah Khan Cc: linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Colin Huang , Colin Huang X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1777455724; l=3926; i=u8813345@gmail.com; s=20260202; h=from:subject:message-id; bh=fjIHEdGdFgCZriZJJHZn9TW0wcDHjeFCHvbUS0lc100=; b=OQYAtUS5gceSbMFz9dZPyD2rf4Qm0AflH+UO2NrCetAs6F6sEafEl25322aXmtL3nAJdcfcn5 NgmOVNwn0XuBDGS8Ksi5B0N+F+YdlZ/TzBFRut/b25qai0q2ovsvhJW X-Developer-Key: i=u8813345@gmail.com; a=ed25519; pk=Zlg0WqpCw4qbswOqamTBTXIchwR/3SnYZpy7rjaGMdQ= X-Endpoint-Received: by B4 Relay for u8813345@gmail.com/20260202 with auth_id=761 X-Original-From: Colin Huang Reply-To: u8813345@gmail.com From: Colin Huang 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 --- 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/e50sn= 12051.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 +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +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 +---------------- + +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D +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_L= IMIT if + TEMP_OT_WARNING status is set. +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D + 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 --=20 2.34.1 From nobody Tue Jun 16 20:36:35 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 39B622D2397; Wed, 29 Apr 2026 09:42:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777455726; cv=none; b=rQ9/sk0mUF1RIds2fWCBW3VsDwajghr1k9dnV8ywRf7PRn/UYb33+v4c15xo3hM5TvBfSoanmXKV6oO0p1NesWyr0ci4FTrTFeQkZ/W6YnwHPpNtmOMq8YGbj6N0VZhwGb0WUdk6PrDxP3BIB1+8JVeXW9uHDMdq1XtRnI48a4E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777455726; c=relaxed/simple; bh=T/qLh2DupgIrsjSNqn3yKpnc1y1Jix5B8y23UGV1XfI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=dp7MQterYOfYpS4hNhhiYqyz51K9Yk+xEgLyr6wVRX2XCvGCRkYrMi0O5153I1Zk9Mz84Gd0PNtsYvqcTr4tp3Ru6d4IhRY0H2+x329RdBv/na3YVAxJlUmxjoxfmXrmPlgMFSo3b6VFftO9CPl0l+jTALBLPc0pBASiVOJgSWU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=RZokkeA5; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="RZokkeA5" Received: by smtp.kernel.org (Postfix) with ESMTPS id EE737C2BCF4; Wed, 29 Apr 2026 09:42:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1777455726; bh=T/qLh2DupgIrsjSNqn3yKpnc1y1Jix5B8y23UGV1XfI=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=RZokkeA5JXlISB6vdc25hSCLHlN6n4Juo5ieY0H3SI7uZPmW7K7nDzc1jdJoAIAVF th1dnzxuUJEHPjt6yN7i52TPMeg1Gjc08NC9OIRE754yCdc/jmHp7Lg0ji0uoN8gPv VzsfJjfsRA5MPDMuMKHliTPDdAZ08C5vS3Ig/d/c1qpZINgbS4sBFVicfcWBP7urIt iVvCC8SWtjLpTjvmljKy70G7A3bkvFl5HALyXD2VLqE9kv2SC58YImH2XRiat7Hz0f tgFcLVC3NL5QYZVTLnEfgP3iG5goHlCRvHJa5kmykf2PJzA3WNiykoMzLnwVl7zdpN ti/ZRO8U7ZP/A== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id E56B0CCFA13; Wed, 29 Apr 2026 09:42:05 +0000 (UTC) From: Colin Huang via B4 Relay Date: Wed, 29 Apr 2026 17:42:00 +0800 Subject: [PATCH 3/3] hwmon: (pmbus) add support for Delta E50SN12051 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260429-add-e50sn12051-v1-3-c101e6c80bbb@gmail.com> References: <20260429-add-e50sn12051-v1-0-c101e6c80bbb@gmail.com> In-Reply-To: <20260429-add-e50sn12051-v1-0-c101e6c80bbb@gmail.com> To: Guenter Roeck , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Kevin Chang , Jonathan Corbet , Shuah Khan Cc: linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Colin Huang , Colin Huang X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1777455724; l=3531; i=u8813345@gmail.com; s=20260202; h=from:subject:message-id; bh=oOfgVU8xJ23RAc8R7rLid7SuguEX/M0GzcoNaRye0hw=; b=jarYjTXPvj4km61NsJwQXm0GK3UGwAeHLJM7WJvJTCBuUOS1odnDwNauakyjdtfNNLzm/Vt9O ioWDlSYvmLVCWwPFk4kA4oIKYAPX397nkAtfhMtjgjx+2WjWUZzFn7c X-Developer-Key: i=u8813345@gmail.com; a=ed25519; pk=Zlg0WqpCw4qbswOqamTBTXIchwR/3SnYZpy7rjaGMdQ= X-Endpoint-Received: by B4 Relay for u8813345@gmail.com/20260202 with auth_id=761 X-Original-From: Colin Huang Reply-To: u8813345@gmail.com From: Colin Huang Add the pmbus driver for Delta E50SN12051 600W Non-isolated 1/8th Brick DCDC Power Modules. Signed-off-by: Colin Huang --- 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. =20 +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) +=3D fsp-3y.o obj-$(CONFIG_SENSORS_HAC300S) +=3D hac300s.o obj-$(CONFIG_SENSORS_IBM_CFFPS) +=3D ibm-cffps.o obj-$(CONFIG_SENSORS_DPS920AB) +=3D dps920ab.o +obj-$(CONFIG_SENSORS_E50SN12051) +=3D e50sn12051.o obj-$(CONFIG_SENSORS_INA233) +=3D ina233.o obj-$(CONFIG_SENSORS_INSPUR_IPSPS) +=3D inspur-ipsps.o obj-$(CONFIG_SENSORS_IR35221) +=3D ir35221.o diff --git a/drivers/hwmon/pmbus/e50sn12051.c b/drivers/hwmon/pmbus/e50sn12= 051.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 +#include +#include +#include +#include +#include "pmbus.h" + +static struct pmbus_driver_info e50sn12051_info =3D { + .pages =3D 1, + .format[PSC_VOLTAGE_IN] =3D linear, + .format[PSC_VOLTAGE_OUT] =3D linear, + .format[PSC_CURRENT_OUT] =3D linear, + .format[PSC_TEMPERATURE] =3D linear, + .func[0] =3D 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[] =3D { { "e50sn12051", 0 = }, {} }; +MODULE_DEVICE_TABLE(i2c, e50sn12051_id); + +static const struct of_device_id e50sn12051_of_match[] =3D { + { .compatible =3D "delta,e50sn12051" }, + {}, +}; +MODULE_DEVICE_TABLE(of, e50sn12051_of_match); + +static int e50sn12051_probe(struct i2c_client *client) +{ + struct pmbus_driver_info *info; + + info =3D 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 =3D { + .driver =3D { + .name =3D "e50sn12051", + .of_match_table =3D e50sn12051_of_match, + }, + .probe =3D e50sn12051_probe, + + .id_table =3D e50sn12051_id, +}; + +module_i2c_driver(e50sn12051_driver); + +MODULE_AUTHOR("Kevin Chang "); +MODULE_DESCRIPTION("PMBus driver for E50SN12051"); +MODULE_LICENSE("GPL"); --=20 2.34.1