From nobody Thu Feb 12 10:35:14 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4FE0AC04FE2 for ; Mon, 24 Jul 2023 10:13:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231473AbjGXKNo (ORCPT ); Mon, 24 Jul 2023 06:13:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46668 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233257AbjGXKNB (ORCPT ); Mon, 24 Jul 2023 06:13:01 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2060d.outbound.protection.outlook.com [IPv6:2a01:111:f403:704b::60d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B9D9A3A8F; Mon, 24 Jul 2023 03:05:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Hz7y73/m3q2GuqjLomgOA07CwykmOTe35BLY/X13CDa1bc06q/VHDdNzNDBUp0rxoxQUEDDatWkbYijYUtYDcOzhymzzsgy5S/1RRVW5hjjLMafJM4MIhaitF7dnn8lFLqD7Pe2TOZ9oBFc6h2Zfqhh4iqyJJkrrAFH+MC2umnt4jk0DIt1QkwFLNJY1dz6IHRjABvdxePgsX9qL4ps1RF5FHlqBDyihBAxlzXp/T1825RNoAcuu1Fsq3uCZFmHpxhU4UoJDJRa0VrpqFDlwvTiIrhjXiSM37qN7Gir33mI5uZ91q6Rxt/GprimBtIOVEtZ0Pc/EMFcewOb++VyMJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=YgtaTGJTGGDEWVPGuXCbtqSZt939gq+qKbfx+/9idvY=; b=hT5cGuykYf+etY8Iz54jn7hklM0t/0+cdLqT3uM0Cn1UkkzYOmazeAPz+JZGRqC+rzj/StJTyKBslLnOgtIN18rAiobLRslfHQ6aeLy96P2TA1PONk5MscXOzS+HSE7GrhUQN7Qn/NXrfUEvdaF8udwdQhyupwaKAP5CGOls4z6eSyZLm9ds16RLeGya7VrPc3n+VrFugW4JEWBY/G4DY/s5lP8d1BOXIr3YCIefcRyiInIJrz89TZybbXCFjNxPzmxmog1sc/M2QJ2PrITiOncUY0vKqVKiOVC4z2ATpGJjOLw7goy1n8dPfhfm03wby1TquKiLxuFRZSptC57UbA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=fail (sender ip is 211.20.1.79) smtp.rcpttodomain=stwcx.xyz smtp.mailfrom=wiwynn.com; dmarc=fail (p=quarantine sp=quarantine pct=100) action=quarantine header.from=wiwynn.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wiwynn.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YgtaTGJTGGDEWVPGuXCbtqSZt939gq+qKbfx+/9idvY=; b=iROe70+Y3yeFrWPxoh/Ksy8fxVVLc1TaU+lLmgejK8FgBDqBoqL/5Kxer4Nt18gG3vthU5d304MPXr3AzIhBsZqkFCeXXX6xxIIHjU+rIZ/MTlnFOpo7p806Z84U3KCV/ZuoLyNCaWs70WwcFiNUBJt89yoGVzIbAXxbmgKxul992wGot+oIdJ7UOGgQBMaLCfBY3vOgr8GuEvBmet9dU2d7oanqEIP3jaYQJ+b/ukJDI+86ZAfZyLqYldDx6i6TXLF2cZ+cRroYIzZgfpuwLOcQgbaDhxdu4L+XDw2M/nxKEXMufIMjCjTGpztFH/gl0inHrRzVlaNLv1EpDDV2wg== Received: from PU1PR01CA0010.apcprd01.prod.exchangelabs.com (2603:1096:803:15::22) by PUZPR04MB6650.apcprd04.prod.outlook.com (2603:1096:301:11c::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6609.31; Mon, 24 Jul 2023 10:05:19 +0000 Received: from HK3PEPF0000021F.apcprd03.prod.outlook.com (2603:1096:803:15:cafe::16) by PU1PR01CA0010.outlook.office365.com (2603:1096:803:15::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6609.32 via Frontend Transport; Mon, 24 Jul 2023 10:05:19 +0000 X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 211.20.1.79) smtp.mailfrom=Wiwynn.com; dkim=none (message not signed) header.d=none;dmarc=fail action=quarantine header.from=Wiwynn.com; Received-SPF: Fail (protection.outlook.com: domain of Wiwynn.com does not designate 211.20.1.79 as permitted sender) receiver=protection.outlook.com; client-ip=211.20.1.79; helo=localhost.localdomain; Received: from localhost.localdomain (211.20.1.79) by HK3PEPF0000021F.mail.protection.outlook.com (10.167.8.41) with Microsoft SMTP Server id 15.20.6631.22 via Frontend Transport; Mon, 24 Jul 2023 10:05:18 +0000 From: Delphine CC Chiu To: patrick@stwcx.xyz, Delphine CC Chiu , Jean Delvare , Guenter Roeck , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-i2c@vger.kernel.org, linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] dt-bindings: hwmon: Add lltc ltc4286 driver bindings Date: Mon, 24 Jul 2023 18:05:11 +0800 Message-Id: <20230724100514.1028061-1-Delphine_CC_Chiu@Wiwynn.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230424101352.28117-1-Delphine_CC_Chiu@Wiwynn.com> References: <20230424101352.28117-1-Delphine_CC_Chiu@Wiwynn.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: HK3PEPF0000021F:EE_|PUZPR04MB6650:EE_ X-MS-Office365-Filtering-Correlation-Id: e83d5d8b-ffc1-4fb0-ca9c-08db8c2d7c50 X-MS-Exchange-AtpMessageProperties: SA X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yGTlxN18OufeHpvaeBpd4ktS7BXavgdvjk5oNv1hmiDP0yt/X7q6goLCi83wBfgbko+LEpmATP0PagYZ9PAuyNcCRtpIxKZ4vvw0s7Ou9XomN9HzUzrGiPGZor8VJlIXzu6l/XQD2mahuY48wmFB/f3m4HWlMBpa5hvtRe1PHccCm4Cbzht/llSuLnogb6NqEp6LIF1PuhVj5Xnyr+eyHuSLosJVM8TJKPSCiASM1cy7eCwySOeGatfgxBviQ1fsXLkeZwRa10vBmacz+K4L5THuYZh4eJKGbGrB4GZhJZkKrWyQ4otOK/oqWXkzztI2XEADMnWkoMyeSP24gKq9wlsUPTsHQ3tXa8Nh9R8hluX+uxLn0dFGqOsA306Jfi0vrEI168vhv9LJNt8AOYSc5o757BkXmw/iPKb0rD181ioC1rZACHOs7cl3pAvYb2t8zxGjd8fL51vJBRIYO4CZjzaXLUGXtGro76uYm8RTUOu8VQRlNdGYfApbpP4LCK+/a2iYzoEjXA1BzYyIy2iDCNIAeilEGU82fpYRy/6M+X+yVIVfft3+aW2h3wM4PATdtsfNaYCPNZaRnkM7YB2+OYOXZ3Lu1gFKe4rZYNtyqncQspU4/pEi+xSkKjP/zxJdt1MwD1HWUACWhYNfWZrwOcM8ncMQoiaHeYkpPlPF9eosIUCpiQAnHUs3InbEjINkQLMqNO+7SCdEg9hwWUXemg== X-Forefront-Antispam-Report: CIP:211.20.1.79;CTRY:TW;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:localhost.localdomain;PTR:211-20-1-79.hinet-ip.hinet.net;CAT:NONE;SFS:(13230028)(6069001)(4636009)(396003)(346002)(136003)(376002)(39860400002)(451199021)(82310400008)(46966006)(36840700001)(2906002)(40480700001)(478600001)(8676002)(966005)(6512007)(81166007)(356005)(47076005)(82740400003)(186003)(6506007)(336012)(26005)(956004)(2616005)(1076003)(36860700001)(86362001)(8936002)(5660300002)(9316004)(7416002)(36756003)(6666004)(6486002)(70586007)(70206006)(316002)(36736006)(110136005)(41300700001)(4326008);DIR:OUT;SFP:1101; X-OriginatorOrg: wiwynn.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jul 2023 10:05:18.7487 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e83d5d8b-ffc1-4fb0-ca9c-08db8c2d7c50 X-MS-Exchange-CrossTenant-Id: da6e0628-fc83-4caf-9dd2-73061cbab167 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=da6e0628-fc83-4caf-9dd2-73061cbab167;Ip=[211.20.1.79];Helo=[localhost.localdomain] X-MS-Exchange-CrossTenant-AuthSource: HK3PEPF0000021F.apcprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PUZPR04MB6650 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Add a device tree bindings for ltc4286 driver. Signed-off-by: Delphine CC Chiu --- .../bindings/hwmon/lltc,ltc4286.yaml | 49 +++++++++++++++++++ MAINTAINERS | 9 ++++ 2 files changed, 58 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwmon/lltc,ltc4286.ya= ml diff --git a/Documentation/devicetree/bindings/hwmon/lltc,ltc4286.yaml b/Do= cumentation/devicetree/bindings/hwmon/lltc,ltc4286.yaml new file mode 100644 index 000000000000..ad7f6ad888e4 --- /dev/null +++ b/Documentation/devicetree/bindings/hwmon/lltc,ltc4286.yaml @@ -0,0 +1,49 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/hwmon/lltc,ltc4286.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: LTC4286 power monitors + +maintainers: + - Delphine CC Chiu + +properties: + compatible: + enum: + - lltc,ltc4286 + - lltc,ltc4287 + + reg: + maxItems: 1 + + vrange_select_25p6: + description: + This property is a bool parameter to represent the + voltage range is 25.6 or not for this chip. + + shunt-resistor-micro-ohms: + description: + Resistor value in micro-Ohm + +required: + - compatible + - reg + - shunt-resistor-micro-ohms + +additionalProperties: false + +examples: + - | + i2c { + #address-cells =3D <1>; + #size-cells =3D <0>; + + power-sensor@40 { + compatible =3D "lltc,ltc4286"; + reg =3D <0x40>; + vrange_select_25p6; + shunt-resistor-micro-ohms =3D <300>; + }; + }; diff --git a/MAINTAINERS b/MAINTAINERS index d516295978a4..7c1cb9bd4f45 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -12344,6 +12344,15 @@ S: Maintained F: Documentation/hwmon/ltc4261.rst F: drivers/hwmon/ltc4261.c =20 +LTC4286 HARDWARE MONITOR DRIVER +M: Delphine CC Chiu +L: linux-i2c@vger.kernel.org +S: Maintained +F: Documentation/devicetree/bindings/hwmon/lltc,ltc4286.yaml +F: drivers/hwmon/pmbus/Kconfig +F: drivers/hwmon/pmbus/Makefile +F: drivers/hwmon/pmbus/ltc4286.c + LTC4306 I2C MULTIPLEXER DRIVER M: Michael Hennerich L: linux-i2c@vger.kernel.org --=20 2.25.1 From nobody Thu Feb 12 10:35:14 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 03B33C77B7E for ; Mon, 24 Apr 2023 10:14:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231517AbjDXKOT (ORCPT ); Mon, 24 Apr 2023 06:14:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39958 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231529AbjDXKOL (ORCPT ); Mon, 24 Apr 2023 06:14:11 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2085.outbound.protection.outlook.com [40.107.117.85]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 044173598; Mon, 24 Apr 2023 03:14:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XVNSeLwS4JxRKBMzVKONQ4T874drGg4tcJXOmokAyEL2YkzhGtu15oxzGdwedkjZEkV0uZaCkzEz9bp4p7KoxpocitbgTu0OIXXOX+/IfzKXcoX/tNlMWJj9/YaTEweuY3DHkZ31MlUS/xdQOAW8k6priLorrsRaEc0jaDs3rDlRFiUAXYVOGVIzdYOBjPKKpGCb507Zjr6BwErMuy0kTQo4OzKvCdXgn8JNLyanp4cv/wcZJTGvUuttYxQPD0Ql8rt5G/MG/cKBhoPbaLYhzIC0AZMP6CChhZo5Fiz7dG7EzU5F0LBMzZcsx2RKGckbFWkSjH4L+tWVJfMmxg233Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=X+jVyIJzHHk0P1FeplsZTZ0r2cd3RE/FBIpR2p+4C3c=; b=Sfw9cmhGltotkAY6xtKSKEi5PDrnEJrtfiF69h6hyeQbxeQjv8fDCNUyLSPdELVEdPYcB8CHqcu9Zo6+nUHLCrMlvtQf6SzKysUusHphykBksO4GM79a9gqEWzmXCcDKc9BDPPnl6OY0Hw7GJ/gbokYin7smEG5JA3IXbIkvY0Quz05ud03mw7P36QiKVc/3BHAM3PZkYaHPncT29Zcrg7WncJgZlf1A5v/bqDu2pjZ2gOg1Xlf/rC228iuleyLd9CfySBOaRrGKFPLVlmPJ3LjdAbuVkpKSjIXrZhvFiViJGEH18UEGYagViMCSql9uZBx9DKH+2bqx5RuexNcqvg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=fail (sender ip is 211.20.1.79) smtp.rcpttodomain=stwcx.xyz smtp.mailfrom=wiwynn.com; dmarc=fail (p=quarantine sp=quarantine pct=100) action=quarantine header.from=wiwynn.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wiwynn.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=X+jVyIJzHHk0P1FeplsZTZ0r2cd3RE/FBIpR2p+4C3c=; b=OoVLBWeFtY8iQQVjRB783Jce5kMe0W9XhzUFlPNy3Vu8xD2AiG9N9jq4Ivyp1U8Mr7MYXbTgnLnYmywWfHe7uYaWZlVDGk7yrWt4CQ4qXoPMXcSbz7uOnuPMQZ20PY5ybM+vWszuNigoL0+iGE7hw9YdPifXQB7ty624ELU6A4LXUjZV4vbuSkvnp9rXeu26kDMz65n3iTgW8QYIa9pRQzdhakCmPA78PJxmaMEQJoKqQWS00lua2HobjAzgeE+Vt3Ahn+Mhu1eqRdZM2YGc0hO7whj4XEN/TDVbWdqDF9vbEEFw84P6E84JdIFx7E9v3Q5n8t9Z4q0S/IL50wvJRw== Received: from PS2PR01CA0017.apcprd01.prod.exchangelabs.com (2603:1096:300:2d::29) by TYUPR04MB6639.apcprd04.prod.outlook.com (2603:1096:400:35a::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6319.22; Mon, 24 Apr 2023 10:14:04 +0000 Received: from PSAAPC01FT059.eop-APC01.prod.protection.outlook.com (2603:1096:300:2d:cafe::69) by PS2PR01CA0017.outlook.office365.com (2603:1096:300:2d::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6319.33 via Frontend Transport; Mon, 24 Apr 2023 10:14:03 +0000 X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 211.20.1.79) smtp.mailfrom=Wiwynn.com; dkim=none (message not signed) header.d=none;dmarc=fail action=quarantine header.from=Wiwynn.com; Received-SPF: Fail (protection.outlook.com: domain of Wiwynn.com does not designate 211.20.1.79 as permitted sender) receiver=protection.outlook.com; client-ip=211.20.1.79; helo=localhost.localdomain; Received: from localhost.localdomain (211.20.1.79) by PSAAPC01FT059.mail.protection.outlook.com (10.13.38.139) with Microsoft SMTP Server id 15.20.6340.19 via Frontend Transport; Mon, 24 Apr 2023 10:14:03 +0000 From: Delphine CC Chiu To: patrick@stwcx.xyz, Delphine CC Chiu , Jean Delvare , Guenter Roeck , Rob Herring , Krzysztof Kozlowski Cc: linux-i2c@vger.kernel.org, linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 1/2] dt-bindings: hwmon: Add lltc ltc4286 driver bindings Date: Mon, 24 Apr 2023 18:13:49 +0800 Message-Id: <20230424101352.28117-2-Delphine_CC_Chiu@Wiwynn.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230424101352.28117-1-Delphine_CC_Chiu@Wiwynn.com> References: <20230424101352.28117-1-Delphine_CC_Chiu@Wiwynn.com> X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PSAAPC01FT059:EE_|TYUPR04MB6639:EE_ MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 458a3fb4-4339-4c97-e2ba-08db44aca193 X-MS-Exchange-AtpMessageProperties: SA X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1LIAayCjCqc/j5eOCUx0GZPdFM9yYXHCoWx13eRcedxyljpBK13r54jPa/aKLUouOkp1G1I4Qsskfvqgtk78xY5I4UDo8iwH7oGc/Kxw41/z5mNurA6vReWe9e50vrg2In9ZK1kj+2JpuqMaxVMHic0n312huHEj3mVcCqGGxFBaEgygocIlcYK9yKynhjSebQ2qcXkzjMhSUi9nK9czKi9Ki6hXTAP0Vbf6WF42jxeRPxUIcoPrgaOo8hjRDBzgIkcurh4pycLEWkK5lovfEQ91C8qEis7RPkCihwc79pp2J9Qr2p8gQC9I/EWBj1FIpXGlfwYwOssR9arYhjooWYKN9J5N/x/CLuWeRsrBipoq94nssHaiPSK+Z6CoCcffC1dt4InEb5ZvtFL9j+g/hBVUcaDon7ve4u6ixg13LJYvGuhAkx7zEjPfbFW7hgqsEJfw5AnszuMP/aEKRqzVkaroiTzloFEnaXzIPnTQt4BgsG3st8PBUJ04teXQyTsUbET8oqtNtOkFEES73coAWWDYD0irg4T2MOLU8O8/mpQo7nnA7m39NSN5eEpu4yiRWltTtwKiXc02z2dkhfNO1BuOVDd4zN5PJy8MVfMMnaREL+Iu0MnG9Ouv551sy7tj0ywrzmaHBuoGP3Ue/Ltr+q5BEEvBq4Nk/1ahwJcwBD8= X-Forefront-Antispam-Report: CIP:211.20.1.79;CTRY:TW;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:localhost.localdomain;PTR:211-20-1-79.hinet-ip.hinet.net;CAT:NONE;SFS:(13230028)(6069001)(4636009)(376002)(39860400002)(136003)(396003)(346002)(451199021)(36840700001)(46966006)(478600001)(356005)(81166007)(1076003)(82740400003)(956004)(82310400005)(6666004)(6506007)(186003)(6512007)(26005)(2616005)(966005)(336012)(6486002)(36860700001)(47076005)(86362001)(4326008)(9316004)(110136005)(40480700001)(70586007)(36756003)(8936002)(8676002)(41300700001)(70206006)(36736006)(316002)(2906002)(5660300002);DIR:OUT;SFP:1101; X-OriginatorOrg: wiwynn.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Apr 2023 10:14:03.2848 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 458a3fb4-4339-4c97-e2ba-08db44aca193 X-MS-Exchange-CrossTenant-Id: da6e0628-fc83-4caf-9dd2-73061cbab167 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=da6e0628-fc83-4caf-9dd2-73061cbab167;Ip=[211.20.1.79];Helo=[localhost.localdomain] X-MS-Exchange-CrossTenant-AuthSource: PSAAPC01FT059.eop-APC01.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYUPR04MB6639 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Add a device tree bindings for ltc4286 driver. Signed-off-by: Delphine CC Chiu --- .../bindings/hwmon/lltc,ltc4286.yaml | 47 +++++++++++++++++++ MAINTAINERS | 9 ++++ 2 files changed, 56 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwmon/lltc,ltc4286.ya= ml diff --git a/Documentation/devicetree/bindings/hwmon/lltc,ltc4286.yaml b/Do= cumentation/devicetree/bindings/hwmon/lltc,ltc4286.yaml new file mode 100644 index 000000000000..c1c8e310f9c4 --- /dev/null +++ b/Documentation/devicetree/bindings/hwmon/lltc,ltc4286.yaml @@ -0,0 +1,47 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/hwmon/lltc,ltc4286.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: LTC4286 power monitors + +maintainers: + - Delphine CC Chiu + +properties: + compatible: + enum: + - lltc,ltc4286 + - lltc,ltc4287 + + reg: + maxItems: 1 + + vrange_select_25p6: + description: + This property is a bool parameter to represent the + voltage range is 25.6 or not for this chip. + + rsense-micro-ohms: + description: + Resistor value in micro-Ohm + +required: + - compatible + - reg + - rsense-micro-ohms + +additionalProperties: false + +examples: + - | + i2c { + status =3D "okay"; + ltc4286@40 { + compatible =3D "lltc,ltc4286"; + reg =3D <0x40>; + vrange_select_25p6; + rsense-micro-ohms =3D <300>; + }; + }; diff --git a/MAINTAINERS b/MAINTAINERS index c6545eb54104..930bdba0f73c 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -12183,6 +12183,15 @@ S: Maintained F: Documentation/hwmon/ltc4261.rst F: drivers/hwmon/ltc4261.c =20 +LTC4286 HARDWARE MONITOR DRIVER +M: Delphine CC Chiu +L: linux-i2c@vger.kernel.org +S: Maintained +F: Documentation/devicetree/bindings/hwmon/lltc,ltc4286.yaml +F: drivers/hwmon/pmbus/Kconfig +F: drivers/hwmon/pmbus/Makefile +F: drivers/hwmon/pmbus/ltc4286.c + LTC4306 I2C MULTIPLEXER DRIVER M: Michael Hennerich L: linux-i2c@vger.kernel.org --=20 2.17.1 From nobody Thu Feb 12 10:35:14 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7414DC77B7E for ; Mon, 24 Apr 2023 10:14:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229507AbjDXKO2 (ORCPT ); Mon, 24 Apr 2023 06:14:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40236 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231240AbjDXKOX (ORCPT ); Mon, 24 Apr 2023 06:14:23 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2049.outbound.protection.outlook.com [40.107.117.49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 519D740C5; Mon, 24 Apr 2023 03:14:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JFGqq6AwlDyo5uSHLmSPNBl0k3aGyOIrZf69Ra7NLKLk8Hpgy9NO7YAz2rmeVCGQqBFSQMLcVAf4k8MTEJqHs9J+8iZ5yGN9vGQOR2yEWiLtUYyRQHvloCUjaW6lzQCuzzPyym9br6uH0vF5pHTj4rKIvKw2rc6c5evfkl6cLvCgMUTr6lRilA/U4LUVJtPgHvGxc7xeFCFAxBGLMYEGIdxL6kDb7bUOoUvDmGEorSnG01Ho6fdBg8IGKQAP3SYDZh5AN/EHDLGnel88S69tcQiS2dFBTCzdxUf/J2RtNeIgcuSPCDFke85ooR6owVIHuyg6ni0oLzb87RgFBTK/GQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Lf7AFk93plJGjm+CcW1hU/4HpFIClbcuMRZi1phwoh8=; b=DQqiSL58ZpCatPxlmrVXwnH9uV6I868bxIJbbBZ7qJWwuf0oxbX3T29JUZ3NwOY7uinjPm+aGtpZ6vn3mDOsfJzJt/iLCH0Dh0GrFhNudjgA1cOhRmi9NkvxWVmzs2i1GQarL6uBQAa9+nTSyld9t/+utPNv19DhYxLy2Xf2BfHZQm2OD8qHCD1LXMsHDMHILzKwhyx3zKZdxXllbah03fIzrOCDz/H8D9Thmph1f7LavZyADwQbuTYZ5eIS/oBvjBXvazzF1miWQtHi3mrmDWxtJncN45+nPQcqqMTMFATOrGpucFTBmMmbqT+JY4yt4sMp7LWSY5ajz7GuG7lNhQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=fail (sender ip is 211.20.1.79) smtp.rcpttodomain=stwcx.xyz smtp.mailfrom=wiwynn.com; dmarc=fail (p=quarantine sp=quarantine pct=100) action=quarantine header.from=wiwynn.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wiwynn.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Lf7AFk93plJGjm+CcW1hU/4HpFIClbcuMRZi1phwoh8=; b=pfHZb8TIA+HwvP49jQVxb6GeKf0VVZqRKkBx63pHovEi3LTLDPLDvSipRoCH51xFjyIcDMHrAOnY67hngK0WdzWg2OTL1/nUQ+v1du0VF/qbcjQSj/ncWqQ+u6JKR9fRKae4t/lWcy8SeGGvStTOp6RdSThOVBR6gp0wWz6Lo9xr0yDKwYCcAoB/Fec0nBuzErZwGPfSvEDzoC2HgR11x4S6hVPKdwb0OU4NoTeJTqfmDhvvx24SnzRznSk3qTmEk3DmaiQPDO+NkgKiuHeq5I7LHG3jybG+AMW0weT5iMicYUyl3Z9riwr+pTUYyz1qrTdsQjgCB+0GZcHtoZTArA== Received: from PS2PR01CA0016.apcprd01.prod.exchangelabs.com (2603:1096:300:2d::28) by KL1PR04MB6781.apcprd04.prod.outlook.com (2603:1096:820:d2::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6319.33; Mon, 24 Apr 2023 10:14:09 +0000 Received: from PSAAPC01FT059.eop-APC01.prod.protection.outlook.com (2603:1096:300:2d:cafe::ea) by PS2PR01CA0016.outlook.office365.com (2603:1096:300:2d::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6319.33 via Frontend Transport; Mon, 24 Apr 2023 10:14:09 +0000 X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 211.20.1.79) smtp.mailfrom=Wiwynn.com; dkim=none (message not signed) header.d=none;dmarc=fail action=quarantine header.from=Wiwynn.com; Received-SPF: Fail (protection.outlook.com: domain of Wiwynn.com does not designate 211.20.1.79 as permitted sender) receiver=protection.outlook.com; client-ip=211.20.1.79; helo=localhost.localdomain; Received: from localhost.localdomain (211.20.1.79) by PSAAPC01FT059.mail.protection.outlook.com (10.13.38.139) with Microsoft SMTP Server id 15.20.6340.19 via Frontend Transport; Mon, 24 Apr 2023 10:14:08 +0000 From: Delphine CC Chiu To: patrick@stwcx.xyz, Delphine CC Chiu , Guenter Roeck , Jean Delvare Cc: Rob Herring , Krzysztof Kozlowski , linux-i2c@vger.kernel.org, linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 2/2] hwmon: pmbus: Add ltc4286 driver Date: Mon, 24 Apr 2023 18:13:50 +0800 Message-Id: <20230424101352.28117-3-Delphine_CC_Chiu@Wiwynn.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230424101352.28117-1-Delphine_CC_Chiu@Wiwynn.com> References: <20230424101352.28117-1-Delphine_CC_Chiu@Wiwynn.com> X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PSAAPC01FT059:EE_|KL1PR04MB6781:EE_ MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: d07d1931-df8e-4df9-8684-08db44aca4d1 X-MS-Exchange-AtpMessageProperties: SA X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: QB9O9xk1/aEsns41emaCDHBxDA7dR9zUftVTYUeXZVbkEESXflqMuIcUgu0Sx+28i3mfOovDylMsKlz8PY84AgCeEJa1zsH6maT9Oxs/oxYFHhaQ26pgYw/2AxFJqhAnKu/qGrz1O7EYPd/EZOhwxIL5TbLtqzz3YHSW2bWdLPyY4gU2DIv0L879siWCDeQRxArop43SE4UYKd8wyfpRFJ0WhQpvPIcZnXL+vP29tjl57jEoB6WDSVlwDhsuaaf2D+tqW8yyE35nvufTTwkcyYqnZG8J8TF/DePAW01PqZQ7bQJ/yqbnMrgEqj5aN30v5DWUCtT2njSHzoq2+nsgeuBJlfWo7K9QSjMS0ItixNy7mc54mpLued66U/HBwZc/xkUFsJ/R2uRPjFXPOI1xi0/wxPQiKM9GztMNce8bmuaiHQLGyU3exrhyPbmw7NGfyqqmVv2zi6MZ9+dgeT3VBrarhaWawK27sBh1u0ZCdJyf6HYVA8u0svtAqeYX5rnJ8+lH9CcQ6HSpLcfVlCxRoo7lrw+KdGKet9GCGV2Tuque3Ga4MPYqSB7u3uQGEu9uPRnVn7yjPvyp6YVAyl92A8uj0xK9HJlLCuXEKsfuFxDnDdgFEi8ejk0IpkRx6afmkVrhUZiE/QZ7KtjVQnC9/u0gvNyawn/t0a0A9ekYTbY= X-Forefront-Antispam-Report: CIP:211.20.1.79;CTRY:TW;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:localhost.localdomain;PTR:211-20-1-79.hinet-ip.hinet.net;CAT:NONE;SFS:(13230028)(6069001)(4636009)(136003)(39860400002)(346002)(396003)(376002)(451199021)(36840700001)(46966006)(81166007)(356005)(82740400003)(336012)(6506007)(6512007)(1076003)(26005)(2616005)(956004)(40480700001)(186003)(83380400001)(66574015)(47076005)(36860700001)(2906002)(8676002)(8936002)(5660300002)(9316004)(36756003)(54906003)(478600001)(6486002)(6666004)(110136005)(316002)(36736006)(4326008)(41300700001)(70206006)(70586007)(86362001)(82310400005);DIR:OUT;SFP:1101; X-OriginatorOrg: wiwynn.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Apr 2023 10:14:08.7222 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d07d1931-df8e-4df9-8684-08db44aca4d1 X-MS-Exchange-CrossTenant-Id: da6e0628-fc83-4caf-9dd2-73061cbab167 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=da6e0628-fc83-4caf-9dd2-73061cbab167;Ip=[211.20.1.79];Helo=[localhost.localdomain] X-MS-Exchange-CrossTenant-AuthSource: PSAAPC01FT059.eop-APC01.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR04MB6781 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Add support for ltc4286 driver Signed-off-by: Delphine CC Chiu --- drivers/hwmon/pmbus/Kconfig | 9 +++ drivers/hwmon/pmbus/Makefile | 1 + drivers/hwmon/pmbus/ltc4286.c | 142 ++++++++++++++++++++++++++++++++++ 3 files changed, 152 insertions(+) create mode 100644 drivers/hwmon/pmbus/ltc4286.c diff --git a/drivers/hwmon/pmbus/Kconfig b/drivers/hwmon/pmbus/Kconfig index 59d9a7430499..1230d910d681 100644 --- a/drivers/hwmon/pmbus/Kconfig +++ b/drivers/hwmon/pmbus/Kconfig @@ -218,6 +218,15 @@ config SENSORS_LTC3815 This driver can also be built as a module. If so, the module will be called ltc3815. =20 +config SENSORS_LTC4286 + bool "Linear Technologies LTC4286" + help + If you say yes here you get hardware monitoring support for Linear + Technology LTC4286. + + This driver can also be built as a module. If so, the module will + be called ltc4286. + config SENSORS_MAX15301 tristate "Maxim MAX15301" help diff --git a/drivers/hwmon/pmbus/Makefile b/drivers/hwmon/pmbus/Makefile index 3ae019916267..540265539580 100644 --- a/drivers/hwmon/pmbus/Makefile +++ b/drivers/hwmon/pmbus/Makefile @@ -23,6 +23,7 @@ obj-$(CONFIG_SENSORS_LM25066) +=3D lm25066.o obj-$(CONFIG_SENSORS_LT7182S) +=3D lt7182s.o obj-$(CONFIG_SENSORS_LTC2978) +=3D ltc2978.o obj-$(CONFIG_SENSORS_LTC3815) +=3D ltc3815.o +obj-$(CONFIG_SENSORS_LTC4286) +=3D ltc4286.o obj-$(CONFIG_SENSORS_MAX15301) +=3D max15301.o obj-$(CONFIG_SENSORS_MAX16064) +=3D max16064.o obj-$(CONFIG_SENSORS_MAX16601) +=3D max16601.o diff --git a/drivers/hwmon/pmbus/ltc4286.c b/drivers/hwmon/pmbus/ltc4286.c new file mode 100644 index 000000000000..474f4ec9107c --- /dev/null +++ b/drivers/hwmon/pmbus/ltc4286.c @@ -0,0 +1,142 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * Hardware monitoring driver for LTC4286 Hot-Swap Controller + * + * Copyright (c) 2023 Linear Technology + */ + +#include +#include +#include +#include +#include +#include +#include "pmbus.h" + +// LTC4286 register +#define LTC4286_MFR_CONFIG1 (0xF2) + +// LTC4286 configuration +#define VRANGE_SELECT (1 << 1) + +#define LTC4286_MFR_ID_SIZE 3 + +enum chips { ltc4286, ltc4287 }; + +static struct pmbus_driver_info ltc4286_info =3D { + .pages =3D 1, + .format[PSC_VOLTAGE_IN] =3D direct, + .format[PSC_VOLTAGE_OUT] =3D direct, + .format[PSC_CURRENT_OUT] =3D direct, + .format[PSC_POWER] =3D direct, + .format[PSC_TEMPERATURE] =3D direct, + .m[PSC_VOLTAGE_IN] =3D 32, + .b[PSC_VOLTAGE_IN] =3D 0, + .R[PSC_VOLTAGE_IN] =3D 1, + .m[PSC_VOLTAGE_OUT] =3D 32, + .b[PSC_VOLTAGE_OUT] =3D 0, + .R[PSC_VOLTAGE_OUT] =3D 1, + .m[PSC_CURRENT_OUT] =3D 1024, + .b[PSC_CURRENT_OUT] =3D 0, + .R[PSC_CURRENT_OUT] =3D 3 - 6, + .m[PSC_POWER] =3D 1, + .b[PSC_POWER] =3D 0, + .R[PSC_POWER] =3D 4 - 6, + .m[PSC_TEMPERATURE] =3D 1, + .b[PSC_TEMPERATURE] =3D 273.15, + .R[PSC_TEMPERATURE] =3D 0, + .func[0] =3D PMBUS_HAVE_VIN | PMBUS_HAVE_VOUT | PMBUS_HAVE_IOUT | + PMBUS_HAVE_PIN | PMBUS_HAVE_TEMP, +}; + +static int ltc4286_probe(struct i2c_client *client, + const struct i2c_device_id *id) +{ + int ret; + u8 block_buffer[I2C_SMBUS_BLOCK_MAX + 1]; + struct device *dev =3D &client->dev; + struct pmbus_driver_info *info; + u32 rsense; + + ret =3D i2c_smbus_read_block_data(client, PMBUS_MFR_ID, block_buffer); + if (ret < 0) { + dev_err(&client->dev, "failed to read manufacturer id\n"); + return ret; + } + + /* Refer to ltc4286 datasheet page 20 + * the default manufacturer id is LTC + */ + if (ret !=3D LTC4286_MFR_ID_SIZE || + strncmp(block_buffer, "LTC", LTC4286_MFR_ID_SIZE)) { + dev_err(&client->dev, "unsupported manufacturer id\n"); + return -ENODEV; + } + + ret =3D i2c_smbus_read_block_data(client, PMBUS_MFR_MODEL, block_buffer); + if (ret < 0) { + dev_err(&client->dev, "failed to read manufacturer model\n"); + return ret; + } + + ret =3D of_property_read_u32(client->dev.of_node, "rsense-micro-ohms", + &rsense); + if (ret < 0) + return ret; + + if (rsense =3D=3D 0) + return -EINVAL; + + info =3D <c4286_info; + + /* Default of VRANGE_SELECT =3D 1 */ + if (device_property_read_bool(dev, "vrange_select_25p6")) { + /* Setup MFR1 CONFIG register bit 1 VRANGE_SELECT */ + ret =3D i2c_smbus_read_word_data(client, LTC4286_MFR_CONFIG1); + if (ret < 0) { + dev_err(&client->dev, + "failed to read manufacturer configuration one\n"); + return ret; + } + + ret &=3D ~VRANGE_SELECT; /* VRANGE_SELECT =3D 0, 25.6V */ + i2c_smbus_write_word_data(client, LTC4286_MFR_CONFIG1, ret); + + info->m[PSC_VOLTAGE_IN] =3D 128; + info->m[PSC_VOLTAGE_OUT] =3D 128; + info->m[PSC_POWER] =3D 4 * rsense; + } else { + info->m[PSC_POWER] =3D rsense; + } + + info->m[PSC_CURRENT_OUT] =3D 1024 * rsense; + + return pmbus_do_probe(client, info); +} + +static const struct i2c_device_id ltc4286_id[] =3D { { "ltc4286", ltc4286 = }, + { "ltc4287", ltc4287 }, + {} }; +MODULE_DEVICE_TABLE(i2c, ltc4286_id); + +static const struct of_device_id ltc4286_of_match[] =3D { + { .compatible =3D "lltc,ltc4286" }, + { .compatible =3D "lltc,ltc4287" }, + {} +}; + +/* This is the driver that will be inserted */ +static struct i2c_driver ltc4286_driver =3D { + .driver =3D { + .name =3D "ltc4286", + .of_match_table =3D ltc4286_of_match, + }, + .probe =3D ltc4286_probe, + .id_table =3D ltc4286_id, +}; + +module_i2c_driver(ltc4286_driver); + +MODULE_AUTHOR("Delphine CC Chiu "); +MODULE_DESCRIPTION("PMBUS driver for LTC4286 and compatibles"); +MODULE_LICENSE("GPL"); --=20 2.17.1