From patchwork Wed Sep 14 05:30:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathew McBride X-Patchwork-Id: 12975642 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 E1E07ECAAD8 for ; Wed, 14 Sep 2022 05:31:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229914AbiINFb0 (ORCPT ); Wed, 14 Sep 2022 01:31:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229919AbiINFbV (ORCPT ); Wed, 14 Sep 2022 01:31:21 -0400 Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 017686C745; Tue, 13 Sep 2022 22:31:05 -0700 (PDT) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 2105F5C0067; Wed, 14 Sep 2022 01:31:02 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Wed, 14 Sep 2022 01:31:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=traverse.com.au; h=cc:cc:content-transfer-encoding:date:date:from:from :in-reply-to:message-id:mime-version:reply-to:sender:subject :subject:to:to; s=fm1; t=1663133462; x=1663219862; bh=mT8Oy9Arlp TGJR2YdOtkz3D8RzCOFiwRQCLe8Tog5gU=; b=q4fUvYElSSymRhlYxHC973G/E8 IZRRGwkUTKR/lXBdg3ZW92+XZuoGlBCd/cD/HKKA9X0CB85MvoGbYd7UySG/3rDM r5CFuc+pzdwJQkeQSDH1WkGOQGsiWj5PErzDoPugWbwS7THDYtT14U+ee2ldNiwi 6e880f7QBvTEIafMHEUXZDL9bBdXJdPdFNEPDbWwbFy/YIFxcYLqwygWvEuWxexN QkclBNbPzLBgVBefoENPFa0lOYEaUnDZJmsBCqX6Z8DDPbNeT8tw8gL80vOeDUM2 LfBIurqBRVnSJfaZsWOItu3V5LSXOJPqp2MS+m9OOv7vidUhmUszA7H9VB2A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :feedback-id:feedback-id:from:from:in-reply-to:message-id :mime-version:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1663133462; x=1663219862; bh=mT8Oy9ArlpTGJR2YdOtkz3D8RzCOFiwRQCL e8Tog5gU=; b=vEB0w/FZ7dkHW3p87IheGNgqZWDVtAfMWHXGqYZ+CTCORtA541D IU2HkxaqYNfZ8oZ85N843/QnKh4G2NUchTCxOb8ayeou4oocTLia50oEkRJReb55 LjXwIN33cGXcyabCxCU+KFeiySVSyUjJOCX1xRk+XV+EvUB9eAf95/EKKJq7CZKu eXxD0eLtjdMYoC9o4LSGNv2blx0Yo+lUM+ff0d3uSELbCSzBpYMlAXsHxCQXaVJE ANJ5xF4ODMlShP1Gvs8EhLNIf8A5/eZewj2N5psw8TCOV3isA2GjJ+c+a3aKeZnc YmaT2tvx1mmcmvMX5H4XwSbLg+Yh0uftikA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfeduhedgleeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffoggfgsedtkeertd ertddtnecuhfhrohhmpeforghthhgvficuofgtuehrihguvgcuoehmrghtthesthhrrghv vghrshgvrdgtohhmrdgruheqnecuggftrfgrthhtvghrnhepgfekteegudffgfdtvedvje ejffdtgffhteefgfeuhefhleejfffgfeeuueejleffnecuvehluhhsthgvrhfuihiivgep tdenucfrrghrrghmpehmrghilhhfrhhomhepmhgrthhtsehtrhgrvhgvrhhsvgdrtghomh drrghu X-ME-Proxy: Feedback-ID: i426947f3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 14 Sep 2022 01:30:58 -0400 (EDT) From: Mathew McBride To: linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, jdelvare@suse.com, linux@roeck-us.net, krzysztof.kozlowski+dt@linaro.org, shawnguo@kernel.org, leoyang.li@nxp.com, robh+dt@kernel.org, linux-kernel@vger.kernel.org Cc: Mathew McBride Subject: [PATCH 0/3] hwmon: add Microchip EMC230X fan controller driver Date: Wed, 14 Sep 2022 05:30:27 +0000 Message-Id: <20220914053030.8929-1-matt@traverse.com.au> X-Mailer: git-send-email 2.30.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org The Microchip EMC230X (formerly made by SMSC) family of fan controllers provide PWM control for up to 5 fans (in the EMC2305). The EMC230X is capable of maintaining (closed-loop) a target RPM speed through PWM. This driver has been tested with the EMC2301 (on our Traverse Ten64 appliance) and with the EMC2305 demo board (ADM00879). The driver is by no means complete, for example, further work would be required to support the different PWM output frequencies for voltage-based fan speed control. (So far this driver has only been tested with direct PWM capable fans, like the 4 pin fans found in recent PCs) The emc230x driver also has thermal subsystem integration which allows the emc230x-controlled fan(s) to be used as cooling devices. Mathew McBride (3): hwmon: (emc230x) add Microchip (SMSC) EMC230X fan controller support dt-bindings: add binding for Microchip EMC230X fan controller family arm64: dts: ten64: add configuration for fan controller .../bindings/hwmon/microchip,emc2301.yaml | 83 +++ MAINTAINERS | 7 + .../boot/dts/freescale/fsl-ls1088a-ten64.dts | 43 ++ drivers/hwmon/Kconfig | 13 + drivers/hwmon/Makefile | 1 + drivers/hwmon/emc230x.c | 587 ++++++++++++++++++ 6 files changed, 734 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwmon/microchip,emc2301.yaml create mode 100644 drivers/hwmon/emc230x.c