From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753008AbbJWXLk (ORCPT ); Fri, 23 Oct 2015 19:11:40 -0400 Received: from gproxy9-pub.mail.unifiedlayer.com ([69.89.20.122]:35110 "HELO gproxy9-pub.mail.unifiedlayer.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1752634AbbJWXLh (ORCPT ); Fri, 23 Oct 2015 19:11:37 -0400 X-Greylist: delayed 394 seconds by postgrey-1.27 at vger.kernel.org; Fri, 23 Oct 2015 19:11:37 EDT X-Authority-Analysis: v=2.1 cv=Jv9i8qIC c=1 sm=1 tr=0 a=J7Q474dc+DFtUK1fo70nSg==:117 a=J7Q474dc+DFtUK1fo70nSg==:17 a=cNaOj0WVAAAA:8 a=f5113yIGAAAA:8 a=dSbym95GAAAA:8 a=YvBuOYWDVJoA:10 a=7qCgB6OZtN4A:10 a=5lJygRwiOn0A:10 a=BxgfbMJPAAAA:8 a=2YNrRl7u5Xf8QKZZgkAA:9 a=U9NamaHG8v24m3dP:21 a=a7CloHBL5XAvtzTG:21 From: Constantine Shulyupin To: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, lm-sensors@lm-sensors.org, Arnd Bergmann , Jean Delvare , Guenter Roeck , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala Cc: Constantine Shulyupin Subject: [PATCH v7] Documentation: add Device tree bindings for hwmon/nct7802 Date: Sat, 24 Oct 2015 02:03:33 +0300 Message-Id: <1445641413-18662-1-git-send-email-const@makelinux.com> X-Mailer: git-send-email 1.9.1 X-Identified-User: {1470:box668.bluehost.com:makelinu:makelinux.com} {sentby:smtp auth 84.229.32.17 authed with const@makelinux.com} Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Introduced subnodes sensor, fan and peci with properties. Signed-off-by: Constantine Shulyupin --- Changed in v7: - sensors type (thermistor, thermistor, voltage) and pwm type selected with type property instead of compatible property. Changed in v6: - Removed previous definition. - Introduced subnodes sensor, fan and peci with properties. Changed in v5: - Fixed typos Changed in v4: - Removed registers initialization by names - Added properties nuvoton,sensor*-type Changed in v3: - Fixed vendor prefix - Added short registers description, full registers description is available at https://www.nuvoton.com/hq/products/cloud-computing/hardware-monitors/desktop-server-series/nct7802y/ Changed in v2: - Removed nct7802,reg-init - Added registers initialization by names Introduced in v1: - nct7802,reg-init --- .../devicetree/bindings/hwmon/nct7802.txt | 77 ++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwmon/nct7802.txt diff --git a/Documentation/devicetree/bindings/hwmon/nct7802.txt b/Documentation/devicetree/bindings/hwmon/nct7802.txt new file mode 100644 index 0000000..1619202 --- /dev/null +++ b/Documentation/devicetree/bindings/hwmon/nct7802.txt @@ -0,0 +1,77 @@ +Nuvoton NCT7802Y Hardware Monitoring IC + +Required node properties: + + - "compatible": must be "nuvoton,nct7802" + - "reg": I2C bus address of the device + - #address-cells=<1>; + - #size-cells=<0>; + +Optional subnodes: + +Sensor subnodes properties: + - "reg": index in range 0..2 + - "compatible", allowed values: + - "nuvoton,nct7802" + - "sensor-type", allowed values: + "thermal-diode" + "thermistor" + "voltage" + +Except sensor at address 2 can't be "thermal-diode". + +Fan subnode: + +Required properties: + - "reg" :index of in range 0 .. 2. + - "compatible", should be "nuvoton,nct7802-fan" +Optional boolean properties: + - "direct-current" :direct current powered fan instead default PWM + - "invert" :inverted polarity + - "open-drain" :open-drain output instead push pull + +Subnode "peci" properties: + - "reg" :index in range 0..1 + - "compatible", should be "nuvoton,nct7802-peci" + +Subnode vcc properties: + - "compatible", should be "nuvoton,nct7802-vcc" + +Subnode vcore properties: + - "compatible", should be "nuvoton,nct7802-vcore" + +Not defined sensors, fans and PECI modules will be disabled. + +Example nct7802 node: + +nct7802 { + compatible = "nuvoton,nct7802"; + reg = <0x2a>; + #address-cells=<1>; + #size-cells=<0>; + sensor@0 { + reg = <0>; + compatible = "nuvoton,nct7802"; + sensor-type = "thermistor" + }; + sensor@1 { + reg = <1>; + compatible = "nuvoton,nct7802"; + sensor-type = "thermal-diode"; + }; + pwm-fan@0 { + reg = <0>; + compatible = "nuvoton,nct7802-fan"; + }; + dc-fan@1 { + reg = <1>; + compatible = "nuvoton,nct7802-fan"; + dc; + invert; + open-drain; + }; + peci@0 { + reg = <0>; + compatible = "nuvoton,nct7802-peci"; + }; +}; -- 1.9.1