]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/thermal/imx_thermal.c
KARO: cleanup after merge of Freescale 3.10.17 stuff
[karo-tx-linux.git] / drivers / thermal / imx_thermal.c
index 36220599acf7066412a14b3b7a10f9789bcc86a5..1143db7a97ad23240554b36f710e5f6c64e27edb 100644 (file)
@@ -61,6 +61,12 @@ enum imx_thermal_trip {
 #define IMX_TEMP_PASSIVE               85000
 #define IMX_TEMP_PASSIVE_COOL_DELTA    10000
 
+/*
+ * The maximum die temperature on imx parts is 105C, let's give some cushion
+ * for noise and possible temperature rise between measurements.
+ */
+#define IMX_TEMP_CRITICAL              100000
+
 #define IMX_POLLING_DELAY              2000 /* millisecond */
 #define IMX_PASSIVE_DELAY              1000
 
@@ -310,7 +316,7 @@ static int imx_get_trend(struct thermal_zone_device *tz,
        return 0;
 }
 
-static const struct thermal_zone_device_ops imx_tz_ops = {
+static struct thermal_zone_device_ops imx_tz_ops = {
        .bind = imx_bind,
        .unbind = imx_unbind,
        .get_temp = imx_get_temp,
@@ -483,8 +489,8 @@ static int imx_thermal_probe(struct platform_device *pdev)
                return ret;
        }
 
-       data->trip_temp[IMX_TRIP_PASSIVE] = IMX_TEMP_PASSIVE;
-       data->trip_temp[IMX_TRIP_CRITICAL] = IMX_TEMP_CRITICAL;
+       data->temp_passive = IMX_TEMP_PASSIVE;
+       data->temp_critical = IMX_TEMP_CRITICAL;
        data->tz = thermal_zone_device_register("imx_thermal_zone",
                                                IMX_TRIP_NUM,
                                                BIT(IMX_TRIP_PASSIVE), data,