Back to home page

OSCL-LXR

 
 

    


0001 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/hwmon/ti,tmp421.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006 
0007 title: TMP42x/TMP44x temperature sensor
0008 
0009 maintainers:
0010   - Guenter Roeck <linux@roeck-us.net>
0011 
0012 description: |
0013   ±1°C Remote and Local temperature sensor
0014   https://www.ti.com/lit/ds/symlink/tmp422.pdf
0015 
0016 properties:
0017   compatible:
0018     enum:
0019       - ti,tmp421
0020       - ti,tmp422
0021       - ti,tmp423
0022       - ti,tmp441
0023       - ti,tmp442
0024   reg:
0025     maxItems: 1
0026 
0027   '#address-cells':
0028     const: 1
0029 
0030   '#size-cells':
0031     const: 0
0032 
0033 required:
0034   - compatible
0035   - reg
0036 
0037 additionalProperties: false
0038 
0039 patternProperties:
0040   "^channel@([0-3])$":
0041     type: object
0042     description: |
0043       Represents channels of the device and their specific configuration.
0044 
0045     properties:
0046       reg:
0047         description: |
0048           The channel number. 0 is local channel, 1-3 are remote channels
0049         items:
0050           minimum: 0
0051           maximum: 3
0052 
0053       label:
0054         description: |
0055           A descriptive name for this channel, like "ambient" or "psu".
0056 
0057       ti,n-factor:
0058         description: |
0059           The value (two's complement) to be programmed in the channel specific N correction register.
0060           For remote channels only.
0061         $ref: /schemas/types.yaml#/definitions/int32
0062         minimum: -128
0063         maximum: 127
0064 
0065     required:
0066       - reg
0067 
0068     additionalProperties: false
0069 
0070 examples:
0071   - |
0072     i2c {
0073       #address-cells = <1>;
0074       #size-cells = <0>;
0075 
0076       sensor@4c {
0077         compatible = "ti,tmp422";
0078         reg = <0x4c>;
0079       };
0080     };
0081   - |
0082     i2c {
0083       #address-cells = <1>;
0084       #size-cells = <0>;
0085 
0086       sensor@4c {
0087         compatible = "ti,tmp422";
0088         reg = <0x4c>;
0089         #address-cells = <1>;
0090         #size-cells = <0>;
0091 
0092         channel@0 {
0093           reg = <0x0>;
0094           ti,n-factor = <0x1>;
0095           label = "local";
0096         };
0097 
0098         channel@1 {
0099           reg = <0x1>;
0100           ti,n-factor = <0x0>;
0101           label = "somelabel";
0102         };
0103 
0104         channel@2 {
0105           reg = <0x2>;
0106           status = "disabled";
0107         };
0108       };
0109     };