~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/Documentation/devicetree/bindings/hwmon/nuvoton,nct7802.yaml

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
  2 %YAML 1.2
  3 ---
  4 
  5 $id: http://devicetree.org/schemas/hwmon/nuvoton,nct7802.yaml#
  6 $schema: http://devicetree.org/meta-schemas/core.yaml#
  7 
  8 title: Nuvoton NCT7802Y Hardware Monitoring IC
  9 
 10 maintainers:
 11   - Guenter Roeck <linux@roeck-us.net>
 12 
 13 description: |
 14   The NCT7802Y is a hardware monitor IC which supports one on-die and up to
 15   5 remote temperature sensors with SMBus interface.
 16 
 17   Datasheets:
 18     https://www.nuvoton.com/export/resource-files/Nuvoton_NCT7802Y_Datasheet_V12.pdf
 19 
 20 additionalProperties: false
 21 
 22 properties:
 23   compatible:
 24     enum:
 25       - nuvoton,nct7802
 26 
 27   reg:
 28     maxItems: 1
 29 
 30   "#address-cells":
 31     const: 1
 32 
 33   "#size-cells":
 34     const: 0
 35 
 36 patternProperties:
 37   "^channel@[0-3]$":
 38     type: object
 39 
 40     additionalProperties: false
 41 
 42     properties:
 43       reg:
 44         items:
 45           - enum:
 46               - 0    # Local Temperature Sensor ("LTD")
 47               - 1    # Remote Temperature Sensor or Voltage Sensor 1 ("RTD1")
 48               - 2    # Remote Temperature Sensor or Voltage Sensor 2 ("RTD2")
 49               - 3    # Remote Temperature Sensor or Voltage Sensor 3 ("RTD3")
 50 
 51       sensor-type:
 52         items:
 53           - enum:
 54               - temperature
 55               - voltage
 56 
 57       temperature-mode:
 58         items:
 59           - enum:
 60               - thermistor
 61               - thermal-diode
 62 
 63     required:
 64       - reg
 65 
 66     allOf:
 67       # For channels RTD1, RTD2 and RTD3, require sensor-type to be set.
 68       # Otherwise (for all other channels), do not allow temperature-mode to be
 69       # set.
 70       - if:
 71           properties:
 72             reg:
 73               items:
 74                 - enum:
 75                     - 1
 76                     - 2
 77                     - 3
 78         then:
 79           required:
 80             - sensor-type
 81         else:
 82           not:
 83             required:
 84               - sensor-type
 85 
 86       # For channels RTD1 and RTD2 and if sensor-type is "temperature", require
 87       # temperature-mode to be set. Otherwise (for all other channels or
 88       # sensor-type settings), do not allow temperature-mode to be set
 89       - if:
 90           properties:
 91             reg:
 92               items:
 93                 - enum:
 94                     - 1
 95                     - 2
 96             sensor-type:
 97               items:
 98                 - enum:
 99                     - temperature
100         then:
101           required:
102             - temperature-mode
103         else:
104           not:
105             required:
106               - temperature-mode
107 
108 required:
109   - compatible
110   - reg
111 
112 examples:
113   - |
114     i2c {
115         #address-cells = <1>;
116         #size-cells = <0>;
117 
118         nct7802@28 {
119             compatible = "nuvoton,nct7802";
120             reg = <0x28>;
121 
122             #address-cells = <1>;
123             #size-cells = <0>;
124 
125             channel@0 { /* LTD */
126                 reg = <0>;
127             };
128 
129             channel@1 { /* RTD1 */
130                 reg = <1>;
131                 sensor-type = "voltage";
132             };
133 
134             channel@2 { /* RTD2 */
135                 reg = <2>;
136                 sensor-type = "temperature";
137                 temperature-mode = "thermal-diode";
138             };
139 
140             channel@3 { /* RTD3 */
141                 reg = <3>;
142                 sensor-type = "temperature";
143             };
144         };
145     };

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php