ARM: tegra: thermal: Re-factor trip-points APIs
Alex Frid [Wed, 11 Dec 2013 06:29:34 +0000 (22:29 -0800)]
Re-named, and re-arranged trip-points installation interfaces, so that
interface name reflects module/parameter subject to thermal control,
instead of designated thermal zone (the latter may change on different
platforms creating a confusion with old names).

Change-Id: Ie3714d14103b85720598cf9da44e0abf51326ac5
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/344606
Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
Tested-by: Diwakar Tundlam <dtundlam@nvidia.com>

17 files changed:
arch/arm/mach-tegra/board-ardbeg-power.c
arch/arm/mach-tegra/board-ardbeg-sensors.c
arch/arm/mach-tegra/board-common.c
arch/arm/mach-tegra/board-common.h
arch/arm/mach-tegra/board-dalmore-power.c
arch/arm/mach-tegra/board-dalmore-sensors.c
arch/arm/mach-tegra/board-laguna-power.c
arch/arm/mach-tegra/board-loki-power.c
arch/arm/mach-tegra/board-macallan-power.c
arch/arm/mach-tegra/board-macallan-sensors.c
arch/arm/mach-tegra/board-norrin-power.c
arch/arm/mach-tegra/board-pismo-power.c
arch/arm/mach-tegra/board-pismo-sensors.c
arch/arm/mach-tegra/board-pluto-power.c
arch/arm/mach-tegra/board-pluto-sensors.c
arch/arm/mach-tegra/board-roth-sensors.c
arch/arm/mach-tegra/board-vcm30_t124-power.c

index 1bd04ef..61047ec 100644 (file)
@@ -1428,7 +1428,10 @@ int __init ardbeg_soctherm_init(void)
                        ardbeg_soctherm_data.therm[THERM_GPU].trips,
                        &ardbeg_soctherm_data.therm[THERM_GPU].num_trips,
                        7000);
