]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drivers: thermal: allow ti-soc-thermal run without pcb zone
authorEduardo Valentin <eduardo.valentin@ti.com>
Sun, 15 Sep 2013 19:21:51 +0000 (15:21 -0400)
committerEduardo Valentin <eduardo.valentin@ti.com>
Tue, 15 Oct 2013 14:10:43 +0000 (10:10 -0400)
This patch changes the behavior of TI SoC thermal driver
when there is a PCB thermal zone.

Instead of reporting an error code when reading from
PCB temperature sensor fails, this patch will make
the driver attempt to compose the hotspot extrapolation
based on bandgap readings only.

Cc: Zhang Rui <rui.zhang@intel.com>
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
drivers/thermal/ti-soc-thermal/ti-thermal-common.c

index 4f8b9af54a5a75d1de884a342920ccb50f9ba869..5a47cc8c8f85ae1771c3faa1042b8f068978d570 100644 (file)
@@ -110,6 +110,7 @@ static inline int ti_thermal_get_temp(struct thermal_zone_device *thermal,
                } else {
                        dev_err(bgp->dev,
                                "Failed to read PCB state. Using defaults\n");
+                       ret = 0;
                }
        }
        *temp = ti_thermal_hotspot_temperature(tmp, slope, constant);