From patchwork Thu Apr 13 13:26:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lakshmi Yadlapati X-Patchwork-Id: 672922 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 859E0C77B78 for ; Thu, 13 Apr 2023 13:27:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231203AbjDMN1H (ORCPT ); Thu, 13 Apr 2023 09:27:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53924 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231182AbjDMN1G (ORCPT ); Thu, 13 Apr 2023 09:27:06 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 778A51FE1; Thu, 13 Apr 2023 06:27:05 -0700 (PDT) Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 33DCib4p031062; Thu, 13 Apr 2023 13:26:38 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : mime-version; s=pp1; bh=uTa3FQ+xG5oEQO2Mnd2mbHEOM10OZO8eUlLgwbHNbmE=; b=OAq1uWQtZGvvPy+o77ZRGPMAIgrySloHVNL/EyAEKqX1B/UoHdNzcNYReIFd/EMHCehn mQ1rqe2nQOGxaEr91NDlRSQoN2J/AsQntP6ghRDXZ+rx4/OUMZtHBCsxzOohaA+YeB2C iJsuL4njKwAM+qr4rRUzLKIwBVEp7BrKhzplnVJ2IeiJHe19z/bnTOznoaJQhBbxHaTp v5LRtmg09mFymZi/vmpouH+VIx7HRN+TAOY+Vva+OGaUznK4bkRawfGNlKaYdSg1c4d7 inmZB1oQFmkF+uz8SUqQUdQFrlf03xaZ5uO5sz+Gc64fPvBKUrc0q8HhQVEp0oNZu+r8 TQ== Received: from ppma01wdc.us.ibm.com (fd.55.37a9.ip4.static.sl-reverse.com [169.55.85.253]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3pxj0q1x6r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 13 Apr 2023 13:26:37 +0000 Received: from pps.filterd (ppma01wdc.us.ibm.com [127.0.0.1]) by ppma01wdc.us.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 33DCgit2013517; Thu, 13 Apr 2023 13:26:36 GMT Received: from smtprelay04.dal12v.mail.ibm.com ([9.208.130.102]) by ppma01wdc.us.ibm.com (PPS) with ESMTPS id 3pu0m6upnk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 13 Apr 2023 13:26:36 +0000 Received: from smtpav05.dal12v.mail.ibm.com (smtpav05.dal12v.mail.ibm.com [10.241.53.104]) by smtprelay04.dal12v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 33DDQZjg10945196 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 13 Apr 2023 13:26:35 GMT Received: from smtpav05.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0C5C45805D; Thu, 13 Apr 2023 13:26:35 +0000 (GMT) Received: from smtpav05.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id F151B58056; Thu, 13 Apr 2023 13:26:34 +0000 (GMT) Received: from gfwa600.aus.stglabs.ibm.com (unknown [9.3.84.101]) by smtpav05.dal12v.mail.ibm.com (Postfix) with ESMTPS; Thu, 13 Apr 2023 13:26:34 +0000 (GMT) Received: by gfwa600.aus.stglabs.ibm.com (Postfix, from userid 181152) id A121974514C; Thu, 13 Apr 2023 08:26:34 -0500 (CDT) From: Lakshmi Yadlapati To: robh+dt@kernel.org, linux@roeck-us.net, jdelvare@suse.com, krzysztof.kozlowski+dt@linaro.org, joel@jms.id.au, andrew@aj.id.au, eajames@linux.ibm.com Cc: linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, Lakshmi Yadlapati , Krzysztof Kozlowski Subject: [PATCH v7 1/5] dt-bindings: vendor-prefixes: Add prefix for acbel Date: Thu, 13 Apr 2023 08:26:23 -0500 Message-Id: <20230413132627.3444119-2-lakshmiy@us.ibm.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230413132627.3444119-1-lakshmiy@us.ibm.com> References: <20230413132627.3444119-1-lakshmiy@us.ibm.com> X-TM-AS-GCONF: 00 X-Proofpoint-GUID: -sQzdzxI-7lbBxx58CMTPaQK-3LzCxkM X-Proofpoint-ORIG-GUID: -sQzdzxI-7lbBxx58CMTPaQK-3LzCxkM X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-04-13_08,2023-04-13_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 spamscore=0 lowpriorityscore=0 suspectscore=0 malwarescore=0 mlxscore=0 mlxlogscore=568 impostorscore=0 priorityscore=1501 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303200000 definitions=main-2304130116 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add a vendor prefix entry for acbel (https://www.acbel.com) Signed-off-by: Lakshmi Yadlapati Acked-by: Krzysztof Kozlowski --- Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml index ed64e06ecca4..9dbb8f69be65 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.yaml +++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml @@ -37,6 +37,8 @@ patternProperties: description: Abracon Corporation "^abt,.*": description: ShenZhen Asia Better Technology Ltd. + "^acbel,.*": + description: Acbel Polytech Inc. "^acer,.*": description: Acer Inc. "^acme,.*": From patchwork Thu Apr 13 13:26:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lakshmi Yadlapati X-Patchwork-Id: 674225 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 398C8C77B6F for ; Thu, 13 Apr 2023 13:27:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231237AbjDMN1I (ORCPT ); Thu, 13 Apr 2023 09:27:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231192AbjDMN1G (ORCPT ); Thu, 13 Apr 2023 09:27:06 -0400 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7C5B82D67; Thu, 13 Apr 2023 06:27:05 -0700 (PDT) Received: from pps.filterd (m0127361.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 33DCV9KI027891; Thu, 13 Apr 2023 13:26:38 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=JBGUWeE4Kqhf4rYB4gtbBEROi3DJ1G04g/xw6cAMsFA=; b=m79VlwwShxLQ0vs3bYSDgWwT6Nh1sxPrNiOST2ZKAvs1MbvdefGzxxojXraUiQtwxFtk BwOGROHglu2Izov7WTiCkyEYJe8ub0RBLXkR+SkUrHS5ZNt7j34kd2S2S25G2cXmSvHG iXUn5GGAh7q4PlTxTcXu2CZ41S8XcUPxGK09xky0tiuvarZkE5VUDdzFW+7JVhpYHLct K6bK2JHFtnGuA34xQGK7wWFbXoUWoixyOJq8uRvavvOmtbIyixMkhc+HGZ2+XzOoYTV/ q8zD0V4Vb/F4chT7Mlz/j9kTbrNM8dPfHLYZycDlzJfVL5lNbzU9rkcQF6QaBEi6GZEi WQ== Received: from ppma01dal.us.ibm.com (83.d6.3fa9.ip4.static.sl-reverse.com [169.63.214.131]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3pxf129rxj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 13 Apr 2023 13:26:37 +0000 Received: from pps.filterd (ppma01dal.us.ibm.com [127.0.0.1]) by ppma01dal.us.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 33DB5Dqo027962; Thu, 13 Apr 2023 13:26:36 GMT Received: from smtprelay07.dal12v.mail.ibm.com ([9.208.130.99]) by ppma01dal.us.ibm.com (PPS) with ESMTPS id 3pu0jjjjd3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 13 Apr 2023 13:26:36 +0000 Received: from smtpav02.dal12v.mail.ibm.com (smtpav02.dal12v.mail.ibm.com [10.241.53.101]) by smtprelay07.dal12v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 33DDQZI434865896 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 13 Apr 2023 13:26:35 GMT Received: from smtpav02.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0573D5806F; Thu, 13 Apr 2023 13:26:35 +0000 (GMT) Received: from smtpav02.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EAABD5806D; Thu, 13 Apr 2023 13:26:34 +0000 (GMT) Received: from gfwa600.aus.stglabs.ibm.com (unknown [9.3.84.101]) by smtpav02.dal12v.mail.ibm.com (Postfix) with ESMTPS; Thu, 13 Apr 2023 13:26:34 +0000 (GMT) Received: by gfwa600.aus.stglabs.ibm.com (Postfix, from userid 181152) id A6C6774514D; Thu, 13 Apr 2023 08:26:34 -0500 (CDT) From: Lakshmi Yadlapati To: robh+dt@kernel.org, linux@roeck-us.net, jdelvare@suse.com, krzysztof.kozlowski+dt@linaro.org, joel@jms.id.au, andrew@aj.id.au, eajames@linux.ibm.com Cc: linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, Lakshmi Yadlapati , Rob Herring Subject: [PATCH v7 2/5] dt-bindings: trivial-devices: Add acbel,fsg032 Date: Thu, 13 Apr 2023 08:26:24 -0500 Message-Id: <20230413132627.3444119-3-lakshmiy@us.ibm.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230413132627.3444119-1-lakshmiy@us.ibm.com> References: <20230413132627.3444119-1-lakshmiy@us.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: qtByEQl53lWGQ1wpyFstGDC8F_WvTTBE X-Proofpoint-GUID: qtByEQl53lWGQ1wpyFstGDC8F_WvTTBE X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-04-13_08,2023-04-13_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 bulkscore=0 adultscore=0 mlxscore=0 spamscore=0 suspectscore=0 priorityscore=1501 malwarescore=0 lowpriorityscore=0 impostorscore=0 mlxlogscore=780 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303200000 definitions=main-2304130116 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add new Acbel FSG032 power supply to trivial devices. Signed-off-by: Lakshmi Yadlapati Acked-by: Rob Herring --- 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 6f482a254a1d..246863a9bc7e 100644 --- a/Documentation/devicetree/bindings/trivial-devices.yaml +++ b/Documentation/devicetree/bindings/trivial-devices.yaml @@ -29,6 +29,8 @@ properties: compatible: items: - enum: + # Acbel fsg032 power supply + - acbel,fsg032 # SMBus/I2C Digital Temperature Sensor in 6-Pin SOT with SMBus Alert and Over Temperature Pin - ad,ad7414 # ADM9240: Complete System Hardware Monitor for uProcessor-Based Systems From patchwork Thu Apr 13 13:26:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lakshmi Yadlapati X-Patchwork-Id: 672923 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 59EDEC77B6F for ; Thu, 13 Apr 2023 13:27:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229762AbjDMN1F (ORCPT ); Thu, 13 Apr 2023 09:27:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53910 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229541AbjDMN1E (ORCPT ); Thu, 13 Apr 2023 09:27:04 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 370181FE1; Thu, 13 Apr 2023 06:27:00 -0700 (PDT) Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 33DCKLR3001310; Thu, 13 Apr 2023 13:26:38 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=YEeEucWqMdvl/w0fHu13v3UetqaV1bCa2Ep4Ai1Qeg4=; b=XvrnXCuDMyDvaY416OEH+c3QTzQaLuJo9rbRhbHPxd1XyC2zF+n0rjJ96X9bnLKSqJ2+ RKoqqw14lfN8++tcw7DNerVx2w1ng0QINNZKotAxg63w9zzGzUTRe/4lPBU6HKxl97Ox g64BKEjDsnkxaMNQnQZgYQAWca9OmyHpoMh1EAlzWmJxG6NV5z0bnYgfGzqy2LFNQTCK PuIHW46qbaOclajtsqVEUmtK1UM5SP4qvPsm3JvNqMDrpEtjlXbkV4VahY4TtOnuKI/O ZxyBwIdqd8cueUMqSHiZ80hHy4SbRS5hm+AE6fTDXSG5374hHkJUbH/TlhwbS2I5Kv4d oA== Received: from ppma02wdc.us.ibm.com (aa.5b.37a9.ip4.static.sl-reverse.com [169.55.91.170]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3pxg7depr6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 13 Apr 2023 13:26:37 +0000 Received: from pps.filterd (ppma02wdc.us.ibm.com [127.0.0.1]) by ppma02wdc.us.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 33DCtLPG022696; Thu, 13 Apr 2023 13:26:36 GMT Received: from smtprelay02.dal12v.mail.ibm.com ([9.208.130.97]) by ppma02wdc.us.ibm.com (PPS) with ESMTPS id 3pu0fa3qqw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 13 Apr 2023 13:26:36 +0000 Received: from smtpav01.dal12v.mail.ibm.com (smtpav01.dal12v.mail.ibm.com [10.241.53.100]) by smtprelay02.dal12v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 33DDQZow23331134 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 13 Apr 2023 13:26:35 GMT Received: from smtpav01.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id F3D455805D; Thu, 13 Apr 2023 13:26:34 +0000 (GMT) Received: from smtpav01.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E5EE658058; Thu, 13 Apr 2023 13:26:34 +0000 (GMT) Received: from gfwa600.aus.stglabs.ibm.com (unknown [9.3.84.101]) by smtpav01.dal12v.mail.ibm.com (Postfix) with ESMTPS; Thu, 13 Apr 2023 13:26:34 +0000 (GMT) Received: by gfwa600.aus.stglabs.ibm.com (Postfix, from userid 181152) id ABB8774514E; Thu, 13 Apr 2023 08:26:34 -0500 (CDT) From: Lakshmi Yadlapati To: robh+dt@kernel.org, linux@roeck-us.net, jdelvare@suse.com, krzysztof.kozlowski+dt@linaro.org, joel@jms.id.au, andrew@aj.id.au, eajames@linux.ibm.com Cc: linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, Lakshmi Yadlapati Subject: [PATCH v7 3/5] hwmon: (pmbus/acbel-fsg032) Add Acbel power supply Date: Thu, 13 Apr 2023 08:26:25 -0500 Message-Id: <20230413132627.3444119-4-lakshmiy@us.ibm.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230413132627.3444119-1-lakshmiy@us.ibm.com> References: <20230413132627.3444119-1-lakshmiy@us.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: cZBwy9_9XAgSIg-qkTE9Fn4OmhYEokdn X-Proofpoint-GUID: cZBwy9_9XAgSIg-qkTE9Fn4OmhYEokdn X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-04-13_08,2023-04-13_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 spamscore=0 malwarescore=0 suspectscore=0 mlxscore=0 bulkscore=0 impostorscore=0 phishscore=0 clxscore=1015 mlxlogscore=999 lowpriorityscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303200000 definitions=main-2304130116 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add the driver to support ACBEL FSG032 power supply. Signed-off-by: Lakshmi Yadlapati --- drivers/hwmon/pmbus/Kconfig | 9 ++++ drivers/hwmon/pmbus/Makefile | 1 + drivers/hwmon/pmbus/acbel-fsg032.c | 85 ++++++++++++++++++++++++++++++ 3 files changed, 95 insertions(+) create mode 100644 drivers/hwmon/pmbus/acbel-fsg032.c diff --git a/drivers/hwmon/pmbus/Kconfig b/drivers/hwmon/pmbus/Kconfig index 59d9a7430499..270b6336b76d 100644 --- a/drivers/hwmon/pmbus/Kconfig +++ b/drivers/hwmon/pmbus/Kconfig @@ -27,6 +27,15 @@ config SENSORS_PMBUS This driver can also be built as a module. If so, the module will be called pmbus. +config SENSORS_ACBEL_FSG032 + tristate "ACBEL FSG032 Power Supply" + help + If you say yes here you get hardware monitoring support for the ACBEL + FSG032 Power Supply. + + This driver can also be built as a module. If so, the module will + be called acbel-fsg032. + config SENSORS_ADM1266 tristate "Analog Devices ADM1266 Sequencer" select CRC8 diff --git a/drivers/hwmon/pmbus/Makefile b/drivers/hwmon/pmbus/Makefile index 3ae019916267..84ee960a6c2d 100644 --- a/drivers/hwmon/pmbus/Makefile +++ b/drivers/hwmon/pmbus/Makefile @@ -5,6 +5,7 @@ obj-$(CONFIG_PMBUS) += pmbus_core.o obj-$(CONFIG_SENSORS_PMBUS) += pmbus.o +obj-$(CONFIG_SENSORS_ACBEL_FSG032) += acbel-fsg032.o obj-$(CONFIG_SENSORS_ADM1266) += adm1266.o obj-$(CONFIG_SENSORS_ADM1275) += adm1275.o obj-$(CONFIG_SENSORS_BEL_PFE) += bel-pfe.o diff --git a/drivers/hwmon/pmbus/acbel-fsg032.c b/drivers/hwmon/pmbus/acbel-fsg032.c new file mode 100644 index 000000000000..28a25f30e2cf --- /dev/null +++ b/drivers/hwmon/pmbus/acbel-fsg032.c @@ -0,0 +1,85 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * Copyright 2023 IBM Corp. + */ + +#include +#include +#include +#include +#include +#include +#include "pmbus.h" + +static const struct i2c_device_id acbel_fsg032_id[] = { + { "acbel_fsg032" }, + {} +}; + +static struct pmbus_driver_info acbel_fsg032_info = { + .pages = 1, + .func[0] = PMBUS_HAVE_VIN | PMBUS_HAVE_IIN | PMBUS_HAVE_PIN | + PMBUS_HAVE_VOUT | PMBUS_HAVE_IOUT | PMBUS_HAVE_POUT | + PMBUS_HAVE_TEMP | PMBUS_HAVE_TEMP2 | PMBUS_HAVE_TEMP3 | + PMBUS_HAVE_FAN12 | PMBUS_HAVE_STATUS_VOUT | + PMBUS_HAVE_STATUS_IOUT | PMBUS_HAVE_STATUS_TEMP | + PMBUS_HAVE_STATUS_INPUT | PMBUS_HAVE_STATUS_FAN12, +}; + +static int acbel_fsg032_probe(struct i2c_client *client) +{ + u8 buf[I2C_SMBUS_BLOCK_MAX + 1]; + struct device *dev = &client->dev; + int rc; + + rc = i2c_smbus_read_block_data(client, PMBUS_MFR_ID, buf); + if (rc < 0) { + dev_err(dev, "Failed to read PMBUS_MFR_ID\n"); + return rc; + } + if (strncmp(buf, "ACBEL", 5)) { + buf[rc] = '\0'; + dev_err(dev, "Manufacturer '%s' not supported\n", buf); + return -ENODEV; + } + + rc = i2c_smbus_read_block_data(client, PMBUS_MFR_MODEL, buf); + if (rc < 0) { + dev_err(dev, "Failed to read PMBUS_MFR_MODEL\n"); + return rc; + } + + if (strncmp(buf, "FSG032", 6)) { + buf[rc] = '\0'; + dev_err(dev, "Model '%s' not supported\n", buf); + return -ENODEV; + } + + rc = pmbus_do_probe(client, &acbel_fsg032_info); + if (rc) + return rc; + + return 0; +} + +static const struct of_device_id acbel_fsg032_of_match[] = { + { .compatible = "acbel,fsg032" }, + {} +}; +MODULE_DEVICE_TABLE(of, acbel_fsg032_of_match); + +static struct i2c_driver acbel_fsg032_driver = { + .driver = { + .name = "acbel-fsg032", + .of_match_table = acbel_fsg032_of_match, + }, + .probe_new = acbel_fsg032_probe, + .id_table = acbel_fsg032_id, +}; + +module_i2c_driver(acbel_fsg032_driver); + +MODULE_AUTHOR("Lakshmi Yadlapati"); +MODULE_DESCRIPTION("PMBus driver for AcBel Power System power supplies"); +MODULE_LICENSE("GPL"); +MODULE_IMPORT_NS(PMBUS); From patchwork Thu Apr 13 13:26:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lakshmi Yadlapati X-Patchwork-Id: 674226 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 4BEEBC77B6E for ; Thu, 13 Apr 2023 13:27:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231143AbjDMN1G (ORCPT ); Thu, 13 Apr 2023 09:27:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53912 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229546AbjDMN1F (ORCPT ); Thu, 13 Apr 2023 09:27:05 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B0FBA213A; Thu, 13 Apr 2023 06:27:00 -0700 (PDT) Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 33DCSXWj000663; Thu, 13 Apr 2023 13:26:38 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=c1DB9Q+Cek+iqDACVGLynf6pmu9TXXNVC26gWlakK7A=; b=Ui35VO3l5d8jY+FGnNuljGSaITEulOYdda8G5KqoVxy1FNcUfkcdTzGsqy2Ho6wqPBu5 DLBe9V9l0I+YmxkUciQpsuGDRPpfGPUvKg0BlVUMW2XGqK7hxLbLV3iI+PAxdvOq7T6M wPhVeDHAJTxTbg3o4RJs/fAUvXjbFuj2ffQKYXjq7ShEPuVnfbPsDPfjf/66n9x2UxCV oWeHB6lxT13frR46uU1jDqmN87+ew8BiYIw9+0QT22izNZQPgWJeQ+hdtPAEtnmGVXY7 pwwfWCBSxxnhLSSkQyMK7OCMviXkjHKoyTBZ86+bWM+TbazCcd60+H1qwc0Rvtmv7Niw PA== Received: from ppma04dal.us.ibm.com (7a.29.35a9.ip4.static.sl-reverse.com [169.53.41.122]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3pxg7depru-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 13 Apr 2023 13:26:38 +0000 Received: from pps.filterd (ppma04dal.us.ibm.com [127.0.0.1]) by ppma04dal.us.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 33DBZ0Jb009423; Thu, 13 Apr 2023 13:26:37 GMT Received: from smtprelay02.wdc07v.mail.ibm.com ([9.208.129.120]) by ppma04dal.us.ibm.com (PPS) with ESMTPS id 3pu0h02h88-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 13 Apr 2023 13:26:37 +0000 Received: from smtpav03.dal12v.mail.ibm.com (smtpav03.dal12v.mail.ibm.com [10.241.53.102]) by smtprelay02.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 33DDQZCH29688448 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 13 Apr 2023 13:26:35 GMT Received: from smtpav03.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0C04358056; Thu, 13 Apr 2023 13:26:35 +0000 (GMT) Received: from smtpav03.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id F166058060; Thu, 13 Apr 2023 13:26:34 +0000 (GMT) Received: from gfwa600.aus.stglabs.ibm.com (unknown [9.3.84.101]) by smtpav03.dal12v.mail.ibm.com (Postfix) with ESMTPS; Thu, 13 Apr 2023 13:26:34 +0000 (GMT) Received: by gfwa600.aus.stglabs.ibm.com (Postfix, from userid 181152) id AFBFA74514F; Thu, 13 Apr 2023 08:26:34 -0500 (CDT) From: Lakshmi Yadlapati To: robh+dt@kernel.org, linux@roeck-us.net, jdelvare@suse.com, krzysztof.kozlowski+dt@linaro.org, joel@jms.id.au, andrew@aj.id.au, eajames@linux.ibm.com Cc: linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, Lakshmi Yadlapati Subject: [PATCH v7 4/5] docs: hwmon: Add documentaion for acbel-fsg032 PSU Date: Thu, 13 Apr 2023 08:26:26 -0500 Message-Id: <20230413132627.3444119-5-lakshmiy@us.ibm.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230413132627.3444119-1-lakshmiy@us.ibm.com> References: <20230413132627.3444119-1-lakshmiy@us.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: kkP5q22T9gNZMgBygf0bIuAc_jfX3WHP X-Proofpoint-GUID: kkP5q22T9gNZMgBygf0bIuAc_jfX3WHP X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-04-13_08,2023-04-13_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 spamscore=0 malwarescore=0 suspectscore=0 mlxscore=0 bulkscore=0 impostorscore=0 phishscore=0 clxscore=1015 mlxlogscore=929 lowpriorityscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303200000 definitions=main-2304130116 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add documentation changes for acbel-fsg032 psu Signed-off-by: Lakshmi Yadlapati --- Documentation/hwmon/acbel-fsg032.rst | 80 ++++++++++++++++++++++++++++ Documentation/hwmon/index.rst | 1 + 2 files changed, 81 insertions(+) create mode 100644 Documentation/hwmon/acbel-fsg032.rst diff --git a/Documentation/hwmon/acbel-fsg032.rst b/Documentation/hwmon/acbel-fsg032.rst new file mode 100644 index 000000000000..f1684b95e103 --- /dev/null +++ b/Documentation/hwmon/acbel-fsg032.rst @@ -0,0 +1,80 @@ +Kernel driver acbel-fsg032 +========================== + +Supported chips: + + * ACBEL FSG032-00xG power supply. + +Author: Lakshmi Yadlapati + +Description +----------- + +This driver supports ACBEL FSG032-00xG Power Supply. This driver +is a client to the core PMBus driver. + +Usage Notes +----------- + +This driver does not auto-detect devices. You will have to instantiate the +devices explicitly. Please see Documentation/i2c/instantiating-devices.rst for +details. + +Sysfs entries +------------- + +The following attributes are supported: + +======================= ====================================================== +curr1_crit Critical maximum current. +curr1_crit_alarm Input current critical alarm. +curr1_input Measured output current. +curr1_label "iin" +curr1_max Maximum input current. +curr1_max_alarm Maximum input current high alarm. +curr1_rated_max Maximum rated input current. +curr2_crit Critical maximum current. +curr2_crit_alarm Output current critical alarm. +curr2_input Measured output current. +curr2_label "iout1" +curr2_max Maximum output current. +curr2_max_alarm Output current high alarm. +curr2_rated_max Maximum rated output current. + + +fan1_alarm Fan 1 warning. +fan1_fault Fan 1 fault. +fan1_input Fan 1 speed in RPM. +fan1_target Set fan speed reference. + +in1_alarm Input voltage under-voltage alarm. +in1_input Measured input voltage. +in1_label "vin" +in1_rated_max Maximum rated input voltage. +in1_rated_min Minimum rated input voltage. +in2_crit Critical maximum output voltage. +in2_crit_alarm Output voltage critical high alarm. +in2_input Measured output voltage. +in2_label "vout1" +in2_lcrit Critical minimum output voltage. +in2_lcrit_alarm Output voltage critical low alarm. +in2_rated_max Maximum rated output voltage. +in2_rated_min Minimum rated output voltage. + +power1_alarm Input fault or alarm. +power1_input Measured input power. +power1_label "pin" +power1_max Input power limit. +power1_rated_max Maximum rated input power. +power2_crit Critical output power limit. +power2_crit_alarm Output power crit alarm limit exceeded. +power2_input Measured output power. +power2_label "pout" +power2_max Output power limit. +power2_max_alarm Output power high alarm. +power2_rated_max Maximum rated output power. + +temp[1-3]_input Measured temperature. +temp[1-2]_max Maximum temperature. +temp[1-3]_rated_max Temperature high alarm. +======================= ====================================================== diff --git a/Documentation/hwmon/index.rst b/Documentation/hwmon/index.rst index f1fe75f596a5..dc4ebed13617 100644 --- a/Documentation/hwmon/index.rst +++ b/Documentation/hwmon/index.rst @@ -23,6 +23,7 @@ Hardware Monitoring Kernel Drivers abituguru abituguru3 acpi_power_meter + acbel-fsg032 ad7314 adc128d818 adm1021 From patchwork Thu Apr 13 13:26:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lakshmi Yadlapati X-Patchwork-Id: 674224 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 62520C77B7E for ; Thu, 13 Apr 2023 13:27:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231262AbjDMN1I (ORCPT ); Thu, 13 Apr 2023 09:27:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53922 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231176AbjDMN1G (ORCPT ); Thu, 13 Apr 2023 09:27:06 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E55D52697; Thu, 13 Apr 2023 06:27:00 -0700 (PDT) Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 33DDOdE1031521; Thu, 13 Apr 2023 13:26:38 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=lACip7+EkKWDEeQBT2iYREjHR0TDo6jILmW0mTPMejc=; b=r9qLy0K1CkxZy/9wcPgtoMVR8QXHLuHlDj2XWWZtmCvyLLxXECnrI7eYkXT5PXutJTZk cYhqeXMSBStKVd0cVBvQK3ssnY+Rw5e7BlNvv6za9EzI928Ga8oVH7jUiIwHDLSSoJfE nIQirsMlCEuSCDBOHhFun3OiWe6DoGr2/jOxbQVPHFhZktjpFp7p6gCl8pEm/xHngpV1 eMPHgTwg9TbCDRBJQlbUVcp2utRLsjbegW2tzcCYn1d4o2KW0v/yTDe6jHaL0OijI6o/ C9yngNJ6eAdpR6T00SexjqwsWKOP/nZzdUkUOOvupBEyroAANsfkgLY/DvIzqjbcox0h MQ== Received: from ppma03wdc.us.ibm.com (ba.79.3fa9.ip4.static.sl-reverse.com [169.63.121.186]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3pxgvn43t5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 13 Apr 2023 13:26:37 +0000 Received: from pps.filterd (ppma03wdc.us.ibm.com [127.0.0.1]) by ppma03wdc.us.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 33DCuweE028289; Thu, 13 Apr 2023 13:26:36 GMT Received: from smtprelay07.dal12v.mail.ibm.com ([9.208.130.99]) by ppma03wdc.us.ibm.com (PPS) with ESMTPS id 3pu0frbq6m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 13 Apr 2023 13:26:36 +0000 Received: from smtpav02.dal12v.mail.ibm.com (smtpav02.dal12v.mail.ibm.com [10.241.53.101]) by smtprelay07.dal12v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 33DDQZGt38404466 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 13 Apr 2023 13:26:35 GMT Received: from smtpav02.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 41F165806F; Thu, 13 Apr 2023 13:26:35 +0000 (GMT) Received: from smtpav02.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 321B95806D; Thu, 13 Apr 2023 13:26:35 +0000 (GMT) Received: from gfwa600.aus.stglabs.ibm.com (unknown [9.3.84.101]) by smtpav02.dal12v.mail.ibm.com (Postfix) with ESMTPS; Thu, 13 Apr 2023 13:26:35 +0000 (GMT) Received: by gfwa600.aus.stglabs.ibm.com (Postfix, from userid 181152) id B3719745150; Thu, 13 Apr 2023 08:26:34 -0500 (CDT) From: Lakshmi Yadlapati To: robh+dt@kernel.org, linux@roeck-us.net, jdelvare@suse.com, krzysztof.kozlowski+dt@linaro.org, joel@jms.id.au, andrew@aj.id.au, eajames@linux.ibm.com Cc: linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, Lakshmi Yadlapati Subject: [PATCH v7 5/5] ARM: dts: aspeed: p10bmc: Change power supply info Date: Thu, 13 Apr 2023 08:26:27 -0500 Message-Id: <20230413132627.3444119-6-lakshmiy@us.ibm.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230413132627.3444119-1-lakshmiy@us.ibm.com> References: <20230413132627.3444119-1-lakshmiy@us.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: R4Hj-2SDmrpHUTXwHqKx7w8ezevAHEdu X-Proofpoint-ORIG-GUID: R4Hj-2SDmrpHUTXwHqKx7w8ezevAHEdu X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-04-13_08,2023-04-13_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 impostorscore=0 bulkscore=0 adultscore=0 mlxscore=0 mlxlogscore=852 lowpriorityscore=0 suspectscore=0 priorityscore=1501 clxscore=1015 phishscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303200000 definitions=main-2304130116 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Bonnell system supports new ACBEL FSG032 power supply on I2C addresses 5A and 5B. Update the device tree with new power supply information and device addresses. Signed-off-by: Lakshmi Yadlapati Reviewed-by: Eddie James --- arch/arm/boot/dts/aspeed-bmc-ibm-bonnell.dts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/arm/boot/dts/aspeed-bmc-ibm-bonnell.dts b/arch/arm/boot/dts/aspeed-bmc-ibm-bonnell.dts index a5be0ee048ec..4f959a4f8b58 100644 --- a/arch/arm/boot/dts/aspeed-bmc-ibm-bonnell.dts +++ b/arch/arm/boot/dts/aspeed-bmc-ibm-bonnell.dts @@ -552,14 +552,14 @@ ucd90160@64 { &i2c3 { status = "okay"; - power-supply@58 { - compatible = "ibm,cffps"; - reg = <0x58>; + power-supply@5a { + compatible = "acbel,fsg032"; + reg = <0x5a>; }; - power-supply@59 { - compatible = "ibm,cffps"; - reg = <0x59>; + power-supply@5b { + compatible = "acbel,fsg032"; + reg = <0x5b>; }; };