From patchwork Thu Apr 25 07:09:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jose Ramon San Buenaventura X-Patchwork-Id: 13642905 Received: from mx0a-00128a01.pphosted.com (mx0a-00128a01.pphosted.com [148.163.135.77]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7977D78C68; Thu, 25 Apr 2024 07:10:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.135.77 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714029046; cv=none; b=nY2cwvS7qVvoD3kDdQ7SeDKaEPb/ThH9B6mNWORWuh6paBS8UtA2CLEfkAd+uiDJV87fo4TGTq/cHGsXRaCn5lo5tJ6hMuOqwSe8Z4y3U3KIu4pnlLWdMTrlVlMF6483ToPP9ZKDMei9sYcH5kKUU+0j58WamuYGfx7zrYjT8uw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714029046; c=relaxed/simple; bh=kVdanrygML7WMWCF+U4FROQEQJChZ6vP0VXIWpnlWN8=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=ZnydIqG7WtGTsAi7k5sDIWyXCVuAcAJ5jkJkZXMpiMOltk/IUA3l4iiatplNMhpymF1PCDrK5k4FK2NhHave7QD3u0m0hOYaafnrbWM2eGhrA+5PSkyYTfgrYrjk/Xz9mzAXEtruLN8bKu8QPvrAopWjwMLngTPqCEIvldZaLhk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=analog.com; spf=pass smtp.mailfrom=analog.com; dkim=pass (2048-bit key) header.d=analog.com header.i=@analog.com header.b=JmqSWEwV; arc=none smtp.client-ip=148.163.135.77 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=analog.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=analog.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=analog.com header.i=@analog.com header.b="JmqSWEwV" Received: from pps.filterd (m0167089.ppops.net [127.0.0.1]) by mx0a-00128a01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 43P5JN18001017; Thu, 25 Apr 2024 03:10:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=analog.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=DKIM; bh=vZE3dDYjiNiwBmKcRBw52oa20oOecqUXbqZevdQvLd8=; b=JmqSWEwVFv95 mJ2Is+3vx3Di9i0b/8zdsobp4ypCrHWyPVxGVtBatETuzfTXL1GpXXHML3nbO6zp UNgYLyF9NJnBRmbkd9hMzII6dAbnLM3nPatCa36LDn27f/aF9IEHZjruEclrxYbS a1VzNTZgiBV+hPPdVpAOPHu2dp6ieMU/j+b03wX68B5yqeYZ+gSXOhOU42fyve4B 9UCcE93iZSySBKthMekEdDnaUSqkBdsJiq65tgYGk1KeOMAAujx3NTb55O1LH+NN L5oKPy0XoZDRV2ZKw61CZtb4YPFNlVn81rgUmBwsUiid9xh7bjpfBUNNmAtWWnCz xLSA9ToxLQ== Received: from nwd2mta4.analog.com ([137.71.173.58]) by mx0a-00128a01.pphosted.com (PPS) with ESMTPS id 3xq3qmbcj4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Apr 2024 03:10:18 -0400 (EDT) Received: from ASHBMBX9.ad.analog.com (ASHBMBX9.ad.analog.com [10.64.17.10]) by nwd2mta4.analog.com (8.14.7/8.14.7) with ESMTP id 43P7AHUr023012 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 25 Apr 2024 03:10:17 -0400 Received: from ASHBMBX8.ad.analog.com (10.64.17.5) by ASHBMBX9.ad.analog.com (10.64.17.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.14; Thu, 25 Apr 2024 03:10:16 -0400 Received: from zeus.spd.analog.com (10.66.68.11) by ashbmbx8.ad.analog.com (10.64.17.5) with Microsoft SMTP Server id 15.2.986.14 via Frontend Transport; Thu, 25 Apr 2024 03:10:16 -0400 Received: from JSANBUEN-L01.ad.analog.com (JSANBUEN-L01.ad.analog.com [10.117.220.64]) by zeus.spd.analog.com (8.15.1/8.15.1) with ESMTP id 43P79tHk006908; Thu, 25 Apr 2024 03:10:08 -0400 From: Jose Ramon San Buenaventura To: , , , , CC: Jean Delvare , Guenter Roeck , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jonathan Corbet , Delphine CC Chiu , Conor Dooley Subject: [PATCH v3 1/2] dt-bindings: hwmon: adm1275: add adm1281 Date: Thu, 25 Apr 2024 15:09:47 +0800 Message-ID: <20240425070948.25788-2-jose.sanbuenaventura@analog.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240425070948.25788-1-jose.sanbuenaventura@analog.com> References: <20240425070948.25788-1-jose.sanbuenaventura@analog.com> Precedence: bulk X-Mailing-List: linux-hwmon@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ADIRuleOP-NewSCL: Rule Triggered X-Proofpoint-GUID: fUYlksadv3bjdOQOiHa1OidhndxUoYIX X-Proofpoint-ORIG-GUID: fUYlksadv3bjdOQOiHa1OidhndxUoYIX X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1011,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-04-25_06,2024-04-25_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=971 adultscore=0 lowpriorityscore=0 suspectscore=0 priorityscore=1501 malwarescore=0 spamscore=0 impostorscore=0 bulkscore=0 mlxscore=0 phishscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2404010003 definitions=main-2404250050 Add support for the adm1281 Hot-Swap Controller and Digital Power and Energy Monitor Acked-by: Conor Dooley Signed-off-by: Jose Ramon San Buenaventura --- Documentation/devicetree/bindings/hwmon/adi,adm1275.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/hwmon/adi,adm1275.yaml b/Documentation/devicetree/bindings/hwmon/adi,adm1275.yaml index b68061294..5b076d677 100644 --- a/Documentation/devicetree/bindings/hwmon/adi,adm1275.yaml +++ b/Documentation/devicetree/bindings/hwmon/adi,adm1275.yaml @@ -5,7 +5,7 @@ $id: http://devicetree.org/schemas/hwmon/adi,adm1275.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# -title: Analog Devices ADM1075/ADM127x/ADM129x digital power monitors +title: Analog Devices ADM1075/ADM127x/ADM1281/ADM129x digital power monitors maintainers: - Krzysztof Kozlowski @@ -27,6 +27,7 @@ properties: - adi,adm1275 - adi,adm1276 - adi,adm1278 + - adi,adm1281 - adi,adm1293 - adi,adm1294 @@ -91,6 +92,7 @@ allOf: contains: enum: - adi,adm1278 + - adi,adm1281 - adi,adm1293 - adi,adm1294 then: From patchwork Thu Apr 25 07:09:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jose Ramon San Buenaventura X-Patchwork-Id: 13642904 Received: from mx0a-00128a01.pphosted.com (mx0a-00128a01.pphosted.com [148.163.135.77]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9924F6F06D; Thu, 25 Apr 2024 07:10:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.135.77 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714029044; cv=none; b=B8+d/leG1SCOAdASBXe5ZLTsJrWQH0BzDX3MiQVyHUnR6MUmyPeaKbDF76lUVRSD0MSBipxjdUquUst8ou7F/igZiKoB24vd/bPmBKVR/txUV+AHKvnoY7iJIWFo2vett+gbbmTuSGfxDwsml/1xIr1eCk7R6I+EXLXqjHg6aRA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714029044; c=relaxed/simple; bh=qfzy2c+zXk/cPUkUbNebr6FQtTLjdbmMKboKcleeKKk=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=ZxPMRaJDBrz5JNi8ceV87yVIp4BJEAv1lx3lLidRkoHjFkPup2A6SD74FOBgEnwQCsfc9lXMf1vHgYRrn82FlItVxjDUhzQL1OV0Y55RR3LyyrupcFfjLft0i7zN2tVh/TRi94N8b3vLX5bj4JbGwSUnaeJKWj7U739Em/FAm6U= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=analog.com; spf=pass smtp.mailfrom=analog.com; dkim=pass (2048-bit key) header.d=analog.com header.i=@analog.com header.b=qAiszG6n; arc=none smtp.client-ip=148.163.135.77 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=analog.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=analog.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=analog.com header.i=@analog.com header.b="qAiszG6n" Received: from pps.filterd (m0167089.ppops.net [127.0.0.1]) by mx0a-00128a01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 43P5ss9X001033; Thu, 25 Apr 2024 03:10:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=analog.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=DKIM; bh=5+Aikj5kSEi+2qQ6QFsL+0wtIRLT+xDhtujqoHvM/5E=; b=qAiszG6ngrOI oQD6+M0bkq9SsU2VfOkMenK93ba7AggOx3rl1Fi/jucDmQjBsSnALAslwctsCQPg 6TLbFJOHtWK837ENcMqu2TZ/Vo10fK/LztShvX6uQmxhx7SUGYZTOhlA3/ZfPVfS v5EpvlaRd0YIdlyECCMNU8mijP6hvnWp2ZgmDBRNYNjJAPSjRyk+ssRky19aIRC4 iQllBnqVgZakNO/iaHon2u7ohyWTcyBKIj5W6nU9E25dZln2wScL6T4EMG9Ckxa4 bhS4JpBxqntpTT11UKE06fjH+uhM3U1DYKoblYu2pzSBu+PPd23MhzDWn1XRlGjC 3CwFwhRYDQ== Received: from nwd2mta3.analog.com ([137.71.173.56]) by mx0a-00128a01.pphosted.com (PPS) with ESMTPS id 3xq3qmbcjt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Apr 2024 03:10:22 -0400 (EDT) Received: from ASHBMBX8.ad.analog.com (ASHBMBX8.ad.analog.com [10.64.17.5]) by nwd2mta3.analog.com (8.14.7/8.14.7) with ESMTP id 43P7ALPW053969 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 25 Apr 2024 03:10:21 -0400 Received: from ASHBCASHYB4.ad.analog.com (10.64.17.132) by ASHBMBX8.ad.analog.com (10.64.17.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.14; Thu, 25 Apr 2024 03:10:20 -0400 Received: from ASHBMBX8.ad.analog.com (10.64.17.5) by ASHBCASHYB4.ad.analog.com (10.64.17.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.14; Thu, 25 Apr 2024 03:10:20 -0400 Received: from zeus.spd.analog.com (10.66.68.11) by ashbmbx8.ad.analog.com (10.64.17.5) with Microsoft SMTP Server id 15.2.986.14 via Frontend Transport; Thu, 25 Apr 2024 03:10:20 -0400 Received: from JSANBUEN-L01.ad.analog.com (JSANBUEN-L01.ad.analog.com [10.117.220.64]) by zeus.spd.analog.com (8.15.1/8.15.1) with ESMTP id 43P79tHl006908; Thu, 25 Apr 2024 03:10:12 -0400 From: Jose Ramon San Buenaventura To: , , , , CC: Jean Delvare , Guenter Roeck , "Rob Herring" , Krzysztof Kozlowski , "Conor Dooley" , Jonathan Corbet , "Delphine CC Chiu" Subject: [PATCH v3 2/2] hwmon: pmbus: adm1275: add adm1281 support Date: Thu, 25 Apr 2024 15:09:48 +0800 Message-ID: <20240425070948.25788-3-jose.sanbuenaventura@analog.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240425070948.25788-1-jose.sanbuenaventura@analog.com> References: <20240425070948.25788-1-jose.sanbuenaventura@analog.com> Precedence: bulk X-Mailing-List: linux-hwmon@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ADIRuleOP-NewSCL: Rule Triggered X-Proofpoint-GUID: MK6N6urHKuwhvGwYap2MkelzAH8lyo8J X-Proofpoint-ORIG-GUID: MK6N6urHKuwhvGwYap2MkelzAH8lyo8J X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1011,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-04-25_06,2024-04-25_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=999 adultscore=0 lowpriorityscore=0 suspectscore=0 priorityscore=1501 malwarescore=0 spamscore=0 impostorscore=0 bulkscore=0 mlxscore=0 phishscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2404010003 definitions=main-2404250050 Adding support for adm1281 which is similar to adm1275 Signed-off-by: Jose Ramon San Buenaventura --- Documentation/hwmon/adm1275.rst | 14 +++++++++++--- drivers/hwmon/pmbus/Kconfig | 4 ++-- drivers/hwmon/pmbus/adm1275.c | 7 +++++-- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/Documentation/hwmon/adm1275.rst b/Documentation/hwmon/adm1275.rst index 804590eea..467daf8ce 100644 --- a/Documentation/hwmon/adm1275.rst +++ b/Documentation/hwmon/adm1275.rst @@ -43,6 +43,14 @@ Supported chips: Datasheet: www.analog.com/static/imported-files/data_sheets/ADM1278.pdf + * Analog Devices ADM1281 + + Prefix: 'adm1281' + + Addresses scanned: - + + Datasheet: https://www.analog.com/media/en/technical-documentation/data-sheets/adm1281.pdf + * Analog Devices ADM1293/ADM1294 Prefix: 'adm1293', 'adm1294' @@ -58,10 +66,10 @@ Description ----------- This driver supports hardware monitoring for Analog Devices ADM1075, ADM1272, -ADM1275, ADM1276, ADM1278, ADM1293, and ADM1294 Hot-Swap Controller and +ADM1275, ADM1276, ADM1278, ADM1281, ADM1293, and ADM1294 Hot-Swap Controller and Digital Power Monitors. -ADM1075, ADM1272, ADM1275, ADM1276, ADM1278, ADM1293, and ADM1294 are hot-swap +ADM1075, ADM1272, ADM1275, ADM1276, ADM1278, ADM1281, ADM1293, and ADM1294 are hot-swap controllers that allow a circuit board to be removed from or inserted into a live backplane. They also feature current and voltage readback via an integrated 12 bit analog-to-digital converter (ADC), accessed using a @@ -144,5 +152,5 @@ temp1_highest Highest observed temperature. temp1_reset_history Write any value to reset history. Temperature attributes are supported on ADM1272 and - ADM1278. + ADM1278, and ADM1281. ======================= ======================================================= diff --git a/drivers/hwmon/pmbus/Kconfig b/drivers/hwmon/pmbus/Kconfig index 557ae0c41..9c1d0d7d5 100644 --- a/drivers/hwmon/pmbus/Kconfig +++ b/drivers/hwmon/pmbus/Kconfig @@ -51,8 +51,8 @@ config SENSORS_ADM1275 tristate "Analog Devices ADM1275 and compatibles" help If you say yes here you get hardware monitoring support for Analog - Devices ADM1075, ADM1272, ADM1275, ADM1276, ADM1278, ADM1293, - and ADM1294 Hot-Swap Controller and Digital Power Monitors. + Devices ADM1075, ADM1272, ADM1275, ADM1276, ADM1278, ADM1281, + ADM1293, and ADM1294 Hot-Swap Controller and Digital Power Monitors. This driver can also be built as a module. If so, the module will be called adm1275. diff --git a/drivers/hwmon/pmbus/adm1275.c b/drivers/hwmon/pmbus/adm1275.c index e2c61d6fa..59ffc0828 100644 --- a/drivers/hwmon/pmbus/adm1275.c +++ b/drivers/hwmon/pmbus/adm1275.c @@ -18,7 +18,7 @@ #include #include "pmbus.h" -enum chips { adm1075, adm1272, adm1275, adm1276, adm1278, adm1293, adm1294 }; +enum chips { adm1075, adm1272, adm1275, adm1276, adm1278, adm1281, adm1293, adm1294 }; #define ADM1275_MFR_STATUS_IOUT_WARN2 BIT(0) #define ADM1293_MFR_STATUS_VAUX_UV_WARN BIT(5) @@ -482,6 +482,7 @@ static const struct i2c_device_id adm1275_id[] = { { "adm1275", adm1275 }, { "adm1276", adm1276 }, { "adm1278", adm1278 }, + { "adm1281", adm1281 }, { "adm1293", adm1293 }, { "adm1294", adm1294 }, { } @@ -555,7 +556,8 @@ static int adm1275_probe(struct i2c_client *client) client->name, mid->name); if (mid->driver_data == adm1272 || mid->driver_data == adm1278 || - mid->driver_data == adm1293 || mid->driver_data == adm1294) + mid->driver_data == adm1281 || mid->driver_data == adm1293 || + mid->driver_data == adm1294) config_read_fn = i2c_smbus_read_word_data; else config_read_fn = i2c_smbus_read_byte_data; @@ -703,6 +705,7 @@ static int adm1275_probe(struct i2c_client *client) PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT; break; case adm1278: + case adm1281: data->have_vout = true; data->have_pin_max = true; data->have_temp_max = true;