Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1353643yba; Tue, 2 Apr 2019 07:23:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqzvEyEZ+ArbdPLk1MEoDm6CaWlORml2NvA3ahtMaChDBIbXqAMVONfWWeTDouDaYeINecjI X-Received: by 2002:a17:902:7589:: with SMTP id j9mr5797709pll.287.1554215019135; Tue, 02 Apr 2019 07:23:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554215019; cv=none; d=google.com; s=arc-20160816; b=Wxpg15SpDtDSBTt1N/d9LRrens1YeuJijNOeaDfPdN3shoyGdY1GF2inTeI7/V7xHh Uua3dol8qXypuHtJ7qpGztfiqQbQynUp2NtHcVdtNk/g5894U2YBszS4/Udk42zX3S2y 9/Or6guoOH5ELSK+1j2GoQ5lziBV1LQ5JJCDnRXundkgIV+h61zI7Md6UhT8JaxYpHDU CmHw9R/1mpAyniwYqyOIQBThMeK1R8PZBUFdVS/ZkTwYE3eGpHVh8VggLLmPWnQVmrob 0irQLkvDd0ZUGboqR3KBYdnXA41P5XwU9wQQQzarisEWHnoNeSkyQn1zW5HMtQ40XWSs GBbA== 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=ER01U6L6yWxFfSpZbVXtqsAvbHTLYcDs2uhNI0HXIYvIp9Df0896KP8f9xAcwJ3efF T1OI7qI3D7C7WlVU4TFNFNrnbdQ52VLqVoK0MFWJyaRCsOTbMOBMk1b5Gvbbwb7A/8tk mWRbwH/XDDUXk057u0pn7Q/P/xnuivVdWcXh0MaVB2xgovdVcA9k06qKF1sKhQ3QZ4Hm x7gAe0/4JltKGkPmYOnD4zdJRuBnGwdA4uBpJUyPVMXPnHErIFT9vvW+iui6Z88ScJch NrA7RFpnqxhuYPWjb3yIJIhDChs6116IbV1oE6/1v/VDx+JfY65U8lYGk0nmW0+InjL+ AHNg== 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 j7si1869179plk.221.2019.04.02.07.23.22; Tue, 02 Apr 2019 07:23:39 -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 S1729567AbfDBOWo (ORCPT + 99 others); Tue, 2 Apr 2019 10:22:44 -0400 Received: from mout.kundenserver.de ([217.72.192.75]:37335 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726903AbfDBOWo (ORCPT ); Tue, 2 Apr 2019 10:22:44 -0400 Received: from stefan-Vostro-260.fritz.box ([109.104.50.84]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MMFdY-1hTPgS26Tu-00JHZt; Tue, 02 Apr 2019 16:22:10 +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 V4 1/3] dt-bindings: hwmon: Add tachometer interrupt to pwm-fan Date: Tue, 2 Apr 2019 16:21:48 +0200 Message-Id: <1554214910-29925-2-git-send-email-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1554214910-29925-1-git-send-email-stefan.wahren@i2se.com> References: <1554214910-29925-1-git-send-email-stefan.wahren@i2se.com> X-Provags-ID: V03:K1:6zcyaBGoBWJesMoCk1uiSDRQ0oB7TE0AM8FJneaL3zD4PE++w65 mqjbT0yqZsUsOGfmXvDqPxw+wpJy7HI3oYfYr2EFlyOVY4N+zssP+RUvcnKIhXMH3hy5H1c TV8m5PtR3YbmtU+xLKjWVflD6/kykOrcIStENuRHlX6Yg4F4ECOkr/YL78uUsGTvY+69v7E cgb7WZFjoR7bUtfs2uORg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:l6nOhuu3VfY=:OWFjvLKg617JKUK1YEE8RJ Bx1LyHv0uTLgMc5niP9cvBy8kWt8J2lc45BrTBTe0PNATFrn0asVKadmSZ+0H/pxAXitXtaxu b3cU78lfMlYgnjjFcXjRjsJqrIJXKZSo2EMUf/oG0ZgkVQBpncANw6guSNkb50xesZD1Zvw26 ktc10jb03cgZGTG1OCPUQgawI3YHYNPdmgDwiEoNRhbMYRzkWjAnvAq1jrobXU81j0vPhrzpV XmOomHSwfyF1jHvcysnnsMcSHG2cxqmfp+toZ9vxI9zjD6OI8nG5CoG5uZ227iuCz8dYm498D aQzc56JWHNZ+RpAFd04pNmDSeMVYme+xKJkQMBMtrNZc5C1ZumJ1VTTn6jjZu7zdqTP9XaR9I wc50rOHrc0GmXOmZmRQrhkqce6drk7HuFOsmGJ/nR+bHLafTvAujI7/l8y/9c3XoUG4Ddw9AY Vd3zEaUcxPYxUrPFRATp6C26xyr61HZgzgYuaD11nldHwcEJoM6KL48Bqqd4c8y2zNPDLciZb Ca+L5kJWK9Tk3/30jIft1ToPZxytZTzf8WYBwPQethQu8VTCBD/+AEBTmeja5xNJV9JCfPVhx 91p+1TnRUZbzRADfBm6jCEf7SWutsuzGTQuaMpcZnsMGDJ9qBeCLrm+2XnHzG4Wqnm6CoivBN TrARlIjyu/rfTURUUYofCt9stVIks+TDa9NeETy2/aqp3FNybQ3sjgqk7l/o22EoASwe2ENJj 6hHyy9HF16Hg3bdIzmBB1LT6EZgIpjY7TBJ8J5cRyS+G/EGDq7AlutylAzc= 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