thermal: ti-soc-thermal: Remove redundant constants
authorKeerthy <j-keerthy@ti.com>
Thu, 9 Mar 2017 08:06:01 +0000 (13:36 +0530)
committerEduardo Valentin <edubezval@gmail.com>
Thu, 30 Mar 2017 05:14:51 +0000 (22:14 -0700)
Now that slope and offset data are being passed from
device tree no need to populate in driver data.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
drivers/thermal/ti-soc-thermal/dra752-thermal-data.c
drivers/thermal/ti-soc-thermal/omap3-thermal-data.c
drivers/thermal/ti-soc-thermal/omap4-thermal-data.c
drivers/thermal/ti-soc-thermal/omap5-thermal-data.c
drivers/thermal/ti-soc-thermal/ti-bandgap.h
drivers/thermal/ti-soc-thermal/ti-thermal.h

index 118d7d8477155fd947f3735f0fc7674815de9a23..4167373327d91a051f99d158af7bf3a6f8323669 100644 (file)
@@ -410,8 +410,6 @@ const struct ti_bandgap_data dra752_data = {
                .domain = "cpu",
                .register_cooling = ti_thermal_register_cpu_cooling,
                .unregister_cooling = ti_thermal_unregister_cpu_cooling,
-               .slope = DRA752_GRADIENT_SLOPE,
-               .constant = DRA752_GRADIENT_CONST,
                .slope_pcb = DRA752_GRADIENT_SLOPE_W_PCB,
                .constant_pcb = DRA752_GRADIENT_CONST_W_PCB,
                },
@@ -419,8 +417,6 @@ const struct ti_bandgap_data dra752_data = {
                .registers = &dra752_gpu_temp_sensor_registers,
                .ts_data = &dra752_gpu_temp_sensor_data,
                .domain = "gpu",
-               .slope = DRA752_GRADIENT_SLOPE,
-               .constant = DRA752_GRADIENT_CONST,
                .slope_pcb = DRA752_GRADIENT_SLOPE_W_PCB,
                .constant_pcb = DRA752_GRADIENT_CONST_W_PCB,
                },
@@ -428,8 +424,6 @@ const struct ti_bandgap_data dra752_data = {
                .registers = &dra752_core_temp_sensor_registers,
                .ts_data = &dra752_core_temp_sensor_data,
                .domain = "core",
-               .slope = DRA752_GRADIENT_SLOPE,
-               .constant = DRA752_GRADIENT_CONST,
                .slope_pcb = DRA752_GRADIENT_SLOPE_W_PCB,
                .constant_pcb = DRA752_GRADIENT_CONST_W_PCB,
                },
@@ -437,8 +431,6 @@ const struct ti_bandgap_data dra752_data = {
                .registers = &dra752_dspeve_temp_sensor_registers,
                .ts_data = &dra752_dspeve_temp_sensor_data,
                .domain = "dspeve",
-               .slope = DRA752_GRADIENT_SLOPE,
-               .constant = DRA752_GRADIENT_CONST,
                .slope_pcb = DRA752_GRADIENT_SLOPE_W_PCB,
                .constant_pcb = DRA752_GRADIENT_CONST_W_PCB,
                },
@@ -446,8 +438,6 @@ const struct ti_bandgap_data dra752_data = {
                .registers = &dra752_iva_temp_sensor_registers,
                .ts_data = &dra752_iva_temp_sensor_data,
                .domain = "iva",
-               .slope = DRA752_GRADIENT_SLOPE,
-               .constant = DRA752_GRADIENT_CONST,
                .slope_pcb = DRA752_GRADIENT_SLOPE_W_PCB,
                .constant_pcb = DRA752_GRADIENT_CONST_W_PCB,
                },
