thermal: of-thermal: add support for reading coefficients property
authorEduardo Valentin <edubezval@gmail.com>
Tue, 12 May 2015 02:48:09 +0000 (19:48 -0700)
committerEduardo Valentin <edubezval@gmail.com>
Tue, 12 May 2015 02:48:09 +0000 (19:48 -0700)
commita46dbae8abe5cd94c0189582de188d4225e19ef1
tree6685d20f0e5949d72c1538797a02e30d7cb6ea5e
parent9d0be7f4810257a9b0fc78fff641f14409f14ab3
thermal: of-thermal: add support for reading coefficients property

In order to avoid having each driver adding their own
specific DT property to specify slope and offset,
this patch adds a basic coefficient reading from
DT thermal zone node. Right now, as the thermal
framework does not support multiple sensors,
the current coefficients apply only to the only
sensor in the thermal zone.

The supported equation is a simple linear model:
slope * <sensor reading> + offset.

slope and offset are read from the coefficients
DT property. In the same way as it is described in
the DT thermal binding.

So, as of today, the thermal framework will support
only cases like:
                /* hotspot = 1 * adc + 6000 */
coefficients =          <1      6000>;

Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
drivers/thermal/of-thermal.c
This page took 0.026217 seconds and 5 git commands to generate.