From patchwork Tue Apr 11 21:32:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Muir X-Patchwork-Id: 9676109 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 74C9160231 for ; Tue, 11 Apr 2017 21:32:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6AFBA28569 for ; Tue, 11 Apr 2017 21:32:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5E01A2856F; Tue, 11 Apr 2017 21:32:52 +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=-6.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BF8C828569 for ; Tue, 11 Apr 2017 21:32:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753792AbdDKVcv (ORCPT ); Tue, 11 Apr 2017 17:32:51 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:36232 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753741AbdDKVcv (ORCPT ); Tue, 11 Apr 2017 17:32:51 -0400 Received: by mail-pf0-f195.google.com with SMTP id i5so1641114pfc.3 for ; Tue, 11 Apr 2017 14:32:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jmuir.com; s=jmuirsoft; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=M2kKsFioIFVORnK9XovGDa8xIEy3IXTlXWBlyTS7Q6g=; b=Cg6DBMDDzp3Ja/QEbtCkwFHtzrpqn2LzdO+LeNKKSvUiCsBkqVerwq+fKdYJ8z6W08 or1jCBCVuZhjbfkb7zmHViu+GLhBl70oxJiqTLL/ca0h6oHWJ8aNHvWYrl3r81TN+4H5 I6ahjDKuvzyM8JJzr7p8YnpKQh1S35ztF/Vhw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=M2kKsFioIFVORnK9XovGDa8xIEy3IXTlXWBlyTS7Q6g=; b=Z+Qzxxh99/tJh5lm108sxEiT24ckClaRTTfAAOMpQCe6ud9o1WAuSUGuaKyGyNx3/c 4Jj8yC4mgYx02RcwFp7l0xBY3FB1yFux/uFx0lWWsGakMkPcYR8+9qgiq7LB6KdLrgWl /8ax/eieOP92Lg6zSnSG8n1vhS6PTMYg2wHukM4XZPHXbNqjDaNF9XmNPUU1btLbPFS8 8GXQ4ZrYhr8Mg6KcFoDLQ4wKoQSjevSjTHnKu4tIJtCYZ+uqGSElwj+/W5rkZ+PEvhhh WPr9EXcF4tdO+IEwDFdktWp08N32BUb3WKYSXwoUHRyD1Fdx//hI4fWJ4ll3QWitkoxV r9dw== X-Gm-Message-State: AN3rC/5usgrnF2tg4C5FZrGBHuaBG4m2qjmsknNyx+lln/pJJPRjSgWeOVJQ1H8LkRVyPg== X-Received: by 10.84.238.198 with SMTP id l6mr24811396pln.95.1491946360314; Tue, 11 Apr 2017 14:32:40 -0700 (PDT) Received: from muirj2.mtv.corp.google.com ([172.22.140.82]) by smtp.gmail.com with ESMTPSA id a16sm29688053pgd.22.2017.04.11.14.32.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 11 Apr 2017 14:32:39 -0700 (PDT) From: John Muir To: Jean Delvare , Guenter Roeck , Jonathan Corbet , Rob Herring , Pawel Moll , Ian Campbell , Kumar Gala , devicetree@vger.kernel.org, linux-hwmon@vger.kernel.org, linux-doc@vger.kernel.org Cc: John Muir , Anatol Pomazau , Mark Segal Subject: [PATCH v2 2/2] devicetree: Document the max31760 device binding. Date: Tue, 11 Apr 2017 14:32:18 -0700 Message-Id: <20170411213218.138718-3-john@jmuir.com> X-Mailer: git-send-email 2.12.2.715.g7642488e1d-goog In-Reply-To: <20170411213218.138718-1-john@jmuir.com> References: <20170404192034.158901-1-john@jmuir.com> <20170411213218.138718-1-john@jmuir.com> Sender: linux-hwmon-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP v2: - Fixup based on comments. Signed-off-by: John Muir --- .../devicetree/bindings/hwmon/max31760.txt | 72 ++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwmon/max31760.txt diff --git a/Documentation/devicetree/bindings/hwmon/max31760.txt b/Documentation/devicetree/bindings/hwmon/max31760.txt new file mode 100644 index 000000000000..760fdf0b55e0 --- /dev/null +++ b/Documentation/devicetree/bindings/hwmon/max31760.txt @@ -0,0 +1,72 @@ +MAX31760 fan controller +----------------------- + +This device supports I2C only. Fan sub-nodes must be defined in order to enable +the fan tachometer input. See also the datasheet: +https://datasheets.maximintegrated.com/en/ds/MAX31760.pdf + +Required node properties: + - compatible: "maxim,max31760" + - reg: The I2C address of the device. This is 0x50 - 0x57 depending on the + hardware configuration. + - #address-cells: Must be 1. + - #size-cells: Must be 0. + +Optional node properties: + - maxim,fan-fail-full-only: Boolean; Assert a fan failure only when the PWM is + at 100%. + - maxim,fan-rd-signal: Boolean; Fans provide a rotation detection (RD) signal + instead of generating square-wave pulses. + - maxim,fan-rd-polarity-high: Boolean; RD is high when the fan is running, not + low. Only relevant when fan-rd-signal is true. + - maxim,fan-signal-enabled: Boolean; Externally driving FF/FS low should force + PWM output to 100%. + - maxim,fan-spin-up-enabled: Boolean; For fan startup set the PWM to 100% until + tach is detected or two seconds have passed before reducing to the target + value. + - maxim,pwm-polarity-negative: Boolean; 100% PWM is when PWM is low, not high. + - maxim,pwm-pulse-stretch-enabled: Boolean; Enable PWM pulse stretching. + - maxim,pwm-zero-fan-can-fail: Boolean; Enable fan failure detection while + ramping to 0% PWM. + +Fan sub-nodes must be present in order to enable the fan. + +Required fan sub-node properties: + - reg: Fan address. Must be <0x00> or <0x01>. + +Optional fan sub-node properties: + - label: String; Assigned to the hwmon fanX_label property. + +Temperature sub-nodes are optional. + +Required temp sub-node properties: + - reg: Temperature sensor address. Must be <0x00> or <0x01>. + +Optional temp sub-node properties: + - label: String; Assigned to the hwmon tempX_label property. + - ideality: For temperature node with reg 1 only: Set ideality factor for the + remote temperature sensor. Integer with range 0 to 63, representing a + multiplication factor of 0.9844 to 1.0489. Default: 24 (1.0080). + +Example: + max31760@50 { + compatible = "maxim,max31760"; + reg = <0x50>; + #address-cells = <1>; + #size-cells = <0>; + + maxim,fan-spin-up-enabled; + + fan@0 { + reg = <0x00>; + label = "Left"; + }; + fan@1 { + reg = <0x01>; + label = "Right"; + }; + temp@1 { + reg = <0x01>; + label = "CPU"; + }; + };