Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0dac0c13 authored by Ram Chandrasekar's avatar Ram Chandrasekar
Browse files

drivers: thermal: Add low limits cap mitigation governor



The existing low limits floor mitigation governor can monitor
sensor reading going below a threshold and apply a floor mitigation.
But there are sensors like battery voltage and battery state of charge
that requires the low limits governor to place a frequency cap on CPU/GPU
cooling device, if the batter voltage or charge goes below a threshold.

Update the low limits governor to register a new governor
low_limits_cap, that will place a cap mitigation on a cooling device
when the sensor reading goes below a threshold.

Change-Id: I461b21d8978b2803c8cc489b207d06967af63e6c
Signed-off-by: default avatarRam Chandrasekar <rkumbako@codeaurora.org>
parent 6d44a344
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -176,6 +176,8 @@ Optional property:
			"power_allocator": Use power allocator governor.
			"low_limits_floor": Use low limits floor
						mitigation governor.
			"low_limits_cap": Use a low limits cap mitigation
						governor.
  Type: string

- sustainable-power:	An estimate of the sustainable power (in mW) that the
+7 −0
Original line number Diff line number Diff line
@@ -112,12 +112,19 @@ static struct thermal_governor thermal_gov_low_limits_floor = {
	.min_state_throttle = 1,
};

static struct thermal_governor thermal_gov_low_limits_cap = {
	.name		= "low_limits_cap",
	.throttle	= low_limits_throttle,
};

int thermal_gov_low_limits_register(void)
{
	thermal_register_governor(&thermal_gov_low_limits_cap);
	return thermal_register_governor(&thermal_gov_low_limits_floor);
}

void thermal_gov_low_limits_unregister(void)
{
	thermal_unregister_governor(&thermal_gov_low_limits_cap);
	thermal_unregister_governor(&thermal_gov_low_limits_floor);
}