Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
[cris-mirror.git] / Documentation / devicetree / bindings / thermal / thermal-generic-adc.txt
blobd72355502b786d02d51c2d8d21e834e2351266b3
1 General Purpose Analog To Digital Converter (ADC) based thermal sensor.
3 On some of platforms, thermal sensor like thermistors are connected to
4 one of ADC channel and sensor resistance is read via voltage across the
5 sensor resistor. The voltage read across the sensor is mapped to
6 temperature using voltage-temperature lookup table.
8 Required properties:
9 ===================
10 - compatible:                Must be "generic-adc-thermal".
11 - temperature-lookup-table:  Two dimensional array of Integer; lookup table
12                              to map the relation between ADC value and
13                              temperature. When ADC is read, the value is
14                              looked up on the table to get the equivalent
15                              temperature.
16                              The first value of the each row of array is the
17                              temperature in milliCelsius and second value of
18                              the each row of array is the ADC read value.
19 - #thermal-sensor-cells:     Should be 1. See ./thermal.txt for a description
20                              of this property.
22 Example :
23 #include <dt-bindings/thermal/thermal.h>
25 i2c@7000c400 {
26         ads1015: ads1015@4a {
27                 reg = <0x4a>;
28                 compatible = "ads1015";
29                 sampling-frequency = <3300>;
30                 #io-channel-cells = <1>;
31         };
34 tboard_thermistor: thermal-sensor {
35         compatible = "generic-adc-thermal";
36         #thermal-sensor-cells = <0>;
37         io-channels = <&ads1015 1>;
38         io-channel-names = "sensor-channel";
39         temperature-lookup-table = <    (-40000) 2578
40                                         (-39000) 2577
41                                         (-38000) 2576
42                                         (-37000) 2575
43                                         (-36000) 2574
44                                         (-35000) 2573
45                                         (-34000) 2572
46                                         (-33000) 2571
47                                         (-32000) 2569
48                                         (-31000) 2568
49                                         (-30000) 2567
50                                         ::::::::::
51                                         118000 254
52                                         119000 247
53                                         120000 240
54                                         121000 233
55                                         122000 226
56                                         123000 220
57                                         124000 214
58                                         125000 208>;
61 dummy_cool_dev: dummy-cool-dev {
62         compatible = "dummy-cooling-dev";
63         #cooling-cells = <2>; /* min followed by max */
66 thermal-zones {
67         Tboard {
68                 polling-delay = <15000>; /* milliseconds */
69                 polling-delay-passive = <0>; /* milliseconds */
70                 thermal-sensors = <&tboard_thermistor>;
72                 trips {
73                         therm_est_trip: therm_est_trip {
74                                 temperature = <40000>;
75                                 type = "active";
76                                 hysteresis = <1000>;
77                         };
78                 };
80                 cooling-maps {
81                         map0 {
82                                 trip = <&therm_est_trip>;
83                                 cooling-device = <&dummy_cool_dev THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
84                                 contribution = <100>;
85                         };
87                 };
88         };