thermal/drivers/exynos: Stop using the threshold mechanism on Exynos 4210
[sfrench/cifs-2.6.git] / drivers / thermal / samsung / exynos_tmu.c
index 3bdcbab7466f5916c896f15f5eb98070fc09cb91..d918bf6d53599533f5d39a802e6017a924795340 100644 (file)
@@ -343,20 +343,7 @@ static void exynos_tmu_control(struct platform_device *pdev, bool on)
 static void exynos4210_tmu_set_trip_temp(struct exynos_tmu_data *data,
                                         int trip_id, u8 temp)
 {
-       struct thermal_trip trip;
-       u8 ref, th_code;
-
-       if (thermal_zone_get_trip(data->tzd, 0, &trip))
-               return;
-
-       ref = trip.temperature / MCELSIUS;
-
-       if (trip_id == 0) {
-               th_code = temp_to_code(data, ref);
-               writeb(th_code, data->base + EXYNOS4210_TMU_REG_THRESHOLD_TEMP);
-       }
-
-       temp -= ref;
+       temp = temp_to_code(data, temp);
        writeb(temp, data->base + EXYNOS4210_TMU_REG_TRIG_LEVEL0 + trip_id * 4);
 }
 
@@ -371,6 +358,8 @@ static void exynos4210_tmu_initialize(struct platform_device *pdev)
        struct exynos_tmu_data *data = platform_get_drvdata(pdev);
 
        sanitize_temp_error(data, readl(data->base + EXYNOS_TMU_REG_TRIMINFO));
+
+       writeb(0, data->base + EXYNOS4210_TMU_REG_THRESHOLD_TEMP);
 }
 
 static void exynos4412_tmu_set_trip_temp(struct exynos_tmu_data *data,