]> git.karo-electronics.de Git - karo-tx-linux.git/commit
thermal: add support to disable thermal zone from DTS
authorLaxman Dewangan <ldewangan@nvidia.com>
Fri, 25 Jul 2014 10:01:58 +0000 (15:31 +0530)
committerEduardo Valentin <edubezval@gmail.com>
Tue, 29 Jul 2014 13:45:39 +0000 (09:45 -0400)
commita020279ee611c31ac163c00b21b975e7ecbb2e9c
tree27aba45b8a8d30732c69572fda32e85145b438b7
parent208cd822a19e683bc890f6708786f2420e172d76
thermal: add support to disable thermal zone from DTS

Add support to check status of the thermal zone before registering the
zone. This will help on disabling some non-existing thermal zone from
the top level DTS file out of common dtsi thermalzone file.

For example,
we have 3 platforms almost same but thermal zones on this platform are
little bit different. Platform 1 and 2 have three thermal zones and
platform 3 has two thermal zones. To avoid duplication of the thermal
zones entries on each DTS file of platforms,we created one common
dtsi file for thermal zone and included this dtsi file from these
3 platform's top level dts file.

On common thermal zone com dtsi file, all thermal zone are enabled and
need to disable one of thermal zone on platform 3 dts file. For this, we
just added entry status = "disabled" for that thermal zone on platform 3
dts file and along with this change to make it work.

This way, we reuse the common file and control the enable/disable of the
thermal zone from top level dts file.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
drivers/thermal/of-thermal.c