From patchwork Sun Sep 2 11:20:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 10585107 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0DA0716B1 for ; Sun, 2 Sep 2018 11:23:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EDDC329B1D for ; Sun, 2 Sep 2018 11:23:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DDDCC29B14; Sun, 2 Sep 2018 11:23:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7FD9729B14 for ; Sun, 2 Sep 2018 11:23:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=XPhE9kd3U+BR8+EMrtO2CINHvyVoawINJbkWHf1B348=; b=QE/ +7+yW+V0Z1LxYKJsy0mPYkI3RYWWFIWWWVwCxkELawyNgyEXGtyHJlKAI+ErpkJBEFkqI7n+hEEFV 011yJkvpj6+q0OeuMk/M1Rtu+lxsoafoLFrW8im+5502oe3nVkgKrdGvsIj3E0b6zDQXWcjIhX+x0 7Q1EUM8slanHW6f5f0aDxwij8NCjVWbW45/QoTCvbx6pNHnT2TZSRQTnMicQDmWUcLf+xhttGRS5R sRqxtVUH898EBbSNpJcGnMenTzOfvSahJfjbN0qzHU0E6pWGmy+j+Or6uYTcqVAjKPGe8ctDfjuE1 vp0YjedbV6Qvvjqow0dvlBlsmwWjtFg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fwQTR-00081Z-8T; Sun, 02 Sep 2018 11:23:21 +0000 Received: from mout.kundenserver.de ([212.227.17.24]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fwQSv-0007mI-Mi; Sun, 02 Sep 2018 11:22:51 +0000 Received: from localhost.localdomain ([37.4.249.97]) by mrelayeu.kundenserver.de (mreue101 [212.227.15.183]) with ESMTPSA (Nemesis) id 0MTQ5X-1gN3Zv1b3X-00SPxa; Sun, 02 Sep 2018 13:22:08 +0200 From: Stefan Wahren To: Jean Delvare , Guenter Roeck , Rob Herring , Mark Rutland Subject: [PATCH RFC 0/2] hwmon: Add RPi PoE HAT fan driver Date: Sun, 2 Sep 2018 13:20:49 +0200 Message-Id: <1535887251-29515-1-git-send-email-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.7.4 X-Provags-ID: V03:K1:TpjAAA3/EXvRpMTq2O4xqR89lOWOYoXF/FOZeK0Esf5GpLpisIV xAzqg8sIRgXCocI/sEVzpcBm3YYs5hM+kmKBC0nvTcQXe8mjZ/YKqwRwxG0dmOj/zxYJEMw DDVVvJ6Rg0+GFfVWolJ9dZ9/cIF9pMn2xYQPkPzPpY+VPEkSuGROLv9nM6f7PB/3tVEnj5m N8WdXBZNpot2uhHqwYEsA== X-UI-Out-Filterresults: notjunk:1;V01:K0:qNQLwyNTlus=:pGArnJ1m6H6CmYPP10XP8E l83iJmuSJtZLei7irhqs/UPR3AIiyJWwy/pxJ4B/iFpAomgDnwevlZBpK+Wslwh8RFyxpb3oA PiC8qH5f4/2Vzct1vb57fzC6JI93bv3qIHFQ6jwVuhwA3xcwgjw9FDUhyAc26fnOy/CV8JmqJ /JX/ERZKrqEL7YvnalVGC8VgxoUNlUE9wDDcuftbrImlXrZgPTvPhY5p/08RbkH7KFrkueSBM 2XXhj01asvH17YOKbYuAHxp+xbaZBiOTr/+Did55tDQpMq3za2Dh4nAxNgDyu1W/02gRH3bWo vOHL64XChnBVvek2+IMOYnM/zcThP6OQBw3Jhp9Ww9Ep9F/K/p9/OBCHjO7Pcdatc71NeeqeG psI9lJ/R6tamke3jUOkFsYL6LgzEGb/+2VyzpoHmqB3IY1QAPMEIsNN/TUj5JkVsN0KVD7U2e tWcNCJXlaYMRg1HjZpf/29TfirZi96zuO26UB3NzEr1HmxVf9U4DAX1fAnkVO34utbyHAg3Tr PZzeyptSsQsxR+JQwsk9B/F6vOjgOeZJRjO/ml1pvIyLqjMnmV6rJecXHmSguGJiCv4ReiE0i XVpHsq+G2YkISO2pB5ndVkCZEfG0ckN7CwU6a51pXrQMj9ETT71gS3Dkoi3Cc0/mDjgAF0yjv 3G3eGQtfO+EIxwarsesZD+j5R/DgX8+++yZpbdooQjTF8kDAm4cziEzUmw37GiK5OVuw= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180902_042250_088682_D621EC54 X-CRM114-Status: GOOD ( 16.62 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, Florian Fainelli , Stefan Wahren , Phil Elwell , linux-kernel@vger.kernel.org, Eric Anholt , bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This series is an early stage of the hwmon driver for the fan on the Raspberry Pi Power over Ethernet HAT [1]. At the end this should use a Device Tree Overlay. Changes by Stefan based on [2]: - reformat the downstream patches for submission - drop reboot notification - fix remaining checkpatch issues - add COMPILE_TEST to Kconfig The driver is mostly copy & paste from pwm-fan, which isn't good. Personally i see two options: 1) integrate the driver function into the pwm-fan driver (new compatible) 2) implement the core function as a PWM driver and use the pwm-fan driver on top [1] - https://www.raspberrypi.org/products/poe-hat/ [2] - https://github.com/raspberrypi/linux/commit/0f937c8dc3201ebffa6c617c616fd7c65db65959 Serge Schneider (2): dt-bindings: hwmon: Add RPi PoE HAT documentation hwmon: Add RPi PoE HAT fan driver .../devicetree/bindings/hwmon/rpi-poe-fan.txt | 55 +++ Documentation/hwmon/rpi-poe-fan | 15 + drivers/hwmon/Kconfig | 11 + drivers/hwmon/Makefile | 1 + drivers/hwmon/rpi-poe-fan.c | 414 +++++++++++++++++++++ include/soc/bcm2835/raspberrypi-firmware.h | 2 + 6 files changed, 498 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwmon/rpi-poe-fan.txt create mode 100644 Documentation/hwmon/rpi-poe-fan create mode 100644 drivers/hwmon/rpi-poe-fan.c