From patchwork Sun Apr 14 04:22:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chanh Nguyen X-Patchwork-Id: 1923446 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=os.amperecomputing.com header.i=@os.amperecomputing.com header.a=rsa-sha256 header.s=selector2 header.b=rz4e5PeW; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=112.213.38.117; helo=lists.ozlabs.org; envelope-from=openbmc-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VHHJj4jwvz1yYM for ; Sun, 14 Apr 2024 14:24:53 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=os.amperecomputing.com header.i=@os.amperecomputing.com header.a=rsa-sha256 header.s=selector2 header.b=rz4e5PeW; dkim-atps=neutral Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4VHHJg4qxkz3dWb for ; Sun, 14 Apr 2024 14:24:51 +1000 (AEST) X-Original-To: openbmc@lists.ozlabs.org Delivered-To: openbmc@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=os.amperecomputing.com header.i=@os.amperecomputing.com header.a=rsa-sha256 header.s=selector2 header.b=rz4e5PeW; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=os.amperecomputing.com (client-ip=2a01:111:f403:240a::701; helo=nam04-mw2-obe.outbound.protection.outlook.com; envelope-from=chanh@os.amperecomputing.com; receiver=lists.ozlabs.org) Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on20701.outbound.protection.outlook.com [IPv6:2a01:111:f403:240a::701]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4VHHHM2qC4z2ydQ for ; Sun, 14 Apr 2024 14:23:43 +1000 (AEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HkR5B0msXjTsxhRh3u+HBvjZHNL6K1hYzZbUKyfx8sSrGLUA49sCWTpeCVjXmWsKGQkTyS9dIwuBYGxzo2xcicd0SDKh9/MAc5Mo1oES2DRy0XhNmywR7d2xGG7orL5SDYYE3Zp81lewSKkwRvejqmUrUbURRzmj6GX8dPdlYIL6HdzCbdebckLyxZnjRWhPQnBKMDyODxaEjjiSRHRQdn4L1F6miCUUW3D31hlBDgi7wOEmCETB8fw2FENSFozHlNrW+IELtV5B+cOtFJKNL/mZDLuf4hm7NH7CIJyP4Q8Gr4zCc730Yx13euUHRtukIAMOWtVFCpwWm9PEV2ZWJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=RJEdQMSBX8lg3gRmciFYX61DmTuf97lbyhiSNxCFbXU=; b=Iga8D1aYijjI/rd6qt1ikNp7LtyymBc8pDSJ+8vElHFUEVpUarxqjlq3UlxFvQ7LMzyzzFcGestFBC7s8NZdTdTUckfJvBSc7G73nqcrNQWjDQLKKjtFOckOljW7oNqjMispNiXiNIxK+IUIQe4EO+ENFOZozyu+6j0DqODfy2nWaM/XL+Vj8wA9Gohinx/Chy0sCCyCExFMqEnW+h43hsL9NS8dHzeuu+PvAZ+IBrtYA4jBl1eoxpAr4naTL88V8fYQ6hGweMk4OTWOVEzXt7nSM0Q47Kmx2vBaxQVtf5FlyrGx6RSad6FTqU3JWLOGnugDKi8DLBH/cCr+VArsSg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=os.amperecomputing.com; dmarc=pass action=none header.from=os.amperecomputing.com; dkim=pass header.d=os.amperecomputing.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=os.amperecomputing.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RJEdQMSBX8lg3gRmciFYX61DmTuf97lbyhiSNxCFbXU=; b=rz4e5PeWQhZaQtwk7Oz9voA//Ilddus1I6FTn5mj96dgb9TnEEWNFff8R7EyQOwHKTcNaEUvn1QjGs/9Gk0VBjVA7KHAxQ6Kb430bQREdxMOES1zt8EuKyQpHFJ4Ul59KZXR8+tVKwNNiwvzqLs92iHxZO0O7k96WTFFBFw0iLk= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=os.amperecomputing.com; Received: from DM6PR01MB5947.prod.exchangelabs.com (2603:10b6:5:1dd::12) by PH0PR01MB6715.prod.exchangelabs.com (2603:10b6:510:97::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7452.50; Sun, 14 Apr 2024 04:23:22 +0000 Received: from DM6PR01MB5947.prod.exchangelabs.com ([fe80::b557:13cd:8a29:ae08]) by DM6PR01MB5947.prod.exchangelabs.com ([fe80::b557:13cd:8a29:ae08%4]) with mapi id 15.20.7452.046; Sun, 14 Apr 2024 04:23:22 +0000 From: Chanh Nguyen To: Jean Delvare , Guenter Roeck , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Justin Ledford , devicetree@vger.kernel.org, linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org, OpenBMC Maillist , Open Source Submission Subject: [PATCH v2 1/3] dt-bindings: hwmon: Add maxim max31790 bindings Date: Sun, 14 Apr 2024 11:22:44 +0700 Message-Id: <20240414042246.8681-2-chanh@os.amperecomputing.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240414042246.8681-1-chanh@os.amperecomputing.com> References: <20240414042246.8681-1-chanh@os.amperecomputing.com> X-ClientProxiedBy: SG2PR06CA0216.apcprd06.prod.outlook.com (2603:1096:4:68::24) To DM6PR01MB5947.prod.exchangelabs.com (2603:10b6:5:1dd::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6PR01MB5947:EE_|PH0PR01MB6715:EE_ X-MS-Office365-Filtering-Correlation-Id: 6e44b872-98b6-48ec-0221-08dc5c3a9e80 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6Vql/QokWNG+mc8ohfqk09zjB34YAFmcz5UkIst2Q48T5Wh8y/WWd79WCdzZEYdrbllTe5B5211ip93wTA9qIKSigXDgArPt4oU3lu0Lu+zKsZVffWYCwkczUazDsoI6T0OFgnrhhtAZl/qGW+AVZrriiJeJXCjyRpBhGQ4SJdizX9noIgDiiCg3+sMZBEQgL/nPLC6hrNXINXg/4RI44RLiHwatDzCSkZ4TKo3KYVsUTP8usvOhIS7TNum83Lf1St+F3WAJbasRE7GQBTGpodqAG+iVZsnb0W9cjw+Cl9D6gY5lFfliCPBsexXK8ytLtYyjW5zFuEQUzNb1TrveYb6az/0SHhTFABSHVR8abJn9MMbhsGq2/NXIg1Vnts9okm8twCIMTxnWi2tJcVzcuUe/dmXpBRQ8qFfb/N+9J14/pPC5k87J8VEkkQgk7gK4dil0O+MsOS7wVIg8YYEUnPsEWcOkkc+VDFE1MAgeiArtMiY+S66Eya+MRr3HNahWkqtmJ9JbNP2mGK3NhzZwIjAHVgY3TmTFvP3v2bH+h8SnGGL2AHjG2BMtsZ58sTpNVvLL6TkYWJ3AAISQn8jlAOIFcIB9lwkccxljNk4zSfvjhMboG+pQAVZm7KbCWwjEqzUyvGZbRZKScIS+/feEhIrDyHFNkc5xManDqAP9QHn4DwKL/xvo9k7D969+byymeO6RaRuLOjohzWqpWrZQY1RlA1Hz1xpq9e41etWXT8pH5+wDN19rBQTLWOL4jpIqiiUWFGnBB5Cq1xRgZZkUYmde6tBteDeKtMnzc4UqK8FMn55NUkpqndllp9fXcIKhanfiNpBK7tS98iAQ4keGVJjV5EjWHdYXWsnw6gYmy9+KClZx53Vx5nhDNcDpuRfBqPwlvLUKAsw/2xQjoxqkYbsrtCSU7Xuqp8SVLnJXO6xPc50q16pUKldhn2P0hm1RJckV+vwjyRNNnf3gzXFWI7xW4MZDOgiJWRR2OytVskEiN/hZo3ItGQUYsFEFBhb2uZf6RPDT7sLQ3Zd3KM9YQJB0Zf9gQy4jblGr/fsK5elg1TszXGuVN8Axcqmn6dnumxnj8dkQu+YbEETgCFfgmTXYJAAWt+GEqxB5WKRRHGA3W5vHkVDcXvFJLZQWUctcTe97tAPGU46P5rfAd2dP9b6ayHukwck1owJXxnv/xGTOe8BhQml+Z+wENpr/9uX4YB6W7uqj228getfTKdSoEAmiEvgepwK0bWM72YJsvWRZHz9vks/9460ip7+1/KJGrgJQIg1IEBhszvasfM8lIPHxMuiUBrB9+amJaqLjGNw= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR01MB5947.prod.exchangelabs.com;PTR:;CAT:NONE;SFS:(13230031)(1800799015)(52116005)(7416005)(376005)(366007)(921011)(38350700005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: SXZUV0VGy3ZurPskgOl2q7xhKmBi0TO3rOUDCbh2G6Wt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HWGK/ILIXq/fwbQYKjVcYEJdV/hr3KupIoWLzUBUafFUFnx0SjFkUQU9L4jfDAzaXDOlPp0acGDlEBfqJ6cSE+YlAVX7ca7Q0D5Lf7V1jMj5UyVH6bJiED5dTONjc+TezwPxTdMYiW+pfQNYD1YnVFyo7iWJ+OyE2EgDXbkssb5aI5ZXC/UYEdK5gtYZRtCPCggdc+nUyLLLkKCaiRZDWGe1h4/sI9hgNrPpZeu9oOY88mfvqBxQz5PaQA+JtlAFD6kT/roQBiJxq//F+ycKe25e/RPUXZvJWrTFnweGRlejtqJ4UdrqqMSk5JnTU4sRdiVUt/nATBV4FzaluB6B3Fu75S0OKv503MXB6FfRh65MdYJHK3g+2X6bipbUrTNnLSVjCI0nsqnTpnlZYyRrY68QX0ddkVzqD4aNzLD7SzSEmKzWTHqV3VfbuPHjc9KDcQoL8PsU1Z9ekAVMpj5wcm4w37rw781gw/e5ni5Utgz7p5RBPMaeyEhW6PnsgPlMkK3G4BD1nCUNvQvRbyE= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6e44b872-98b6-48ec-0221-08dc5c3a9e80 X-MS-Exchange-CrossTenant-AuthSource: DM6PR01MB5947.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Apr 2024 04:23:22.0543 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3bc2b170-fd94-476d-b0ce-4229bdc904a7 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: NKDmzGif/iGllOQlmXvW0Uc+nYdnQ85ATzZZHOOYutgtUL8ioMcJCYp3rDNWwD0hfcteI8cFw9tuQSBM8zEutk/ReYrmQt52epdQWLxUyiO1X4fiPx5IUx9Bzay/zLua X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR01MB6715 X-BeenThere: openbmc@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development list for OpenBMC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Chanh Nguyen , Thang Nguyen , Phong Vo , Quan Nguyen Errors-To: openbmc-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "openbmc" Add a device tree bindings for max31790 device. Signed-off-by: Chanh Nguyen --- Changes in v2: - Update filename of the maxim,max31790.yaml [Krzysztof] - Add the common fan schema to $ref [Krzysztof] - Update the node name to "fan-controller" in maxim,max31790.yaml [Krzysztof] - Drop "driver" in commit title [Krzysztof] --- .../bindings/hwmon/maxim,max31790.yaml | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwmon/maxim,max31790.yaml diff --git a/Documentation/devicetree/bindings/hwmon/maxim,max31790.yaml b/Documentation/devicetree/bindings/hwmon/maxim,max31790.yaml new file mode 100644 index 000000000000..a561e5a3e9e4 --- /dev/null +++ b/Documentation/devicetree/bindings/hwmon/maxim,max31790.yaml @@ -0,0 +1,52 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/hwmon/maxim,max31790.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: The Maxim MAX31790 Fan Controller + +maintainers: + - Guenter Roeck + +description: > + The MAX31790 controls the speeds of up to six fans using six + independent PWM outputs. The desired fan speeds (or PWM duty cycles) + are written through the I2C interface. + + Datasheets: + https://datasheets.maximintegrated.com/en/ds/MAX31790.pdf + +properties: + compatible: + const: maxim,max31790 + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + resets: + maxItems: 1 + +required: + - compatible + - reg + +allOf: + - $ref: fan-common.yaml# + +unevaluatedProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + fan-controller@20 { + compatible = "maxim,max31790"; + reg = <0x20>; + }; + }; From patchwork Sun Apr 14 04:22:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chanh Nguyen X-Patchwork-Id: 1923447 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=os.amperecomputing.com header.i=@os.amperecomputing.com header.a=rsa-sha256 header.s=selector2 header.b=uTsHLvvQ; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:2:0:216:3eff:fee1:b9f1; helo=lists.ozlabs.org; envelope-from=openbmc-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:2:0:216:3eff:fee1:b9f1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VHHKc5Jlsz1yXv for ; Sun, 14 Apr 2024 14:25:40 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=os.amperecomputing.com header.i=@os.amperecomputing.com header.a=rsa-sha256 header.s=selector2 header.b=uTsHLvvQ; dkim-atps=neutral Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4VHHKc4TSgz3dX7 for ; Sun, 14 Apr 2024 14:25:40 +1000 (AEST) X-Original-To: openbmc@lists.ozlabs.org Delivered-To: openbmc@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=os.amperecomputing.com header.i=@os.amperecomputing.com header.a=rsa-sha256 header.s=selector2 header.b=uTsHLvvQ; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=os.amperecomputing.com (client-ip=2a01:111:f403:240a::701; helo=nam04-mw2-obe.outbound.protection.outlook.com; envelope-from=chanh@os.amperecomputing.com; receiver=lists.ozlabs.org) Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on20701.outbound.protection.outlook.com [IPv6:2a01:111:f403:240a::701]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4VHHHM6406z2ydQ for ; Sun, 14 Apr 2024 14:23:43 +1000 (AEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oPv33cmLkf6q2QM6GmExvL/ChMMHtkSqTMRUNc22ccZHQrfYw3tTJnFszs9W6o9Ili0e279GUadXZ9jcUvuI2bl9pyhSmtqI9mF+k7S+AB3kuODEFSNDltkxR6+Q9H+R0iQnaphpfj838bYhd0SE+0O+JrgYId+ImwCDqyAAaWF2lAq1VbIrg44yFp4ZtWFephVECOit+IKvYfe+rU8PZKZPBrBuJE3f+e/gA1zZ75hPOfva/4nBBmwzaOpe168eZwrbKXeoPaSP7WBAjNZTz9jWciYN1HqYV8B7DqwzoPRC+RUAI5wyQN6ZWBRe6XU1MIosgeOCn81KHKwQFcK0Fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=g0A3PMx2vCjWaPeHst/bpAAfcashDP8/cgpPZ752WYY=; b=X2vxxIh0Z8c7U2o+w/DWnbRHlxQf8jk1fFGwiIwiw7gSgahb67VzWwUaTijBii2BInpzWPTQNwCNZw6hnXN3AI5l+ngoO/hbW+tblbugIRoW9G5gFqQcDX/02ppyIaRRF4+a967rs4X7vmv6HjNgLZ8rjqWCmwovey7SmecKbAO9axtw1oCSDJhMmOOyt/9az+toKzyLtCgMuDb8ekkXkgfqpzfbFMaN5Mx7plC9u+dY0O4h19R2bpUzgR//obCr6HddsHZNRpwx/uULnIGDR0+gYoplF4fCGpGMxvbb20X7dg0Sfw39PfrMUarOscljhguonBOFydNsw1PSZALqXA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=os.amperecomputing.com; dmarc=pass action=none header.from=os.amperecomputing.com; dkim=pass header.d=os.amperecomputing.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=os.amperecomputing.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=g0A3PMx2vCjWaPeHst/bpAAfcashDP8/cgpPZ752WYY=; b=uTsHLvvQ7t+GhhjrdFOey68/3hlxQlTTgrBPCrHliOYOolJsPFX2tRewZp7C9benPC57/lCsLr5rjLuV7j3ikMpiHMlOiUqikyFOZ8TsK5TG3d2DB+N1dwsorF7ngJ/et9Zku3QQ7ozaITu4DzbleJq0XXnvFUHoAv2vbR7RMYE= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=os.amperecomputing.com; Received: from DM6PR01MB5947.prod.exchangelabs.com (2603:10b6:5:1dd::12) by PH0PR01MB6715.prod.exchangelabs.com (2603:10b6:510:97::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7452.50; Sun, 14 Apr 2024 04:23:29 +0000 Received: from DM6PR01MB5947.prod.exchangelabs.com ([fe80::b557:13cd:8a29:ae08]) by DM6PR01MB5947.prod.exchangelabs.com ([fe80::b557:13cd:8a29:ae08%4]) with mapi id 15.20.7452.046; Sun, 14 Apr 2024 04:23:29 +0000 From: Chanh Nguyen To: Jean Delvare , Guenter Roeck , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Justin Ledford , devicetree@vger.kernel.org, linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org, OpenBMC Maillist , Open Source Submission Subject: [PATCH v2 2/3] hwmon: (max31790): Support config PWM output becomes TACH Date: Sun, 14 Apr 2024 11:22:45 +0700 Message-Id: <20240414042246.8681-3-chanh@os.amperecomputing.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240414042246.8681-1-chanh@os.amperecomputing.com> References: <20240414042246.8681-1-chanh@os.amperecomputing.com> X-ClientProxiedBy: SG2PR06CA0216.apcprd06.prod.outlook.com (2603:1096:4:68::24) To DM6PR01MB5947.prod.exchangelabs.com (2603:10b6:5:1dd::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6PR01MB5947:EE_|PH0PR01MB6715:EE_ X-MS-Office365-Filtering-Correlation-Id: 1a6fd5e7-01fd-465e-fd05-08dc5c3aa2d0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vyzG0OOFMUywiFxMZzDhb5c3o4e/bs7PESlVXtMM8crLyk4gSlxKa7NXPt0Q0QdLEoK1jFQVoMaNhK8pUAbb+IAC3pmGfptcTKC04Ar10b0C52mkri5xPXe19L0Tfttr1tgLoyzYjq+FHJ5jpON3xRjKNrGWb9lMOLFdHTLULBoUQ3Bc0DW5sy8kEijCdGoKsj+jY1KpMf41YGHgrVTG4AvPzQexDLDdaN++lr6bXhsnJUPvA8qpLySYL4KsAaGRlHlgPCcV4CeL0MBNS3gZ8k9bzHzvq+LYyoX+k7UDDIucciCceCIWw/CdcCshIT//AmbiBsuSH8KiRW2umiI32st1YHMkYfRnGSVykuglgDBO2rAA9BgDcuVloeCm0FCfB5KmmKd66zsRpk5bzFOZ24h9dGGW6n381ux1nhSJOHvBGo75d271Qn0MZM+Eev8GyPd/PzwNDpkmDIT/0BcIcukzBJXmtYRQoH9hgTAlDYJyfA9DAueEuoXkh3IYw3opBYjHVkHGbGeGF+eK2weC9/52Sag7E0juRch6QH9jQzpDLgaO1U6Hu0rv5BVdq6XayKzVGg/so+l1B9q8tZtA0ZS4WUCpcUmxB/TEIJt2bnoTyuxekr/2LhOnVzYzOiNkAO/H2AwHyfljdeJkwwv8Axvv1E71slEpCu2K/95Y1VTrkDCeFhjiWNDkm9Z0FIDs5yDtXZodBn35NwxMJ3Y6JvCly4SBcd+VSTI8hYhFCyBtAh2sJK19ZI35mszI16bXwrOALCG0B8rHKYPuEEhINLHJauaJJBg/1HwX4y77SkyLgp4INUJAnSOyOQ89Upe+0HDP6WRdlrz8WuJuXhefszpwiPqKYkqj6qwpDUxPVw90m9Ac3lMWqFBC/Dt7B+ZTD0LYLCnUd2rXg3MGiQA6q6KUJ2AsjT4fGZQiFTEB3RQrBhojo+T897H5UOHzpwpR3OBfABklU7GqZvO2PxqkkxbSDPmFAb+p7UR9Bs/WXZWujYg/LEMu3TunpgZaTXq6CAXp+U1IXZILCZlAGF7uyWFLFCMML60+838UXCBsrMOmlpZ6tsi9Mgaoa4j5pw7FJtII/j2CBD+HLLFzyUm+tf1wnLc5ofI9X5qJDk+55hdkh3u0hz4+m/Imuqj8bwruo9zTCkfSuzER3jAZLUmh4YIRUDFTSE5kFUo6XEawxIUxppMbABlj/vbhJTTwXr3eLubA1UN2qJDhLGR/wqEn2zcj4ZEbJQHDdAx43l2j/KBN2+d6gmPm9QD7pZZopeJESqU4eB9gsEuK3RSPfumoXoTxWSCIih8yDdjVLJH+upzVOqYEAebA0cyr4/0K5RbgzCM+6UAioUMorZIQlnwtulRR5XwKOvYf1wNeuckbApA= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR01MB5947.prod.exchangelabs.com;PTR:;CAT:NONE;SFS:(13230031)(1800799015)(52116005)(7416005)(376005)(366007)(921011)(38350700005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkC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DZtD40YWcdgz7qqTVK/I/fOetFiZfOxtOTpwFekKrlg8FJ/VE9GEjBDetCIMgDYyCa1iDvsfpGWaoZyczMGcbt+NanRoO1yBOxbHtRw3n8q3e8TZR0jzy8INVZSE8SNoxMrBzXC7KH5wQHD4cuxVBSSYtlRddvvXFKukbaaidkb7YqmovcVM77WKe/kv1WVGN5tSLP3tYm6tE8pJbVA3z0SNp/NZXz8RMUVotDv88Zt4SGim8AkiEqz7iWQxQuYMe+7tDyZ0ANBAOsV/ZpkQzj7At9zGQoEdLRgChD9tRlWHoLgZsaJCf6wt0FO9ip9QBseGtvMzBhgOIgIjG2IeBeSUCngRI6wkRvPH0V2ukOqDyBXca7rUofVwePHZH43pMMANHmc/hhCC5D+cL+9YCP0goxB95BVVXFjvISa99BkE5khq9UYk/b3w8ISJZHdj2sJCBG/zjeyP0PqclmNDB6BdY6rwVN7nKmrliG40M/GBZssowl8troU8ljIEeCTyIDjcnFi6+wAEcC8AfVEnhEWftjyLMaDXix09CCtfusOidNXIaR1PZMY1fa2sHXXSoEeQl1F4AA6O5CYi0= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1a6fd5e7-01fd-465e-fd05-08dc5c3aa2d0 X-MS-Exchange-CrossTenant-AuthSource: DM6PR01MB5947.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Apr 2024 04:23:29.2660 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3bc2b170-fd94-476d-b0ce-4229bdc904a7 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: yzgazkQh7wScBrLsoNpg7FZl+tE74KBfOIPvd1feegXceDkabZ/65Etzx/cQ+yCKbvo3hnId6dwL1MA7zdytVaWCmEZSkjzFKdV8n0gKsqMlT/EKVjrKfk4xQxtEAxVR X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR01MB6715 X-BeenThere: openbmc@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development list for OpenBMC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Chanh Nguyen , Thang Nguyen , Phong Vo , Quan Nguyen Errors-To: openbmc-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "openbmc" PWMOUT pins on MAX31790 can be configured as a tachometer input pin by setting bit[0] in the Configuration Register. When the bit[0] of a channel is set, the PWMOUT pin becomes the tach input pin for the channel plus six. This commit allows the kernel to set those pins when necessary if the maxim,pwmout-pin-as-tach-input DT property exists. Signed-off-by: Chanh Nguyen --- Changes in v2: - Update the vendor property name to "maxim,pwmout-pin-as-tach-input" [Rob] --- drivers/hwmon/max31790.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/drivers/hwmon/max31790.c b/drivers/hwmon/max31790.c index 3dc95196b229..ac0a8099acf6 100644 --- a/drivers/hwmon/max31790.c +++ b/drivers/hwmon/max31790.c @@ -12,6 +12,7 @@ #include #include #include +#include #include /* MAX31790 registers */ @@ -506,9 +507,12 @@ static int max31790_probe(struct i2c_client *client) { struct i2c_adapter *adapter = client->adapter; struct device *dev = &client->dev; + u8 pwmout_to_tach[NR_CHANNEL]; struct max31790_data *data; struct device *hwmon_dev; int err; + u8 tmp; + int i; if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA | I2C_FUNC_SMBUS_WORD_DATA)) @@ -528,6 +532,33 @@ static int max31790_probe(struct i2c_client *client) if (err) return err; + if (device_property_present(dev, "maxim,pwmout-pin-as-tach-input")) { + err = device_property_read_u8_array(dev, "maxim,pwmout-pin-as-tach-input", + pwmout_to_tach, NR_CHANNEL); + if (err) { + /* The maxim,pwmout-pin-as-tach-input is an array of six values */ + dev_warn(dev, "The maxim,pwmout-pin-as-tach-input property exist but malform"); + } else { + for (i = 0; i < NR_CHANNEL; i++) { + tmp = data->fan_config[i]; + if (pwmout_to_tach[i]) + data->fan_config[i] |= MAX31790_FAN_CFG_TACH_INPUT; + else + data->fan_config[i] &= ~(MAX31790_FAN_CFG_TACH_INPUT); + + if (tmp != data->fan_config[i]) { + err = i2c_smbus_write_byte_data(client, + MAX31790_REG_FAN_CONFIG(i), + data->fan_config[i]); + if (err < 0) + dev_warn(dev, + "Fail to apply fan configuration at channel %d", + i); + } + } + } + } + hwmon_dev = devm_hwmon_device_register_with_info(dev, client->name, data, &max31790_chip_info, From patchwork Sun Apr 14 04:22:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chanh Nguyen X-Patchwork-Id: 1923448 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=os.amperecomputing.com header.i=@os.amperecomputing.com header.a=rsa-sha256 header.s=selector2 header.b=JPPquOoG; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:2:0:216:3eff:fee1:b9f1; helo=lists.ozlabs.org; envelope-from=openbmc-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:2:0:216:3eff:fee1:b9f1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VHHLY62WLz1yXv for ; Sun, 14 Apr 2024 14:26:29 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=os.amperecomputing.com header.i=@os.amperecomputing.com header.a=rsa-sha256 header.s=selector2 header.b=JPPquOoG; dkim-atps=neutral Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4VHHLY4zZFz3vXY for ; Sun, 14 Apr 2024 14:26:29 +1000 (AEST) X-Original-To: openbmc@lists.ozlabs.org Delivered-To: openbmc@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=os.amperecomputing.com header.i=@os.amperecomputing.com header.a=rsa-sha256 header.s=selector2 header.b=JPPquOoG; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=os.amperecomputing.com (client-ip=2a01:111:f403:240a::701; helo=nam04-mw2-obe.outbound.protection.outlook.com; envelope-from=chanh@os.amperecomputing.com; receiver=lists.ozlabs.org) Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on20701.outbound.protection.outlook.com [IPv6:2a01:111:f403:240a::701]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4VHHHN2BT4z2ydQ for ; Sun, 14 Apr 2024 14:23:44 +1000 (AEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TnLgEaUHhxngTKUtYaOv44GYSq0642lvAsXQ85JQ4PIsz8YPy9QRo9g4FX6zxsug74AnF1wvfebigddYuuECenBwhguvApzNsmnQbbuEVEFEW58qb3YRTJMXIkszcdTldEFfgrfeKMMNKM8wLHHLKGJwq5wYqYFc5hgzzeTBLJsB8WiQFfDfb1qYmqTF1FmP3AQWmhx6nkQNnSeMu0S6dUhyEKnzUI2IYofd5c5hd0CXgjrFeSuxaW/KZ7e/zlAjPaP365tG2qCD9nypQ5SALe8lRj/RnC+EAcWEx/69ICnqiez5Al1iC+JL4OucEIPmqJ1kJfbcr+EDESI/J6latA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=EVkvhwnZGvJmLK+2wwrGq5HUcv7rahFdqvZIjQMvlE0=; b=kc06e9LAVuuojHm+Jtablfn/ZDIx1t+0HK3ojtKXDNK6o+V06dNEDVaOvUzPug/R7cQ+WPk3n7WVis4zZfzKgTxJFBxNAjCtvRSWoLZ9hqw0NmEXw+Z91cfALN6yD9ievDHSbG3mY4qBVDKVCpDqznE5DI5lLwOs6CteHkFxIuwVcQQZW450QDT452bgetxCavOfo9G6LD//KlPdsokNX8WH9VoyFDneimV6+fcR1fz9+9eP1wxKlSS1E9vqYDhBNxqKfxmhHxkuNwumI0kgRHHTeas/BzNG4dDTIDbGjgPkATEmfkPQFY5jCpeKYVCUYc3S0h/k34sVb9pQGnq7Xg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=os.amperecomputing.com; dmarc=pass action=none header.from=os.amperecomputing.com; dkim=pass header.d=os.amperecomputing.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=os.amperecomputing.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=EVkvhwnZGvJmLK+2wwrGq5HUcv7rahFdqvZIjQMvlE0=; b=JPPquOoG4XpHTNF9aqsHo3aNPaPubJUEoMB4xVJt/90ydBBUAFr5afd7GrsspUiPHyzlyBdzlzKQZf06GL8dDhG0FmOMkJX4vc/DXKB5e+4j3HnO+FeFKPq7IGebM3jKXA52oBTUYy8z5MKAyLUdPCV8ZYmWejcaxmvoVRP8uBw= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=os.amperecomputing.com; Received: from DM6PR01MB5947.prod.exchangelabs.com (2603:10b6:5:1dd::12) by PH0PR01MB6715.prod.exchangelabs.com (2603:10b6:510:97::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7452.50; Sun, 14 Apr 2024 04:23:37 +0000 Received: from DM6PR01MB5947.prod.exchangelabs.com ([fe80::b557:13cd:8a29:ae08]) by DM6PR01MB5947.prod.exchangelabs.com ([fe80::b557:13cd:8a29:ae08%4]) with mapi id 15.20.7452.046; Sun, 14 Apr 2024 04:23:37 +0000 From: Chanh Nguyen To: Jean Delvare , Guenter Roeck , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Justin Ledford , devicetree@vger.kernel.org, linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org, OpenBMC Maillist , Open Source Submission Subject: [PATCH v2 3/3] dt-bindings: hwmon: max31790: Add maxim,pwmout-pin-as-tach-input property Date: Sun, 14 Apr 2024 11:22:46 +0700 Message-Id: <20240414042246.8681-4-chanh@os.amperecomputing.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240414042246.8681-1-chanh@os.amperecomputing.com> References: <20240414042246.8681-1-chanh@os.amperecomputing.com> X-ClientProxiedBy: SG2PR06CA0216.apcprd06.prod.outlook.com (2603:1096:4:68::24) To DM6PR01MB5947.prod.exchangelabs.com (2603:10b6:5:1dd::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6PR01MB5947:EE_|PH0PR01MB6715:EE_ X-MS-Office365-Filtering-Correlation-Id: 63ffb86e-5ae2-41f2-bb49-08dc5c3aa75e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0JC19MrJH2UP05b9AdcaJJPFfuX22MTV4AfoNIzAYvoc+6KzPUtfwaDNRE6w+nZVIFA/y7kPeLCbiMDEVylQnsfeLdGkf/QssMNqXzbaqbzep0+caj3RLctggwgFg1GghY+rBt3hIN6miLDjjqb7wofxN8Q2zWsAVcx46RhEpsS6LxW7gGK7XOs2z5V+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ArMycMv2dwZ0MsAWKqThJU5xrxJ5iFZ5vakUKapdpAz26LIvrBQdVKOQPixHFFCRnwbqabXMhpsVNjd9lCdjhzPUswGksuTgjU0O02SXTIB2rw= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR01MB5947.prod.exchangelabs.com;PTR:;CAT:NONE;SFS:(13230031)(1800799015)(52116005)(7416005)(376005)(366007)(921011)(38350700005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 1c74AE2iZ4DTFXSyX+oguEPp/qUfPBmxfWqyYtN+Tp/O4zvz2ThE/Eex9TfKbjhU1R2TTxH98VKnygjsexZGtEcuudfBGHS0ZG/xDaC5nqda/GKZxPwChLyj2WFApWL3aPq+LHOfxcubiTlbeRtW1iic3qbCWlYP28keZH6PUrqcM8UWU1aAHuKAyLCvOgVBu6U/vbZzk3n/cBmKMjLBwG81hxHAg75tBsM/Ckqz8yMEJ6J5+lG952hUPFnIYRPAK2AMjQ7IRznNTRyfzt6nt5e3EILsqqTimOldZ/UJdqBRgngGm2MqZxB4cWwbCsR3FoevFk5K1r8jAMKpMSWTNte0krihMgAqHv7CVDn0omPFBOHj0pfxWSzXZ+lqPu2GKqTWWFnW3E/i0vhLxlK496+rkMUVpV8XrlH5FnDBtohwVIp7njPpdJlLhfjSbVGzEFvxiqt8R0auHjHorIEIUvquxSSE3/NBx7siE3dS+jqdBSfmTAQjeZ1MJWoXELLET6r1eBmrBJFpY/HIgmCPFmmjJDRqTggzaFiQWrq2Y/OXSBI42Jg+oB5X2UOY8xKXyz4qM9sP1MIEvk59sIwidaQBduvm5P7EIRQh4J/T5yzLCuNP2dhKXEN6U7tadFkjHQpsB3xS0VBev5/QkWF2hJoOqPtE17VT942yy2475AXon/vyczSopkweHro4FjCQ+tHBS9pEmhdLWLVFcF29qIPE1O30hHDXOqgS3VseSjEhTbanMH6fhJKk21HKg4TnXrQ13Yfe1Yo885E9/7/uExSZajDMt70AjvpLHTok+HL44+7GF95vNKculGyp2got6qY87v/9XIW6kPH0x6p9aIYlfr399NJLZWg+Z5HuoQZ72xRg+KB8HWryXRKliaGoJ1TOFeqGs+OB4JYVPOS0sUG/Ey6bvK5nXhimKVcHT4h//dwPKJcp4qPSvTDCMcuZENEquA/XvVuVSRPQ2WwqqWwYRKTqB538CrbuPc6UX5AUGqWA80jaYoHwIDdGNXoGATgbN+luw2xNjNs3faeRAtWseORSvCJLsyC66tgHPPr64BB4s6yVUiO4iFDyxp/dSM0ldswiVCknP+tn5BEOgWpajyFE0dVTICoKc7dWKSA92g+SCHy5IgAECmFxcAT3MOG7CXjzpuLv1+NiIds7F0FfGzDzZvQDg7u1ZqMjJPKSiyjaKz9UB4C8fNu5Ambg0AdcjqcVve8hPhFnrnOZP6ek8iuPKABKWr8QJIa9vnzCEdKziCMeuqglE0GL+ByNcZtBzTsABFMSEJ3lmdumrU6fhZQJjCW7zIokPqk+7N5Tve/lVxcqZRRJ1jGkMPimlm5LbpqGOR837jCLVF3rHHszlFsaV4Pz8MY51ptVYfbMgJEuAILqbNhP0ivGg2p5/PjiL50jNOgHg13SC0MlfQQ75OzfuVeAw11d0aSueemcPG3mYBLmCLotOtH6ZX1RihQfQ08hUdlQcz1PD21ogDuZH78hbE+gQxe4tPfKx+3csNrnWGFh91Iz65wlh662D1PT3jLfca25qSrf+eYyqPPdYmUxaxIjnpGd9IbaM586VXAQBEqlz8f/3rZXHYDjo4aHHeiM0xSPbxhXW4zEoMWzWcChGNB7ww8zqWLv0TY= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: 63ffb86e-5ae2-41f2-bb49-08dc5c3aa75e X-MS-Exchange-CrossTenant-AuthSource: DM6PR01MB5947.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Apr 2024 04:23:36.9445 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3bc2b170-fd94-476d-b0ce-4229bdc904a7 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: kZKlJutpeUddnd9bPywT3KumJ5yMce60rOl96RUfOQVLrYkL4ievYMT5f/7bU/B1dFDvxKJF2qN8AeG1VZd1LY4o9vSPY6zoUuxjceRVoruL5CGpbv4HyjaRc1PCuFo6 X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR01MB6715 X-BeenThere: openbmc@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development list for OpenBMC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Chanh Nguyen , Thang Nguyen , Phong Vo , Quan Nguyen Errors-To: openbmc-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "openbmc" The max31790 supports six pins, which are dedicated PWM outputs. Any of the six PWM outputs can also be configured to serve as tachometer inputs, allowing for up to 12 tachometer fans to be monitored. Add a new vendor-specific property, 'maxim,pwmout-pin-as-tach-input', to allow PWMOUT to become a TACH input. An array of six integers responds to six PWM channels for configuring the PWM to TACH mode. When set to 0, the associated PWMOUT produces a PWM waveform for control of fan speed. When set to 1, PWMOUT becomes a TACH input. Signed-off-by: Chanh Nguyen --- Changes in v2: - Update the vendor property name to "maxim,pwmout-pin-as-tach-input" [Rob] - Update commit message [Krzysztof] --- .../devicetree/bindings/hwmon/maxim,max31790.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Documentation/devicetree/bindings/hwmon/maxim,max31790.yaml b/Documentation/devicetree/bindings/hwmon/maxim,max31790.yaml index a561e5a3e9e4..2d4f50bc7c41 100644 --- a/Documentation/devicetree/bindings/hwmon/maxim,max31790.yaml +++ b/Documentation/devicetree/bindings/hwmon/maxim,max31790.yaml @@ -30,6 +30,16 @@ properties: resets: maxItems: 1 + maxim,pwmout-pin-as-tach-input: + description: | + An array of six integers responds to six PWM channels for + configuring the pwm to tach mode. + When set to 0, the associated PWMOUT produces a PWM waveform for + control of fan speed. When set to 1, PWMOUT becomes a TACH input + $ref: /schemas/types.yaml#/definitions/uint8-array + maxItems: 6 + minItems: 6 + required: - compatible - reg @@ -48,5 +58,6 @@ examples: fan-controller@20 { compatible = "maxim,max31790"; reg = <0x20>; + maxim,pwmout-pin-as-tach-input = /bits/ 8 <0 0 0 0 1 1>; }; };