Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp1999494lqt; Sun, 21 Apr 2024 19:52:55 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWh8D2j7OlRhdcU67uGm6kLIhTJYWvfimNmFTPbZis3zKQfT1IH4Eb0gX71pAQP9wm3KTmFbmOrcGf5366NVqCrjY8aFwkJDxyM7XfdGg== X-Google-Smtp-Source: AGHT+IHsiGdK1HzO/oE0rA5eupO71lUh878aD1kvP/4Axw4EPQu2Nt5wDnCVPKlsWG8v9hzkP1RN X-Received: by 2002:a05:6512:3498:b0:518:ae8f:d4e1 with SMTP id v24-20020a056512349800b00518ae8fd4e1mr5377186lfr.28.1713754375773; Sun, 21 Apr 2024 19:52:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713754375; cv=pass; d=google.com; s=arc-20160816; b=oRkMaQKb0ffHddX/E3BZ1PD+b8o570wmXY0jEw9nquCXJtQeD0Ey+B/WlNim4QJHCJ aZE3S4bnsPvnrOMDfMSAqX5rgBYFW31O5mTt1Vq1Qg1TjrdqnVgnFnOkcG0W3b/39yFL UhFqoEZ1/Lw2xCuaiEQQh7B+4d0KrMqDdKe0oW9JeZRgkg8X2OisamKjzFT2qFZKyxfZ NNjeNzmOFKUJmB3gfZyOZu19gKtkia/ZqG0AjM3+JB8Jnrv+nBTF5MsE7O1aXCvqkVer 9FFhiitOq/GzU+RRjtZH4iUAThXBdR2T7dGRfxDWKqvbmcAylBjDVvkgirVcB7BZAPp3 ACWQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=0qpmv44I7tLSFsbeb0vg/Jvj5eb0Ej/yHkB50UCzfek=; fh=qPizXFM7x/VMdvbbvzPFPbShOjWlMN48Px7HEMXfqjI=; b=wjSE5xjTo7LMqipc9kuOpna7TyNmasnDxJJ6wVCosCPgzbNwvEOQ6esqKThQOBUNhH HZKpLnkv1IZUNKvdpgPXrDNPCRm3Sj+2dPTCvw4X+J0M/0SyF4lw+syT9n4EOAXUiQAN nJhrA36Z8ofSKIVAYp5XN/WRhOlm+lBCdrt/nKbY/oWoz3b4UjApjd2AVQttj7ZDskHa 4aAvZTGNUNlDHCBLnPJrkMPiCUDRMKgYVfpwsKjlMJjyd0Q/ZFICswhBdgCcy+Ya3sxf cnczPVqcwrBnk3cdaD613+0h9iJdm+GNjzVqUVsSqQ2eVRpmz33R/ChuBS8MSsnVml+t jcOw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@analog.com header.s=DKIM header.b="yGG1nsZ/"; arc=pass (i=1 spf=pass spfdomain=analog.com dkim=pass dkdomain=analog.com dmarc=pass fromdomain=analog.com); spf=pass (google.com: domain of linux-kernel+bounces-152688-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-152688-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=analog.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id o21-20020aa7d3d5000000b0056e2be5087bsi4992314edr.100.2024.04.21.19.52.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Apr 2024 19:52:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-152688-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@analog.com header.s=DKIM header.b="yGG1nsZ/"; arc=pass (i=1 spf=pass spfdomain=analog.com dkim=pass dkdomain=analog.com dmarc=pass fromdomain=analog.com); spf=pass (google.com: domain of linux-kernel+bounces-152688-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-152688-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=analog.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 33C801F20FC1 for ; Mon, 22 Apr 2024 02:52:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4694515E89; Mon, 22 Apr 2024 02:52:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=analog.com header.i=@analog.com header.b="yGG1nsZ/" 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 8FCC7101EE; Mon, 22 Apr 2024 02:52:18 +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=1713754340; cv=none; b=BtnywZ037A8FGd8R+YFjzUklQXFYmgyNooKWGM/uI9y7YV4uUPjxA1uwhMbu/4ZmtjAA0xqIfoK+rItDyz3yqOp/T2g8T2xf4CWFReNZo1ySURJDY14o+8XzyM+D9BMZXN5ci3uSBk5DhcNIaHnCyu4lXyeTfVQn8Y4sdAJ8KCo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713754340; c=relaxed/simple; bh=YD33K1bt9DeHH2G5bDzYP3S94lNZWuT26Iy9o62SLBY=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=bZDv4f66nWnCZFavGrNH/QGjzXychJ6k6zb24Ce9SgJdArNB2OWwrjiy+KVbPo0wn4xwUazmP6obC4qNuc5ip7ySXU2Q9z+b2SDVxG5ra1tKAMkZ7C2hUZh21y0no7Snz5+5aMAnYLC4AFKS3QK3trEmUOxU9XKU1quL7zD69JE= 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=yGG1nsZ/; 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 Received: from pps.filterd (m0167088.ppops.net [127.0.0.1]) by mx0a-00128a01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 43M1TklT021513; Sun, 21 Apr 2024 22:51:57 -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=0qpmv44I7tLSFsbeb0vg/Jvj5eb0Ej/yHkB50UCzfek=; b=yGG1nsZ/v4K6 BaAdb3nqFfxSMzVAs7zLV6kEQkGExwFRQHXJABJIUITJXEPYLgwogU9EeyD8nZP1 N6C358EdiAJS2o8n9sH/Hub8YDSlESOpHsAz/6Od9DDGN5yaZfORZq9c9nDnVRs4 MqmOrMgVbHQOzeufKNYcI7mz4PYFduk+UYKTPUC4FkRAKmODXY60CtHvduIKEcj1 IiNk3zBYr21JzVUf5iYy7nv50pWjgGODn/lcPqiErxXMr7C6C/7Ipr+FGS3iYsJE Zb/++5X1UnWw/IDjrdq2QP3YzhKM7VJIFUVPW7NO0SgSJ4FnrCnHQGJH6EZHGNG1 tbh4oLXSLg== Received: from nwd2mta4.analog.com ([137.71.173.58]) by mx0a-00128a01.pphosted.com (PPS) with ESMTPS id 3xm7j2vvqd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 21 Apr 2024 22:51:57 -0400 (EDT) Received: from ASHBMBX8.ad.analog.com (ASHBMBX8.ad.analog.com [10.64.17.5]) by nwd2mta4.analog.com (8.14.7/8.14.7) with ESMTP id 43M2ptdn065370 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Sun, 21 Apr 2024 22:51:55 -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; Sun, 21 Apr 2024 22:51:54 -0400 Received: from ASHBMBX9.ad.analog.com (10.64.17.10) 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; Sun, 21 Apr 2024 22:51:54 -0400 Received: from zeus.spd.analog.com (10.66.68.11) by ashbmbx9.ad.analog.com (10.64.17.10) with Microsoft SMTP Server id 15.2.986.14 via Frontend Transport; Sun, 21 Apr 2024 22:51:54 -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 43M2pS5Q027847; Sun, 21 Apr 2024 22:51:45 -0400 From: Jose Ramon San Buenaventura To: , , , , CC: Jean Delvare , Guenter Roeck , "Rob Herring" , Krzysztof Kozlowski , "Conor Dooley" , Jonathan Corbet , "Delphine CC Chiu" , Jose Ramon San Buenaventura Subject: [PATCH v2 2/2] hwmon: pmbus: adm1275: add adm1281 support Date: Mon, 22 Apr 2024 10:51:23 +0800 Message-ID: <20240422025123.29770-3-jose.sanbuenaventura@analog.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240422025123.29770-1-jose.sanbuenaventura@analog.com> References: <20240422025123.29770-1-jose.sanbuenaventura@analog.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ADIRuleOP-NewSCL: Rule Triggered X-Proofpoint-GUID: uBJgnGnvza_7fEv9qD-pVzZautrmoTsX X-Proofpoint-ORIG-GUID: uBJgnGnvza_7fEv9qD-pVzZautrmoTsX X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-04-21_22,2024-04-19_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 phishscore=0 mlxlogscore=999 spamscore=0 adultscore=0 impostorscore=0 suspectscore=0 bulkscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2404010003 definitions=main-2404220013 Adding support for adm1281 which is similar to adm1275 Removed extra case for STATUS_CML in adm1275_read_byte_data function. Signed-off-by: Jose Ramon San Buenaventura --- Documentation/hwmon/adm1275.rst | 14 +++++++++++--- drivers/hwmon/pmbus/Kconfig | 4 ++-- drivers/hwmon/pmbus/adm1275.c | 11 +++++++++-- 3 files changed, 22 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..2baeee8be 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) @@ -101,6 +101,7 @@ struct adm1275_data { bool have_pin_max; bool have_temp_max; bool have_power_sampling; + bool have_status_cml; struct pmbus_driver_info info; }; @@ -482,6 +483,7 @@ static const struct i2c_device_id adm1275_id[] = { { "adm1275", adm1275 }, { "adm1276", adm1276 }, { "adm1278", adm1278 }, + { "adm1281", adm1281 }, { "adm1293", adm1293 }, { "adm1294", adm1294 }, { } @@ -555,7 +557,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 +706,10 @@ static int adm1275_probe(struct i2c_client *client) PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT; break; case adm1278: + case adm1281: + if (data->id == adm1281) + data->have_status_cml = true; + data->have_vout = true; data->have_pin_max = true; data->have_temp_max = true; -- 2.39.2