Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp453754img; Fri, 22 Mar 2019 01:26:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqznUDsVhHviOpd4fHG0F1lXDEzykjBxCF46EMKaf7d81NT0ne9Y4Mt5LiHrIOdq2AF3h/DI X-Received: by 2002:a63:a04c:: with SMTP id u12mr7762538pgn.131.1553243164355; Fri, 22 Mar 2019 01:26:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553243164; cv=none; d=google.com; s=arc-20160816; b=Xtg/4L6WwE+RJ1vHkA8VZJHKjAq5Wz7qSkmoJryQOlClQ4bf7r7WvR7oUNpqgVnQIK dTHDx5GnoIBh4QBc09491ojqAF3SBqUWQpwE7NfGSfxglN7P6k68xidMiiFtI5TBjRYa qw1anfOokPti95ygvw9amelYJchK7VX/QgSqitHTaJS76ncaD9aHQ2rXohDjC9U+iCiH oAxDTcF//PFD+EW+rFIB9BQaExi3gDtcXmcoWRvPXJ+jDI9C5y7bJYxfzvJwVoUftdfN eMCad+HxWd9jFwzGdJ5g4lvBcFmYsPiqcYlCH3xOTc8qLveYyZ5tua8VHBo8EzA+PPOG 6GUw== 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=mzcNQdRg2GH5d7elSsuOwaT1fkmnT2ky61+HoGG+M44=; b=L/wBqeeVR+MK9O+s4/zwFoSqq0fI8hGcXicp+JOlKr0yXkm7xEHuBmHzMDTnrtQnri 7yNMRdg8DZlWy3CE0gt6l4ZtyV75ogtgUngX936fv3+r9cZu8fBi7n0adVdsngehC0sb RgUMRgIZWBemhXBhjT/ufRCyErC9JNiva/GOjURSKqyUZddAkZcmTRoaCiKpQy+/XGMh THRoPIkEIsXHCap6aBcxAXoA5hEcEZBfcxq+0gYkFQv2c7tjFrs85a4v+YPztYqMb8ID zQPFzn83VQN5yriHpCzydp2MaFJ5yS0GdSFaQRUlIsbUwm9ldDC4wmsMbsz9nEZgSQMO KNKw== 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 q2si6370949pgc.507.2019.03.22.01.25.49; Fri, 22 Mar 2019 01:26:04 -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 S1727658AbfCVIZL (ORCPT + 99 others); Fri, 22 Mar 2019 04:25:11 -0400 Received: from mout.kundenserver.de ([212.227.126.133]:59849 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725938AbfCVIZK (ORCPT ); Fri, 22 Mar 2019 04:25:10 -0400 Received: from stefan-Vostro-260.fritz.box ([109.104.35.112]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MIyiY-1hRehm3YK2-00KPMi; Fri, 22 Mar 2019 09:24:24 +0100 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 V3 1/3] dt-bindings: hwmon: Add tachometer interrupt to pwm-fan Date: Fri, 22 Mar 2019 09:24:01 +0100 Message-Id: <1553243043-19486-2-git-send-email-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1553243043-19486-1-git-send-email-stefan.wahren@i2se.com> References: <1553243043-19486-1-git-send-email-stefan.wahren@i2se.com> X-Provags-ID: V03:K1:nq8OyT1wg7dcG8eHRnTrK/K41jzHU5JOzyyFlAgAFvZJqsHNxSM warCX7BwYqtO5bkset+71PibLpJ4SnOLUSr+F/IXPQ2HNmW7et5Oe6gijrOu7Ud+YKuKO/f CZcKJBmGldl3Ja6cG7pYGofzo6ZtYgxRNb5N3O/eCODkUZDtiiNSQxVilN02V6ur6xeQrp2 1tVt/dOBgaHNfpxHNhqBQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:OL9dj5Zfnz4=:0doaADnROYYwKRP+Besd91 K84IYNCCY/Y0CdcsfNKipoRZPbitoC4WEw1Y6ECuSqgjbzEliDu3oWMC2D1Aq2afxoRHIxV2O eIZ0sjJltLVJwWEJj+YewNN3uqg4+u3v19aFeAOTf7+3gLtY88X9Df9g+oRemHwaDv/WQfdu2 Wf25jeuNJt1cfGB8r++gU8DLmMB2vZjiAMb6wGl2xtQjrwxteWCga+C+0B0uJlz7XM7dt2yng T77gMKLRNiR/TkSeuv7BnrAfJfbeuxYRKAiCtvw69ww/+xX67iI28aSaI1a6ImRSdiW3zL5dv WRANPOChY2AaJUXVPED2VF8htuPE4pnuGi6Ovk2Z9ZlOFUFWdhpVqWgIrniRc4si5zcXEfZlX o9A9uUpw3UyXxF3H2tu6cb3P8ZAUlP/kSqwn0TuRYeN3JfBAv5CoY1KBEE8v6pg1mj5BcHnwG WcxsKcM1GkhvB8YMaJc2TC554fTpFdkS2zs1Gl4dN5Qxjt9e/eNhZS0mCViz0IEWAhaZH/gwy o1TxBOeVmXc5ViPkfNpjVujAwYxMCEteQNKTiCgrjAAu7mW8AUGay/jizaQdpGrbwQRvXWABu 6GfR+y8g853qQTHKVWLfYy3vwAer7CTeS1agxzVOBFyABUvw8Tk+KDCwl2rvh915b14UwQ8yN n1bW3rUDNYkzC7JfiwZl0OoF3uJGlOFgXpPoEgs7G1WKOh3orDsoQrkE5LkIzdx7+r2E6YMKD KnZ9+8JNWdcfI1QXwvNAc3qYSXEe1OnA9M9QAT8YDRC5Q/yBnChV67S4hP+qEPbGmkh48X4di rX6TjW6 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 --- .../devicetree/bindings/hwmon/pwm-fan.txt | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/hwmon/pwm-fan.txt b/Documentation/devicetree/bindings/hwmon/pwm-fan.txt index 49ca5d8..722005f 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,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>; + pulses-per-revolution = <2>; + }; -- 2.7.4