index 3ee34340edabca6de32e0e411735b56b20e0ce25..c6d217913dd1d89251b9a1a5f5bcc20724b555f6 100644 (file)
@@ -91,8 +91,6 @@ const struct ti_bandgap_data omap34xx_data = {
                .registers = &omap34xx_mpu_temp_sensor_registers,
                .ts_data = &omap34xx_mpu_temp_sensor_data,
                .domain = "cpu",
-               .slope = 0,
-               .constant = 20000,
                .slope_pcb = 0,
                .constant_pcb = 20000,
                .register_cooling = NULL,
@@ -164,8 +162,6 @@ const struct ti_bandgap_data omap36xx_data = {
                .registers = &omap36xx_mpu_temp_sensor_registers,
                .ts_data = &omap36xx_mpu_temp_sensor_data,
                .domain = "cpu",
-               .slope = 0,
-               .constant = 20000,
                .slope_pcb = 0,
                .constant_pcb = 20000,
                .register_cooling = NULL,
index d255d33da9eb328f358e3d40471a8ed2be355703..fd11133606038e40ffeb1d4c279496e3a327f5bd 100644 (file)
@@ -82,8 +82,6 @@ const struct ti_bandgap_data omap4430_data = {
                .registers = &omap4430_mpu_temp_sensor_registers,
                .ts_data = &omap4430_mpu_temp_sensor_data,
                .domain = "cpu",
-               .slope = OMAP_GRADIENT_SLOPE_4430,
-               .constant = OMAP_GRADIENT_CONST_4430,
                .slope_pcb = OMAP_GRADIENT_SLOPE_W_PCB_4430,
                .constant_pcb = OMAP_GRADIENT_CONST_W_PCB_4430,
                .register_cooling = ti_thermal_register_cpu_cooling,
@@ -222,8 +220,6 @@ const struct ti_bandgap_data omap4460_data = {
                .registers = &omap4460_mpu_temp_sensor_registers,
                .ts_data = &omap4460_mpu_temp_sensor_data,
                .domain = "cpu",
-               .slope = OMAP_GRADIENT_SLOPE_4460,
-               .constant = OMAP_GRADIENT_CONST_4460,
                .slope_pcb = OMAP_GRADIENT_SLOPE_W_PCB_4460,
                .constant_pcb = OMAP_GRADIENT_CONST_W_PCB_4460,
                .register_cooling = ti_thermal_register_cpu_cooling,
@@ -255,8 +251,6 @@ const struct ti_bandgap_data omap4470_data = {
                .registers = &omap4460_mpu_temp_sensor_registers,
                .ts_data = &omap4460_mpu_temp_sensor_data,
                .domain = "cpu",
-               .slope = OMAP_GRADIENT_SLOPE_4470,
-               .constant = OMAP_GRADIENT_CONST_4470,
                .slope_pcb = OMAP_GRADIENT_SLOPE_W_PCB_4470,
                .constant_pcb = OMAP_GRADIENT_CONST_W_PCB_4470,
                .register_cooling = ti_thermal_register_cpu_cooling,
index 79ff70c446ba195ef893125b377567ff4ac2e58b..cd9a304fb571ce7749aebad6d93606b4fce503de 100644 (file)
@@ -336,8 +336,6 @@ const struct ti_bandgap_data omap5430_data = {
                .domain = "cpu",
                .register_cooling = ti_thermal_register_cpu_cooling,
                .unregister_cooling = ti_thermal_unregister_cpu_cooling,
-               .slope = OMAP_GRADIENT_SLOPE_5430_CPU,
-               .constant = OMAP_GRADIENT_CONST_5430_CPU,
                .slope_pcb = OMAP_GRADIENT_SLOPE_W_PCB_5430_CPU,
                .constant_pcb = OMAP_GRADIENT_CONST_W_PCB_5430_CPU,
                },
@@ -345,8 +343,6 @@ const struct ti_bandgap_data omap5430_data = {
                .registers = &omap5430_gpu_temp_sensor_registers,
                .ts_data = &omap5430_gpu_temp_sensor_data,
                .domain = "gpu",
-               .slope = OMAP_GRADIENT_SLOPE_5430_GPU,
-               .constant = OMAP_GRADIENT_CONST_5430_GPU,
                .slope_pcb = OMAP_GRADIENT_SLOPE_W_PCB_5430_GPU,
                .constant_pcb = OMAP_GRADIENT_CONST_W_PCB_5430_GPU,
                },
index fe0adb898764901b841d31b3696c5b5c15f15cac..209c664c28235a57aec27fd0d23dbf616b9641d8 100644 (file)
@@ -254,8 +254,6 @@ struct ti_bandgap {
  * @ts_data: pointer to struct with thresholds, limits of temperature sensor
  * @registers: pointer to the list of register offsets and bitfields
  * @domain: the name of the domain where the sensor is located
- * @slope: sensor gradient slope info for hotspot extrapolation equation
- * @constant: sensor gradient const info for hotspot extrapolation equation
  * @slope_pcb: sensor gradient slope info for hotspot extrapolation equation
  *             with no external influence
  * @constant_pcb: sensor gradient const info for hotspot extrapolation equation
@@ -274,8 +272,6 @@ struct ti_temp_sensor {
        struct temp_sensor_registers    *registers;
        char                            *domain;
        /* for hotspot extrapolation */
-       const int                       slope;
-       const int                       constant;
        const int                       slope_pcb;
        const int                       constant_pcb;
        int (*register_cooling)(struct ti_bandgap *bgp, int id);
index f8b7ffea6194f25662e5919463896ba936392861..8e85ca973967d9525f41b0747ebd0f4725d1b4dc 100644 (file)
 
 #include "ti-bandgap.h"
 
-/* sensors gradient and offsets */
-#define OMAP_GRADIENT_SLOPE_4430                               0
-#define OMAP_GRADIENT_CONST_4430                               20000
-#define OMAP_GRADIENT_SLOPE_4460                               348
-#define OMAP_GRADIENT_CONST_4460                               -9301
-#define OMAP_GRADIENT_SLOPE_4470                               308
-#define OMAP_GRADIENT_CONST_4470                               -7896
-
-#define OMAP_GRADIENT_SLOPE_5430_CPU                           65
-#define OMAP_GRADIENT_CONST_5430_CPU                           -1791
-#define OMAP_GRADIENT_SLOPE_5430_GPU                           117
-#define OMAP_GRADIENT_CONST_5430_GPU                           -2992
-
-#define DRA752_GRADIENT_SLOPE                                  0
-#define DRA752_GRADIENT_CONST                                  2000
-
 /* PCB sensor calculation constants */
 #define OMAP_GRADIENT_SLOPE_W_PCB_4430                         0
 #define OMAP_GRADIENT_CONST_W_PCB_4430                         20000