-               tegra_add_tj_trips(
+               tegra_add_cpu_vmax_trips(
+                       ardbeg_soctherm_data.therm[THERM_CPU].trips,
+                       &ardbeg_soctherm_data.therm[THERM_CPU].num_trips);
+               tegra_add_core_edp_trips(
                        ardbeg_soctherm_data.therm[THERM_CPU].trips,
                        &ardbeg_soctherm_data.therm[THERM_CPU].num_trips);
                tegra_add_tgpu_trips(
@@ -1437,7 +1440,7 @@ int __init ardbeg_soctherm_init(void)
                tegra_add_vc_trips(
                        ardbeg_soctherm_data.therm[THERM_CPU].trips,
                        &ardbeg_soctherm_data.therm[THERM_CPU].num_trips);
-               tegra_add_tpll_trips(
+               tegra_add_core_vmax_trips(
                        ardbeg_soctherm_data.therm[THERM_PLL].trips,
                        &ardbeg_soctherm_data.therm[THERM_PLL].num_trips);
        }
index 28f4c46..b2d9c3a 100644 (file)
@@ -1437,17 +1437,19 @@ static int ardbeg_nct72_init(void)
                tegra_platform_edp_init(ardbeg_nct72_pdata.trips,
                                        &ardbeg_nct72_pdata.num_trips,
                                        12000); /* edp temperature margin */
-               tegra_add_tj_trips(ardbeg_nct72_pdata.trips,
+               tegra_add_cpu_vmax_trips(ardbeg_nct72_pdata.trips,
+                               &ardbeg_nct72_pdata.num_trips);
+               tegra_add_core_edp_trips(ardbeg_nct72_pdata.trips,
                                &ardbeg_nct72_pdata.num_trips);
                tegra_add_tgpu_trips(ardbeg_nct72_pdata.trips,
                                     &ardbeg_nct72_pdata.num_trips);
                tegra_add_vc_trips(ardbeg_nct72_pdata.trips,
                                     &ardbeg_nct72_pdata.num_trips);
-               tegra_add_tpll_trips(ardbeg_nct72_pdata.trips,
+               tegra_add_core_vmax_trips(ardbeg_nct72_pdata.trips,
                                     &ardbeg_nct72_pdata.num_trips);
        }
 
-       tegra_add_cdev_trips(ardbeg_nct72_pdata.trips,
+       tegra_add_all_vmin_trips(ardbeg_nct72_pdata.trips,
                                &ardbeg_nct72_pdata.num_trips);
 
        ardbeg_i2c_nct72_board_info[0].irq = gpio_to_irq(nct72_port);
index 3c88b9d..c259533 100644 (file)
@@ -167,7 +167,7 @@ static void tegra_add_trip_points(struct thermal_trip_info *trips,
        }
 }
 
-void tegra_add_cdev_trips(struct thermal_trip_info *trips, int *num_trips)
+void tegra_add_all_vmin_trips(struct thermal_trip_info *trips, int *num_trips)
 {
        tegra_add_trip_points(trips, num_trips, tegra_dvfs_get_cpu_vmin_cdev());
        tegra_add_trip_points(trips, num_trips,
@@ -193,9 +193,13 @@ void tegra_add_core_vmin_trips(struct thermal_trip_info *trips, int *num_trips)
                                        tegra_dvfs_get_core_vmin_cdev());
 }
 
-void tegra_add_tj_trips(struct thermal_trip_info *trips, int *num_trips)
+void tegra_add_cpu_vmax_trips(struct thermal_trip_info *trips, int *num_trips)
 {
        tegra_add_trip_points(trips, num_trips, tegra_dvfs_get_cpu_vmax_cdev());
+}
+
+void tegra_add_core_edp_trips(struct thermal_trip_info *trips, int *num_trips)
+{
        tegra_add_trip_points(trips, num_trips, tegra_core_edp_get_cdev());
 }
 
@@ -208,7 +212,7 @@ void tegra_add_vc_trips(struct thermal_trip_info *trips, int *num_trips)
 {
        tegra_add_trip_points(trips, num_trips, tegra_vc_get_cdev());
 }
-void tegra_add_tpll_trips(struct thermal_trip_info *trips, int *num_trips)
+void tegra_add_core_vmax_trips(struct thermal_trip_info *trips, int *num_trips)
 {
        tegra_add_trip_points(trips, num_trips,
                              tegra_dvfs_get_core_vmax_cdev());
index a46164c..682644c 100644 (file)
 extern struct platform_device *uart_console_debug_device;
 int  uart_console_debug_init(int defaul_debug_port);
 int tegra_vibrator_init(void);
-void tegra_add_cdev_trips(struct thermal_trip_info *trips, int *num_trips);
+void tegra_add_all_vmin_trips(struct thermal_trip_info *trips, int *num_trips);
 void tegra_add_cpu_vmin_trips(struct thermal_trip_info *trips, int *num_trips);
 void tegra_add_gpu_vmin_trips(struct thermal_trip_info *trips, int *num_trips);
 void tegra_add_core_vmin_trips(struct thermal_trip_info *trips, int *num_trips);
-void tegra_add_tj_trips(struct thermal_trip_info *trips, int *num_trips);
+void tegra_add_cpu_vmax_trips(struct thermal_trip_info *trips, int *num_trips);
+void tegra_add_core_edp_trips(struct thermal_trip_info *trips, int *num_trips);
 void tegra_add_tgpu_trips(struct thermal_trip_info *trips, int *num_trips);
 void tegra_add_vc_trips(struct thermal_trip_info *trips, int *num_trips);
-void tegra_add_tpll_trips(struct thermal_trip_info *trips, int *num_trips);
+void tegra_add_core_vmax_trips(struct thermal_trip_info *trips, int *num_trips);
 
 #endif
index b7eb6d3..3dad0e8 100644 (file)
@@ -1445,7 +1445,9 @@ int __init dalmore_soctherm_init(void)
        tegra_platform_edp_init(dalmore_soctherm_data.therm[THERM_CPU].trips,
                        &dalmore_soctherm_data.therm[THERM_CPU].num_trips,
                        6000); /* edp temperature margin */
-       tegra_add_tj_trips(dalmore_soctherm_data.therm[THERM_CPU].trips,
+       tegra_add_cpu_vmax_trips(dalmore_soctherm_data.therm[THERM_CPU].trips,
+                       &dalmore_soctherm_data.therm[THERM_CPU].num_trips);
+       tegra_add_core_edp_trips(dalmore_soctherm_data.therm[THERM_CPU].trips,
                        &dalmore_soctherm_data.therm[THERM_CPU].num_trips);
 
        return tegra11_soctherm_init(&dalmore_soctherm_data);
index bc99153..581524f 100644 (file)
@@ -647,7 +647,7 @@ static int dalmore_nct1008_init(void)
                        board_info.board_id);
        }
 
-       tegra_add_cdev_trips(dalmore_nct1008_pdata.trips,
+       tegra_add_all_vmin_trips(dalmore_nct1008_pdata.trips,
                                &dalmore_nct1008_pdata.num_trips);
 
        dalmore_i2c4_nct1008_board_info[0].irq = gpio_to_irq(nct1008_port);
index b550479..b9b9ff0 100644 (file)
@@ -998,13 +998,15 @@ int __init laguna_soctherm_init(void)
                        laguna_soctherm_data.therm[THERM_GPU].trips,
                        &laguna_soctherm_data.therm[THERM_GPU].num_trips,
                        7000);
-       tegra_add_tj_trips(laguna_soctherm_data.therm[THERM_CPU].trips,
+       tegra_add_cpu_vmax_trips(laguna_soctherm_data.therm[THERM_CPU].trips,
+                       &laguna_soctherm_data.therm[THERM_CPU].num_trips);
+       tegra_add_core_edp_trips(laguna_soctherm_data.therm[THERM_CPU].trips,
                        &laguna_soctherm_data.therm[THERM_CPU].num_trips);
        tegra_add_tgpu_trips(laguna_soctherm_data.therm[THERM_GPU].trips,
                        &laguna_soctherm_data.therm[THERM_GPU].num_trips);
        tegra_add_vc_trips(laguna_soctherm_data.therm[THERM_CPU].trips,
                        &laguna_soctherm_data.therm[THERM_CPU].num_trips);
-       tegra_add_tpll_trips(laguna_soctherm_data.therm[THERM_PLL].trips,
+       tegra_add_core_vmax_trips(laguna_soctherm_data.therm[THERM_PLL].trips,
                        &laguna_soctherm_data.therm[THERM_PLL].num_trips);
 
        return tegra11_soctherm_init(&laguna_soctherm_data);
index bf3f0f0..578ba46 100644 (file)
@@ -1007,7 +1007,10 @@ int __init loki_soctherm_init(void)
                        loki_soctherm_data.therm[THERM_GPU].trips,
                        &loki_soctherm_data.therm[THERM_GPU].num_trips,
                        8000);
-               tegra_add_tj_trips(
+               tegra_add_cpu_vmax_trips(
+                       loki_soctherm_data.therm[THERM_CPU].trips,
+                       &loki_soctherm_data.therm[THERM_CPU].num_trips);
+               tegra_add_core_edp_trips(
                        loki_soctherm_data.therm[THERM_CPU].trips,
                        &loki_soctherm_data.therm[THERM_CPU].num_trips);
                tegra_add_tgpu_trips(
@@ -1016,7 +1019,7 @@ int __init loki_soctherm_init(void)
                tegra_add_vc_trips(
                        loki_soctherm_data.therm[THERM_CPU].trips,
                        &loki_soctherm_data.therm[THERM_CPU].num_trips);
-               tegra_add_tpll_trips(
+               tegra_add_core_vmax_trips(
                        loki_soctherm_data.therm[THERM_PLL].trips,
                        &loki_soctherm_data.therm[THERM_PLL].num_trips);
                tegra_add_cpu_vmin_trips(
index ad3f44f..127e5ff 100644 (file)
@@ -880,13 +880,15 @@ int __init macallan_soctherm_init(void)
        struct board_info board_info;
        tegra_get_board_info(&board_info);
        if (board_info.board_id == BOARD_E1545)
-               tegra_add_cdev_trips(
+               tegra_add_all_vmin_trips(
                        macallan_soctherm_data.therm[THERM_CPU].trips,
                        &macallan_soctherm_data.therm[THERM_CPU].num_trips);
        tegra_platform_edp_init(macallan_soctherm_data.therm[THERM_CPU].trips,
                        &macallan_soctherm_data.therm[THERM_CPU].num_trips,
                        6000); /* edp temperature margin */
-       tegra_add_tj_trips(macallan_soctherm_data.therm[THERM_CPU].trips,
+       tegra_add_cpu_vmax_trips(macallan_soctherm_data.therm[THERM_CPU].trips,
+                       &macallan_soctherm_data.therm[THERM_CPU].num_trips);
+       tegra_add_core_edp_trips(macallan_soctherm_data.therm[THERM_CPU].trips,
                        &macallan_soctherm_data.therm[THERM_CPU].num_trips);
 
        return tegra11_soctherm_init(&macallan_soctherm_data);
index 4cf5fb4..c77af33 100644 (file)
@@ -639,7 +639,7 @@ static int macallan_nct1008_init(void)
 
        nct1008_port = TEGRA_GPIO_PO4;
 
-       tegra_add_cdev_trips(macallan_nct1008_pdata.trips,
+       tegra_add_all_vmin_trips(macallan_nct1008_pdata.trips,
                                &macallan_nct1008_pdata.num_trips);
 
        macallan_i2c4_nct1008_board_info[0].irq = gpio_to_irq(nct1008_port);
index 6563ae8..2aae4b2 100644 (file)
@@ -861,7 +861,9 @@ int __init norrin_soctherm_init(void)
                        norrin_soctherm_data.therm[THERM_GPU].trips,
                        &norrin_soctherm_data.therm[THERM_GPU].num_trips,
                        7000);
-       tegra_add_tj_trips(norrin_soctherm_data.therm[THERM_CPU].trips,
+       tegra_add_cpu_vmax_trips(norrin_soctherm_data.therm[THERM_CPU].trips,
+                       &norrin_soctherm_data.therm[THERM_CPU].num_trips);
+       tegra_add_core_edp_trips(norrin_soctherm_data.therm[THERM_CPU].trips,
                        &norrin_soctherm_data.therm[THERM_CPU].num_trips);
        tegra_add_tgpu_trips(norrin_soctherm_data.therm[THERM_GPU].trips,
                        &norrin_soctherm_data.therm[THERM_GPU].num_trips);
index f2c7387..a3d2df5 100644 (file)
@@ -910,7 +910,9 @@ int __init pismo_soctherm_init(void)
        tegra_platform_edp_init(pismo_soctherm_data.therm[THERM_CPU].trips,
                        &pismo_soctherm_data.therm[THERM_CPU].num_trips,
                        6000); /* edp temperature margin */
-       tegra_add_tj_trips(pismo_soctherm_data.therm[THERM_CPU].trips,
+       tegra_add_cpu_vmax_trips(pismo_soctherm_data.therm[THERM_CPU].trips,
+                       &pismo_soctherm_data.therm[THERM_CPU].num_trips);
+       tegra_add_core_edp_trips(pismo_soctherm_data.therm[THERM_CPU].trips,
                        &pismo_soctherm_data.therm[THERM_CPU].num_trips);
 
        return tegra11_soctherm_init(&pismo_soctherm_data);
index 9f6c298..b1bb555 100644 (file)
@@ -552,7 +552,7 @@ static int pismo_nct1008_init(void)
 
        nct1008_port = TEGRA_GPIO_PX6;
 
-       tegra_add_cdev_trips(pismo_nct1008_pdata.trips,
+       tegra_add_all_vmin_trips(pismo_nct1008_pdata.trips,
                                &pismo_nct1008_pdata.num_trips);
 
        pismo_i2c4_nct1008_board_info[0].irq =
index ee085dc..d008843 100644 (file)
@@ -942,7 +942,9 @@ int __init pluto_soctherm_init(void)
        tegra_platform_edp_init(pluto_soctherm_data.therm[THERM_CPU].trips,
                        &pluto_soctherm_data.therm[THERM_CPU].num_trips,
                        6000);  /* edp temperature margin */
-       tegra_add_tj_trips(pluto_soctherm_data.therm[THERM_CPU].trips,
+       tegra_add_cpu_vmax_trips(pluto_soctherm_data.therm[THERM_CPU].trips,
+                       &pluto_soctherm_data.therm[THERM_CPU].num_trips);
+       tegra_add_core_edp_trips(pluto_soctherm_data.therm[THERM_CPU].trips,
                        &pluto_soctherm_data.therm[THERM_CPU].num_trips);
 
        return tegra11_soctherm_init(&pluto_soctherm_data);
index ac0bfe7..b217885 100644 (file)
@@ -808,7 +808,7 @@ static int pluto_nct1008_init(void)
                        board_info.board_id);
        }
 
-       tegra_add_cdev_trips(pluto_nct1008_pdata.trips,
+       tegra_add_all_vmin_trips(pluto_nct1008_pdata.trips,
                                &pluto_nct1008_pdata.num_trips);
 
        pluto_i2c4_nct1008_board_info[0].irq =
index 30eef5e..d3c8ca4 100644 (file)
@@ -251,9 +251,11 @@ static int roth_nct1008_init(void)
        tegra_platform_edp_init(roth_nct1008_pdata.trips,
                                &roth_nct1008_pdata.num_trips,
                                0); /* edp temperature margin */
-       tegra_add_cdev_trips(roth_nct1008_pdata.trips,
+       tegra_add_all_vmin_trips(roth_nct1008_pdata.trips,
                                &roth_nct1008_pdata.num_trips);
-       tegra_add_tj_trips(roth_nct1008_pdata.trips,
+       tegra_add_cpu_vmax_trips(roth_nct1008_pdata.trips,
+                               &roth_nct1008_pdata.num_trips);
+       tegra_add_core_edp_trips(roth_nct1008_pdata.trips,
                                &roth_nct1008_pdata.num_trips);
 
        roth_i2c4_nct1008_board_info[0].irq = gpio_to_irq(nct1008_port);
index 1c71abc..b701bcd 100644 (file)
@@ -371,7 +371,9 @@ int __init vcm30_t124_soctherm_init(void)
        tegra_platform_edp_init(vcm30_t124_soctherm_data.therm[THERM_CPU].trips,
                        &vcm30_t124_soctherm_data.therm[THERM_CPU].num_trips,
                        8000); /* edp temperature margin */
-       tegra_add_tj_trips(vcm30_t124_soctherm_data.therm[THERM_CPU].trips,
+       tegra_add_cpu_vmax_trips(vcm30_t124_soctherm_data.therm[THERM_CPU].trips,
+                       &vcm30_t124_soctherm_data.therm[THERM_CPU].num_trips);
+       tegra_add_core_edp_trips(vcm30_t124_soctherm_data.therm[THERM_CPU].trips,
                        &vcm30_t124_soctherm_data.therm[THERM_CPU].num_trips);
        /*tegra_add_vc_trips(vcm30_t124_soctherm_data.therm[THERM_CPU].trips,
                        &vcm30_t124_soctherm_data.therm[THERM_CPU].num_trips);