From patchwork Wed Mar 22 11:46:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lakshmi Yadlapati X-Patchwork-Id: 13183969 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 EDC14C6FD1F for ; Wed, 22 Mar 2023 11:48:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230478AbjCVLr7 (ORCPT ); Wed, 22 Mar 2023 07:47:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50550 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230110AbjCVLrp (ORCPT ); Wed, 22 Mar 2023 07:47:45 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 19FC66189C; Wed, 22 Mar 2023 04:46:57 -0700 (PDT) Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 32MBCEek013324; Wed, 22 Mar 2023 11:46:33 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=FUwOquj9z1MgPQVXWJffGH5SCJGct9pa82QsRDPwz70=; b=oJeJOQ2hspG1Vtcwdhe2Y2IMox5PPpw0NkLwo/QHa+NQaNKOn0xJxda/aD2f2hafKLDN jOlNRlZ3ALxRYROEHcirV8CvvFcfXYKrmA6A2miF/NaEgBFTdrAsvXMz7Bw9ZBkLDHI9 jMfy/N9a/6ptER/HgTrtUmdEIT4ZnHEfeDEdMQNVO8tDuZOivTYVXjQ6EyoNu4Rm1ZxF ZJM69S748G5Mlm5Jz+dGeZZ2aFB0PW9rfVEu5Bn96x+WHsPCwzSrwaLypF8ZvJcIFoOg NK33na0hLeRrBm2eGJ7ZFeRREeNMbKOFM0d/lPy22FnMMvgblkqibsnbXs9c8KO1Tzcw jA== 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 3pg0khgs2p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 22 Mar 2023 11:46:33 +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 32M96HqU022001; Wed, 22 Mar 2023 11:46:32 GMT Received: from smtprelay07.wdc07v.mail.ibm.com ([9.208.129.116]) by ppma01dal.us.ibm.com (PPS) with ESMTPS id 3pd4x7p0ey-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 22 Mar 2023 11:46:32 +0000 Received: from smtpav01.dal12v.mail.ibm.com (smtpav01.dal12v.mail.ibm.com [10.241.53.100]) by smtprelay07.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 32MBkUt08585828 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 22 Mar 2023 11:46:30 GMT Received: from smtpav01.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1637F58058; Wed, 22 Mar 2023 11:46:30 +0000 (GMT) Received: from smtpav01.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0898B58057; Wed, 22 Mar 2023 11:46:30 +0000 (GMT) Received: from gfwa600.aus.stglabs.ibm.com (unknown [9.3.84.101]) by smtpav01.dal12v.mail.ibm.com (Postfix) with ESMTPS; Wed, 22 Mar 2023 11:46:29 +0000 (GMT) Received: by gfwa600.aus.stglabs.ibm.com (Postfix, from userid 181152) id C735774A47C; Wed, 22 Mar 2023 06:46:29 -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 v4 1/5] dt-bindings: vendor-prefixes: Add prefix for acbel Date: Wed, 22 Mar 2023 06:46:19 -0500 Message-Id: <20230322114623.2278920-2-lakshmiy@us.ibm.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230322114623.2278920-1-lakshmiy@us.ibm.com> References: <20230322114623.2278920-1-lakshmiy@us.ibm.com> X-TM-AS-GCONF: 00 X-Proofpoint-GUID: AmiuRsICSiZ0ornqT7jZQAAF9NpcDHEf X-Proofpoint-ORIG-GUID: AmiuRsICSiZ0ornqT7jZQAAF9NpcDHEf 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-03-22_08,2023-03-22_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 bulkscore=0 mlxlogscore=587 impostorscore=0 mlxscore=0 lowpriorityscore=0 phishscore=0 priorityscore=1501 adultscore=0 spamscore=0 suspectscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303150002 definitions=main-2303220082 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org Add a vendor prefix entry for acbel (https://www.acbel.com) Signed-off-by: Lakshmi Yadlapati --- 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 Wed Mar 22 11:46:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lakshmi Yadlapati X-Patchwork-Id: 13183971 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 967F2C761AF for ; Wed, 22 Mar 2023 11:48:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229567AbjCVLsC (ORCPT ); Wed, 22 Mar 2023 07:48:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49880 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230378AbjCVLrp (ORCPT ); Wed, 22 Mar 2023 07:47:45 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE9C75FEAB; Wed, 22 Mar 2023 04:46:59 -0700 (PDT) Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 32MBXqqS001695; Wed, 22 Mar 2023 11:46:33 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=3LxluC39/CVC+01L9PYZwYTWrsy3V6eD2E0f8nrYyHg=; b=heiVdydkXqbNBYs4G5PUrBZlNX8l6rV7MSYzYOIA8fN/bhUqh1VewX8m0NQ8cyRRMtIE bKw1m1FHIdWtMFl+z+FV8RXu5LYp+EZwADs50BsiPi4cP7UzpSHgsow00d0YeshYS39M 5SDlOHlQSB2QjnJoW/RSU4xN5DKA7cuTICd2mGlk1Bz2XI18MqoyJQLjmJmMVM6tOjQc h3tRKQuqvqEGEfrbc3EZ9XRdbp/cM02x73ax2JgLunlEMyJ06RKhtWdVriE/otHOpMAk 683o4goJvRPQJmss2MKV9mPiPUuovx7SXRacmAfPJux+WJvaObSEw5+v+QvSm0o61VqU nw== Received: from ppma02dal.us.ibm.com (a.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.10]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3pg05a9k15-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 22 Mar 2023 11:46:33 +0000 Received: from pps.filterd (ppma02dal.us.ibm.com [127.0.0.1]) by ppma02dal.us.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 32MB8Rjp000564; Wed, 22 Mar 2023 11:46:32 GMT Received: from smtprelay05.dal12v.mail.ibm.com ([9.208.130.101]) by ppma02dal.us.ibm.com (PPS) with ESMTPS id 3pd4x7p08u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 22 Mar 2023 11:46:32 +0000 Received: from smtpav01.wdc07v.mail.ibm.com (smtpav01.wdc07v.mail.ibm.com [10.39.53.228]) by smtprelay05.dal12v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 32MBkU4N328410 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 22 Mar 2023 11:46:30 GMT Received: from smtpav01.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 649AD58055; Wed, 22 Mar 2023 11:46:30 +0000 (GMT) Received: from smtpav01.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4EC265804B; Wed, 22 Mar 2023 11:46:30 +0000 (GMT) Received: from gfwa600.aus.stglabs.ibm.com (unknown [9.3.84.101]) by smtpav01.wdc07v.mail.ibm.com (Postfix) with ESMTPS; Wed, 22 Mar 2023 11:46:30 +0000 (GMT) Received: by gfwa600.aus.stglabs.ibm.com (Postfix, from userid 181152) id CAB8274A47D; Wed, 22 Mar 2023 06:46:29 -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 v4 2/5] dt-bindings: trivial-devices: Add acbel,fsg032 Date: Wed, 22 Mar 2023 06:46:20 -0500 Message-Id: <20230322114623.2278920-3-lakshmiy@us.ibm.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230322114623.2278920-1-lakshmiy@us.ibm.com> References: <20230322114623.2278920-1-lakshmiy@us.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: wJU59MmgIu-gfJ_ctcqY64N7Km8uIzDw X-Proofpoint-ORIG-GUID: wJU59MmgIu-gfJ_ctcqY64N7Km8uIzDw 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-03-22_08,2023-03-22_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 spamscore=0 clxscore=1015 priorityscore=1501 mlxscore=0 suspectscore=0 mlxlogscore=696 bulkscore=0 malwarescore=0 adultscore=0 impostorscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303150002 definitions=main-2303220082 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@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 Wed Mar 22 11:46:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lakshmi Yadlapati X-Patchwork-Id: 13183968 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 2AC6DC761AF for ; Wed, 22 Mar 2023 11:47:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230367AbjCVLrz (ORCPT ); Wed, 22 Mar 2023 07:47:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230415AbjCVLrl (ORCPT ); Wed, 22 Mar 2023 07:47:41 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 38E2D61536; Wed, 22 Mar 2023 04:46:54 -0700 (PDT) Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 32MBR3Ob019059; Wed, 22 Mar 2023 11:46:32 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=dCkWgDXPHL7UMRjkixDeGBJDy3gX9OY9N/nQn9w0XWw=; b=XTh5chKm/z0ooaBuHiOZ8WZD4QCaV8jcTOCAsoTsk0kjJqfxJw2iS4kINr0+wXrCkkax aa2rzBEkRdLGF8a9VdmI9c2NQvCYrrwJC+nCftspQE5srWCYaX30fMVcsK1Seu6qIoK1 SbGqS3IoSa9A86VZ16V2mhVPKEeA6ydNDacpy2DGza29bM+sNKgig+pFBPnFKqn7ZJtW h177ibg4nJKBwOm0wP9XmvVyPe8yOWsRq+Q+1JPPK0Q6p99f+M5k+EVsO6R/JAkKRETl 6aJAjrjjtJpayhYFnhaBKV5R7Z3Ya8F9mEvXZoaZdaeNQZlbwd04OUx+DUR9Fw9UQT7T aw== Received: from ppma02wdc.us.ibm.com (aa.5b.37a9.ip4.static.sl-reverse.com [169.55.91.170]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3pg0tg8dbx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 22 Mar 2023 11:46:31 +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 32MAJaEK020716; Wed, 22 Mar 2023 11:46:31 GMT Received: from smtprelay05.dal12v.mail.ibm.com ([9.208.130.101]) by ppma02wdc.us.ibm.com (PPS) with ESMTPS id 3pd4x782kr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 22 Mar 2023 11:46:31 +0000 Received: from smtpav04.dal12v.mail.ibm.com (smtpav04.dal12v.mail.ibm.com [10.241.53.103]) by smtprelay05.dal12v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 32MBkUUj328404 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 22 Mar 2023 11:46:30 GMT Received: from smtpav04.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2200E58056; Wed, 22 Mar 2023 11:46:30 +0000 (GMT) Received: from smtpav04.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1319958052; Wed, 22 Mar 2023 11:46:30 +0000 (GMT) Received: from gfwa600.aus.stglabs.ibm.com (unknown [9.3.84.101]) by smtpav04.dal12v.mail.ibm.com (Postfix) with ESMTPS; Wed, 22 Mar 2023 11:46:30 +0000 (GMT) Received: by gfwa600.aus.stglabs.ibm.com (Postfix, from userid 181152) id CEF7574A47A; Wed, 22 Mar 2023 06:46:29 -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 v4 3/5] hwmon: (pmbus/acbel-fsg032) Add Acbel power supply Date: Wed, 22 Mar 2023 06:46:21 -0500 Message-Id: <20230322114623.2278920-4-lakshmiy@us.ibm.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230322114623.2278920-1-lakshmiy@us.ibm.com> References: <20230322114623.2278920-1-lakshmiy@us.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: yQDGLLTNPNHtzigleq1NWpc7Sj9Xur28 X-Proofpoint-ORIG-GUID: yQDGLLTNPNHtzigleq1NWpc7Sj9Xur28 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-03-22_08,2023-03-22_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 adultscore=0 bulkscore=0 priorityscore=1501 phishscore=0 suspectscore=0 malwarescore=0 spamscore=0 clxscore=1015 mlxlogscore=999 mlxscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303150002 definitions=main-2303220082 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@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 | 96 ++++++++++++++++++++++++++++++ 3 files changed, 106 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..7bfa0bf048db --- /dev/null +++ b/drivers/hwmon/pmbus/acbel-fsg032.c @@ -0,0 +1,96 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * Copyright 2023 IBM Corp. + */ + +#include +#include +#include +#include +#include +#include +#include "pmbus.h" + +struct acbel_fsg032 { + struct i2c_client *client; +}; + +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) +{ + struct acbel_fsg032 *psu; + 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; + /* + * Don't fail the probe if there isn't enough memory for debugfs. + */ + psu = devm_kzalloc(&client->dev, sizeof(*psu), GFP_KERNEL); + if (!psu) + return 0; + + 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 Wed Mar 22 11:46:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lakshmi Yadlapati X-Patchwork-Id: 13183970 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 1FF9DC77B60 for ; Wed, 22 Mar 2023 11:48:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230370AbjCVLsA (ORCPT ); Wed, 22 Mar 2023 07:48:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230114AbjCVLrp (ORCPT ); Wed, 22 Mar 2023 07:47:45 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 919A362324; Wed, 22 Mar 2023 04:46:57 -0700 (PDT) Received: from pps.filterd (m0187473.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 32MBGXBf007794; Wed, 22 Mar 2023 11:46:33 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=IaXsUiTEu6wwUAqoN1HmRFZpBh9YvjG5nz+0urxlRBQzin8BD8LCVXjDAgtOvIr/0T7U fdVOfpmNh81/tqLsAkY9kpcNZFFfa5F/lPMhDnyFIPGc1+B5cP1mB14/VIjJ5ZW8ePlv 2M/AKd4Ed0eVglBXxey6QAYkdfqSgPPaRQ+cdSaJnWRcdkxkq9EnUTp2S2UGyS5u3HNF aJFiNTQbwylLzloWMEI8sDd/Ws9u27AUmW4dQbaq73ZQxZy+WM7Nfgar1nZZzDWd9YcU FwDMO21eLei7KPtD+Vm18KjLPfx2OIDNftHW4zR6Bp1Orik8c+cPXP98V6S1j/5cVOvn Pw== Received: from ppma04wdc.us.ibm.com (1a.90.2fa9.ip4.static.sl-reverse.com [169.47.144.26]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3pg0njrn5b-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 22 Mar 2023 11:46:33 +0000 Received: from pps.filterd (ppma04wdc.us.ibm.com [127.0.0.1]) by ppma04wdc.us.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 32M87hw0001582; Wed, 22 Mar 2023 11:46:31 GMT Received: from smtprelay05.dal12v.mail.ibm.com ([9.208.130.101]) by ppma04wdc.us.ibm.com (PPS) with ESMTPS id 3pd4x782aq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 22 Mar 2023 11:46:31 +0000 Received: from smtpav04.wdc07v.mail.ibm.com (smtpav04.wdc07v.mail.ibm.com [10.39.53.231]) by smtprelay05.dal12v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 32MBkUTX12059236 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 22 Mar 2023 11:46:30 GMT Received: from smtpav04.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 755DC58050; Wed, 22 Mar 2023 11:46:30 +0000 (GMT) Received: from smtpav04.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5EA1858045; Wed, 22 Mar 2023 11:46:30 +0000 (GMT) Received: from gfwa600.aus.stglabs.ibm.com (unknown [9.3.84.101]) by smtpav04.wdc07v.mail.ibm.com (Postfix) with ESMTPS; Wed, 22 Mar 2023 11:46:30 +0000 (GMT) Received: by gfwa600.aus.stglabs.ibm.com (Postfix, from userid 181152) id D243F74A47F; Wed, 22 Mar 2023 06:46:29 -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 v4 4/5] docs: hwmon: Add documentaion for acbel-fsg032 PSU Date: Wed, 22 Mar 2023 06:46:22 -0500 Message-Id: <20230322114623.2278920-5-lakshmiy@us.ibm.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230322114623.2278920-1-lakshmiy@us.ibm.com> References: <20230322114623.2278920-1-lakshmiy@us.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: y_l9wdbyCdHanH_XdBGsjl9a3jFuyjZ6 X-Proofpoint-ORIG-GUID: y_l9wdbyCdHanH_XdBGsjl9a3jFuyjZ6 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-03-22_08,2023-03-22_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 adultscore=0 mlxlogscore=938 malwarescore=0 mlxscore=0 bulkscore=0 impostorscore=0 phishscore=0 suspectscore=0 spamscore=0 lowpriorityscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303150002 definitions=main-2303220082 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@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 Wed Mar 22 11:46: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: 13183967 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 78E85C6FD1C for ; Wed, 22 Mar 2023 11:47:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230448AbjCVLry (ORCPT ); Wed, 22 Mar 2023 07:47:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50298 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230242AbjCVLrl (ORCPT ); Wed, 22 Mar 2023 07:47:41 -0400 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 395CE62D87; Wed, 22 Mar 2023 04:46:54 -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 32MBc1Ga036892; Wed, 22 Mar 2023 11:46:33 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=mwWJGWUbmOuS2RR0wWyJM/97XQxfYEgeMaNATuPMHNE=; b=UGXGk+KYPntAoyNEY4/e6JIzSVetiPZVE/1+Y5LEYrAvr9r9Nws5bDGigLKsF1d6Sauc 2s5QOjFhshs4DTlD8bOqgUSN+EVyuIlewXU5x+G/iL60s4Gkyx33HEZfP8CFxnjYNPTo pzJqgx8NL9RHF/DZbWDe7YutSSs/BT6DUCjbasJEUSebX+MVHpC68IjNbm+lC6AedOP1 75RUxNvxdMjrfky/Mb6CEC50Bicx4W70V1x9tSQp+xEdFrNZ0Y3m0aD9OhbN6tqEljNd CIjUCkQ0k+WprftVslgNPhvF/3iEJHkfIIa5Fbg77VP1z+ylLl0bC9xW0ZSrGGzjBcIm Bg== Received: from ppma03dal.us.ibm.com (b.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.11]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3pfx524hq6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 22 Mar 2023 11:46:32 +0000 Received: from pps.filterd (ppma03dal.us.ibm.com [127.0.0.1]) by ppma03dal.us.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 32MAhd8G004732; Wed, 22 Mar 2023 11:46:31 GMT Received: from smtprelay05.dal12v.mail.ibm.com ([9.208.130.101]) by ppma03dal.us.ibm.com (PPS) with ESMTPS id 3pd4x7dyx5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 22 Mar 2023 11:46:31 +0000 Received: from smtpav02.dal12v.mail.ibm.com (smtpav02.dal12v.mail.ibm.com [10.241.53.101]) by smtprelay05.dal12v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 32MBkU7D4915960 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 22 Mar 2023 11:46:30 GMT Received: from smtpav02.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 52D3C5805A; Wed, 22 Mar 2023 11:46:30 +0000 (GMT) Received: from smtpav02.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 448D658051; Wed, 22 Mar 2023 11:46:30 +0000 (GMT) Received: from gfwa600.aus.stglabs.ibm.com (unknown [9.3.84.101]) by smtpav02.dal12v.mail.ibm.com (Postfix) with ESMTPS; Wed, 22 Mar 2023 11:46:30 +0000 (GMT) Received: by gfwa600.aus.stglabs.ibm.com (Postfix, from userid 181152) id D56E874A480; Wed, 22 Mar 2023 06:46:29 -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 v4 5/5] ARM: dts: aspeed: p10bmc: Change power supply info Date: Wed, 22 Mar 2023 06:46:23 -0500 Message-Id: <20230322114623.2278920-6-lakshmiy@us.ibm.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230322114623.2278920-1-lakshmiy@us.ibm.com> References: <20230322114623.2278920-1-lakshmiy@us.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: ScTX3U0OkcZQChHX3NnlPQpJb_6_9ZP7 X-Proofpoint-ORIG-GUID: ScTX3U0OkcZQChHX3NnlPQpJb_6_9ZP7 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-03-22_08,2023-03-22_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 impostorscore=0 spamscore=0 priorityscore=1501 mlxscore=0 mlxlogscore=766 adultscore=0 malwarescore=0 clxscore=1015 bulkscore=0 suspectscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303150002 definitions=main-2303220082 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@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 --- 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>; }; };