Commits

JP Abgrall  committed af9c307

ARM: EXYNOS: Fix thermal throttle once tripping

Once TMU_STATUS_TRIPPED was reached, thermal_throttle() was not
being called.

Bug: 7958312
Change-Id: I93f7825dacc62867036dbf75d14f7aaf1007d699
Signed-off-by: JP Abgrall <jpa@google.com>

  • Participants
  • Parent commits cf02b75
  • Branches android-exynos-manta-3.4-jb-mr1.1, seandroid-exynos-manta-3.4-jb-mr1.1

Comments (0)

Files changed (1)

File arch/arm/mach-exynos/tmu-exynos.c

 		enable_irq(info->irq);
 		goto out;
 	case TMU_STATUS_THROTTLED:
+		if (cur_temp > data->ts.stop_throttle)
+			exynos_thermal_throttle();
 		if (cur_temp >= data->ts.start_tripping)
 			info->tmu_state = TMU_STATUS_TRIPPED;
-		else if (cur_temp > data->ts.stop_throttle)
-			exynos_thermal_throttle();
 		else
 			info->tmu_state = TMU_STATUS_NORMAL;
 		break;
 		if (cur_temp >= data->ts.start_emergency)
 			panic("Emergency thermal shutdown: temp=%d\n",
 			      cur_temp);
-		if (cur_temp >= data->ts.start_tripping)
+		if (cur_temp >= data->ts.start_tripping) {
 			pr_err("thermal tripped: temp=%d\n", cur_temp);
-		else
+			/* Throttle twice while tripping */
+			exynos_thermal_throttle();
+		} else {
 			info->tmu_state = TMU_STATUS_THROTTLED;
+		}
+		/* Throttle when tripped */
+		exynos_thermal_throttle();
 		break;
 	default:
 		break;