Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5823526yba; Thu, 11 Apr 2019 06:32:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqyUym7703qAiAXT58K4h4qvN0/XITeEANwD5X4o7btLwnIbZB4YAKBaj76NBoetzqciqvo9 X-Received: by 2002:a17:902:8604:: with SMTP id f4mr39794964plo.245.1554989562621; Thu, 11 Apr 2019 06:32:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554989562; cv=none; d=google.com; s=arc-20160816; b=XbQ8Y/X+/QSYVvnRNSdWIEtR8pmkOdXBw9dqICsP5hM3pO36eIBZvzwgAhRt09xfKc P8HxihOsR6JjqYt5lOY/hBkSuMR6fG1hJk1eLxhLK34fXNfNQYfWlpDYMEPSUfX5RgB1 G67NjCpNs5rR2YoRImjGkvP4Y7buhTPnunQkBl/0mObhvx3Q0d3dSOoLFbzndUuUpqdS BT3/9qesG1BZfNKMRBoN4eH8sDFI6uzNlVK0Hvt44ro0xrLQiKwaA0AXFW2ClW6KRQnV LSTZg++fS4Frdz5+B2W9Aeu9HzgOPQIrIDf497p2zwRO7hCOOPaiLjqi9tc9zE2zxg6t /fwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=eNUavgskrJzkZ+EipVfc060rgBtejoGZ3q2XoYbxbUQ=; b=DpbmS8JSt9woZiOm05UEU5lv6DNCyLz6gB8H9OH37+4ZMSdoxLtpOphLdSFcAODlgx 0zrJgMODdhdxdSzNTGMBPpoOB44KAjykB8WL2wbD87FllCS7s7Ut2PbjkG6yHVSlhYFk lrv93iUld6Dk2XLKh5cV8TRZus7jmdU0N0pRgPGVa3dW+d4n3SK15GOMMf2V/y6YoKdB 50gYideBCq6RqP8NrQAI3OuDpMOQLcMxtUVGrx+AHnJAcEzYS+/n0bIC7NDwiU3ZT8LG 911q7XELSp9uhykbVzh9TN1M5+xCmD6sfL/AblB0wwUBV4HCpdHzIo2fDKTmH6kzfxr8 j/9Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t10si34105131plr.229.2019.04.11.06.32.26; Thu, 11 Apr 2019 06:32:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726920AbfDKNb0 (ORCPT + 99 others); Thu, 11 Apr 2019 09:31:26 -0400 Received: from mout.kundenserver.de ([217.72.192.73]:51765 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726861AbfDKNbP (ORCPT ); Thu, 11 Apr 2019 09:31:15 -0400 Received: from stefan-Vostro-260.fritz.box ([109.104.50.113]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.183]) with ESMTPSA (Nemesis) id 1M2fHt-1hASur3XuJ-004Epe; Thu, 11 Apr 2019 15:30:34 +0200 From: Stefan Wahren To: Kamil Debski , Bartlomiej Zolnierkiewicz , Jean Delvare , Guenter Roeck , Rob Herring , Mark Rutland , Robin Murphy Cc: linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Stefan Wahren Subject: [PATCH V5 1/3] dt-bindings: hwmon: Add tachometer interrupt to pwm-fan Date: Thu, 11 Apr 2019 15:30:09 +0200 Message-Id: <1554989411-23666-2-git-send-email-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1554989411-23666-1-git-send-email-stefan.wahren@i2se.com> References: <1554989411-23666-1-git-send-email-stefan.wahren@i2se.com> X-Provags-ID: V03:K1:PsCpnIbDmYyadjYtyuCDYERvLwlE1+qgamUhOm27R72Y72OTRYX IY83JXWpQFjyxmt/DpGXZK4on9mtDsd/5Jp3diCfdx3eHHBDGll+xoZeqnZSFMHVT2s0FtF CB1QwRZD6xzZwQe719ocYdyWyvDy16uLNlrPfeikx18LgbT+7mbX9ZG52ooKR/xU7Sqvw6e qdyHO6EWyYU5LLVFPjmBA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:okX84hxT2BU=:Jc10rmYeGb4EB1xyV6rfYJ 21yjCxN8JPGzK3vA0X+yYH0OOIeFYnVfSacr3A7swhOfPpxtqyCqZnjJyAGZJq2jGl3LnM1pW bc9h5tVyX2ulxlhRmfTnLYbWu1Vm2LBLvDVHTWAkarM4EeNd8hGwzC8X61TPAR+N2I+m+55Hc h6AHXaanZdIzvjdqjGe429sSU9SG6s2NKcvSi6zIUQXpb18f9RJlV9kuG0lZq5l9N2pEjkMJH H/JIoYXoaL+JFN1hKg39JLXsEV6sG9aSS/6TlxaiENI3DmzZkR3GGg8oRRjBtrQ5Dh3j/VV1C EBPZx2diTwsFHlQXacWgv0xqmW27qycjy0xfpr1qpuVz6F3KKRLsyWAcqfOFjuYMnPHDoFnX7 nn4bCPOFY11uVh2pVpJaWNvczB+s4sdTFiao4HqkeXwnLdYZQfg40p2A6mW57YYzPDmBBwrnN a79ru7iDtISpr5YlRndzRqBBOzRtu27nxEjTF6TuE6bAEUa/oY5wuSWfKtutehScZiNchZmw/ GzCH4ebqfOOaphUnzQoX0GmSqNeTOHJMpgMyxir590iwIOZhpqfxSPrfyixoQJFSiWWXPj4Tq 8XY+ofYzr37PzjWAGV+8TaSwX6/sfJm85r0Bqo0t6m6nIfynDKB2Rb//cxOFYFwGpNPxkDOJn CSxJ4+pKrqWY6ClnBXSnsL4HryFo67chEAj0hUqHg8acTigUIgEUftGyGB0kvrzMhSRZtGJNK LuO9DgJzEE3dO14L35kTSwossXmdu8iFsV4cGL34XmBPDffQUiR8bB2MsHI= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This adds the tachometer interrupt to the pwm-fan binding, which is necessary for RPM support. Signed-off-by: Stefan Wahren Reviewed-by: Rob Herring --- Documentation/devicetree/bindings/hwmon/pwm-fan.txt | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/hwmon/pwm-fan.txt b/Documentation/devicetree/bindings/hwmon/pwm-fan.txt index 49ca5d8..6ced829b 100644 --- a/Documentation/devicetree/bindings/hwmon/pwm-fan.txt +++ b/Documentation/devicetree/bindings/hwmon/pwm-fan.txt @@ -7,7 +7,16 @@ Required properties: which correspond to thermal cooling states Optional properties: -- fan-supply : phandle to the regulator that provides power to the fan +- fan-supply : phandle to the regulator that provides power to the fan +- interrupts : This contains a single interrupt specifier which + describes the tachometer output of the fan as an + interrupt source. The output signal must generate a + defined number of interrupts per fan revolution, which + require that it must be self resetting edge interrupts. + See interrupt-controller/interrupts.txt for the format. +- pulses-per-revolution : define the tachometer pulses per fan revolution as + an integer (default is 2 interrupts per revolution). + The value must be greater than zero. Example: fan0: pwm-fan { @@ -38,3 +47,13 @@ Example: }; }; }; + +Example 2: + fan0: pwm-fan { + compatible = "pwm-fan"; + pwms = <&pwm 0 40000 0>; + fan-supply = <®_fan>; + interrupt-parent = <&gpio5>; + interrupts = <1 IRQ_TYPE_EDGE_FALLING>; + pulses-per-revolution = <2>; + }; -- 2.7.4