Received: by 2002:ac0:b08d:0:0:0:0:0 with SMTP id l13csp4618958imc; Mon, 25 Feb 2019 08:02:25 -0800 (PST) X-Google-Smtp-Source: AHgI3Iau54an1w/TTSOT1GaUaX+QJ0g5ZFd4AzOHvYkEVc8T8be6dRusgT+W0z/ltmklAYmSoToR X-Received: by 2002:a17:902:bcc7:: with SMTP id o7mr21337109pls.89.1551110545453; Mon, 25 Feb 2019 08:02:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551110545; cv=none; d=google.com; s=arc-20160816; b=fE/rhTrCc3uuz7sK7p3Fyp4drpTBjWU0/LiOHxPRTERLc4byEumTeE/cQ3WJXY3NmA t7pU9toROFFk15WClACerdAGbYDBbUg8k0MDyR+phuH8qAYvzk+xDbDQCkIaWE5GoIxe /MOUuNMnU3cVGuvXAts3JqOv08FCo/vLBZLJczkFjrPYeS0vkAvNUOq6eHHHLNwtOpYN b5PB40F4Z8strIfahvOgpWW27mPivIQAcaOSKmdPWtal/itq7QMPdZ+jy5aNykE+3h/S i/k9kzSnbjrM4n+uBP2eR7YEdGHUIX7Ibg6cgOmUztbDrGxt8wDiQ0Xz3GeQhTAUTbxS +tyQ== 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=LiLA9iq4o3Qw9ipqhvwMGl+sBNMStzOjZjcWu8fsB84=; b=pHfeqErBZBzCMoYQhcbRh04ypbGv+GzURXgYXrjFvH8oVrnGqQkO0BZP+xfVA+pLRB RwNTIQmuwq3wM29iB4o5a2eRXisy5CxsMImufzy1rGHAcoua9KQoJ8dh7Fu2r+HCXxZ2 s+VS3G80WbK5D1E3py4lyjAhzxNZ/461kmK045L+d15qR4PEFSI28X83LmnDyT67cbbF s+SimUECh9S+mRm0NHK5dbvbEWIDQr4uLWSvntybG1dQ0SWLDDAJKsOm1TsHAITlGxqZ 5PtnbWjJEeMncp2CBUvmuKL8wq5LK2AjkX5LQQgm4+NECnysVyfYxGCNqRFULjfCaiVx I8oA== 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 x12si9684117plv.4.2019.02.25.08.01.59; Mon, 25 Feb 2019 08:02:25 -0800 (PST) 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 S1728019AbfBYQAu (ORCPT + 99 others); Mon, 25 Feb 2019 11:00:50 -0500 Received: from mout.kundenserver.de ([212.227.126.131]:60233 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727684AbfBYQAt (ORCPT ); Mon, 25 Feb 2019 11:00:49 -0500 Received: from stefan-Vostro-260.fritz.box ([109.104.53.79]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1M7Jj2-1guzoG1ske-007kBs; Mon, 25 Feb 2019 16:59:56 +0100 From: Stefan Wahren To: Kamil Debski , Bartlomiej Zolnierkiewicz , Jean Delvare , Guenter Roeck , Rob Herring , Mark Rutland Cc: linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Stefan Wahren Subject: [PATCH RFC V2 1/3] dt-bindings: hwmon: Add tachometer interrupt to pwm-fan Date: Mon, 25 Feb 2019 16:59:17 +0100 Message-Id: <1551110359-19860-2-git-send-email-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1551110359-19860-1-git-send-email-stefan.wahren@i2se.com> References: <1551110359-19860-1-git-send-email-stefan.wahren@i2se.com> X-Provags-ID: V03:K1:eQ6be8+xN/Kp+WdWtHteev5zaicZG8qo2dkAXGE1IW8/s/jeT5h 9yvyLGBTulrXXKI0eBgBGkQtyhZM2cC7e2r327/hYsvalgR7DrwoQldzuGF3g8B1uPIbZUs vvvjZE13Ws94I8YsZqOphX1wh/Qf8pd1W6LL38iUGujbal9CDy2VN1yQc6Wixd7kbsYVwk3 uL5iHge0hZhwktbXSWGwg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:VNLDuthaZDg=:1Ek/LC5E/KdBMYdlGAmMb6 sQ3MKCbop9trcckHGb97Aop6PehW0jNFRXlhj4se+7jv3S6Gw5+gbYBMzc9tuyAccPvKKcUPa UzumIFE3SR6N/z/tTMhh8DcebzSo89pZ9gDOhevHnrA5K/NHPEaPNubbsPwzZP7psfCYGFHLC rzCAaTcMu6vgs9iGGAnmHnvfDDnz1mUjd6VGh97PqXZR18j4LtC45+URGQuKy8HPBHSKkx+t2 fQNrwly5kZSx8OJx52tUdLRya1goIKflgUqd7esN1D+PFEVqJGqkavN3DT0zW9bUOcr7/15ry /oVSJgbxFBMhTelP891lvrxs5oLiRs+XkmaUYZBVaZjB5s6TpTWRvLyeNrUY0xrXv4m+JWvzq tTTT1r4YbUpcg8XPJtZrzEYlGJsDg4wjglaAfxJDH1T4pynbsCgVP+96il3XsKRKzvnudqn0a BoBEmwJGwrCo9m/n7DGAvSSvMHRBD5z5gMgbWSzleqYV4R4x4yKEXQsKYwqedeDuLo8TOOhWe fXWP7UIyXZjkXTiWOmydeqxkuMkrIr+MeTSoB3+yazOk+9sDRiIaJ0DqEdBl0RTYfljdL5JkE h3GM0cNHx4fcQo2+zaeqsagv0XFbAUXw7GEcaVQMxHpqxNSIj7di1+YEK6f4R8jDwLvexbyon D66f2s1Fk3zmN50ZwTrvCKyf7NAsLH8SdHX+Wlqj0smkhEtOKFAe0UlqZKsq4PLAJvXNi2O/R b4hDus7oWE/iOSb5YusX65b66tgBBFIVqGaC7excUv9xw1E5/2kg0Rn1xIc= 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 --- Documentation/devicetree/bindings/hwmon/pwm-fan.txt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Documentation/devicetree/bindings/hwmon/pwm-fan.txt b/Documentation/devicetree/bindings/hwmon/pwm-fan.txt index 49ca5d8..7d09623 100644 --- a/Documentation/devicetree/bindings/hwmon/pwm-fan.txt +++ b/Documentation/devicetree/bindings/hwmon/pwm-fan.txt @@ -8,6 +8,14 @@ Required properties: Optional properties: - 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. +- interrupt-ratio : defines the ratio interrupts per fan revolution as an + integer (default is 2 interrupts per revolution) Example: fan0: pwm-fan { @@ -38,3 +46,14 @@ Example: }; }; }; + +Example 2: + fan0: pwm-fan { + fan0: pwm-fan { + compatible = "pwm-fan"; + pwms = <&pwm 0 40000 0>; + fan-supply = <®_fan>; + interrupt-parent = <&gpio5>; + interrupts = <1 IRQ_TYPE_EDGE_FALLING>; + interrupt-ratio = <2>; + }; -- 2.7.4