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

Commit 45c98834 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ARM: dts: msm: Use thermal state macro to specify state for SDM845"

parents 60d593a3 543a0b12
Loading
Loading
Loading
Loading
+24 −8
Original line number Diff line number Diff line
@@ -748,19 +748,27 @@
		cooling-maps {
			vbat_cpu4 {
				trip = <&low_vbat>;
				cooling-device = <&CPU4 22 22>;
				cooling-device =
					<&CPU4 THERMAL_MAX_LIMIT
						THERMAL_MAX_LIMIT>;
			};
			vbat_cpu5 {
				trip = <&low_vbat>;
				cooling-device = <&CPU5 22 22>;
				cooling-device =
					<&CPU5 THERMAL_MAX_LIMIT
						THERMAL_MAX_LIMIT>;
			};
			vbat_map6 {
				trip = <&low_vbat>;
				cooling-device = <&CPU6 22 22>;
				cooling-device =
					<&CPU6 THERMAL_MAX_LIMIT
						THERMAL_MAX_LIMIT>;
			};
			vbat_map7 {
				trip = <&low_vbat>;
				cooling-device = <&CPU7 22 22>;
				cooling-device =
					<&CPU7 THERMAL_MAX_LIMIT
						THERMAL_MAX_LIMIT>;
			};
		};
	};
@@ -811,19 +819,27 @@
		cooling-maps {
			soc_cpu4 {
				trip = <&low_soc>;
				cooling-device = <&CPU4 22 22>;
				cooling-device =
					<&CPU4 THERMAL_MAX_LIMIT
						THERMAL_MAX_LIMIT>;
			};
			soc_cpu5 {
				trip = <&low_soc>;
				cooling-device = <&CPU5 22 22>;
				cooling-device =
					<&CPU5 THERMAL_MAX_LIMIT
						THERMAL_MAX_LIMIT>;
			};
			soc_map6 {
				trip = <&low_soc>;
				cooling-device = <&CPU6 22 22>;
				cooling-device =
					<&CPU6 THERMAL_MAX_LIMIT
						THERMAL_MAX_LIMIT>;
			};
			soc_map7 {
				trip = <&low_soc>;
				cooling-device = <&CPU7 22 22>;
				cooling-device =
					<&CPU7 THERMAL_MAX_LIMIT
						THERMAL_MAX_LIMIT>;
			};
		};
	};
+77 −11
Original line number Diff line number Diff line
@@ -3306,10 +3306,29 @@
				};
			};
			cooling-maps {
				pop_cdev {
				pop_cdev4 {
					trip = <&pop_trip>;
					cooling-device =
						<&CPU4 1 THERMAL_NO_LIMIT>;
						<&CPU4 THERMAL_NO_LIMIT
							(THERMAL_MAX_LIMIT-1)>;
				};
				pop_cdev5 {
					trip = <&pop_trip>;
					cooling-device =
						<&CPU5 THERMAL_NO_LIMIT
							(THERMAL_MAX_LIMIT-1)>;
				};
				pop_cdev6 {
					trip = <&pop_trip>;
					cooling-device =
						<&CPU6 THERMAL_NO_LIMIT
							(THERMAL_MAX_LIMIT-1)>;
				};
				pop_cdev7 {
					trip = <&pop_trip>;
					cooling-device =
						<&CPU7 THERMAL_NO_LIMIT
							(THERMAL_MAX_LIMIT-1)>;
				};
			};
		};
@@ -4225,39 +4244,86 @@
	cooling-maps {
		trip0_cpu0 {
			trip = <&pm8998_trip0>;
			cooling-device = <&CPU0 21 21>;
			cooling-device =
				<&CPU0 (THERMAL_MAX_LIMIT-1)
					(THERMAL_MAX_LIMIT-1)>;
		};
		trip0_cpu1 {
			trip = <&pm8998_trip0>;
			cooling-device =
				<&CPU1 (THERMAL_MAX_LIMIT-1)
					(THERMAL_MAX_LIMIT-1)>;
		};
		trip0_cpu2 {
			trip = <&pm8998_trip0>;
			cooling-device =
				<&CPU2 (THERMAL_MAX_LIMIT-1)
					(THERMAL_MAX_LIMIT-1)>;
		};
		trip0_cpu3 {
			trip = <&pm8998_trip0>;
			cooling-device =
				<&CPU3 (THERMAL_MAX_LIMIT-1)
					(THERMAL_MAX_LIMIT-1)>;
		};
		trip0_cpu4 {
			trip = <&pm8998_trip0>;
			cooling-device = <&CPU4 21 21>;
			cooling-device =
				<&CPU4 (THERMAL_MAX_LIMIT-1)
					(THERMAL_MAX_LIMIT-1)>;
		};
		trip0_cpu5 {
			trip = <&pm8998_trip0>;
			cooling-device =
				<&CPU5 (THERMAL_MAX_LIMIT-1)
					(THERMAL_MAX_LIMIT-1)>;
		};
		trip0_cpu6 {
			trip = <&pm8998_trip0>;
			cooling-device =
				<&CPU6 (THERMAL_MAX_LIMIT-1)
					(THERMAL_MAX_LIMIT-1)>;
		};
		trip0_cpu7 {
			trip = <&pm8998_trip0>;
			cooling-device =
				<&CPU7 (THERMAL_MAX_LIMIT-1)
					(THERMAL_MAX_LIMIT-1)>;
		};
		trip1_cpu1 {
			trip = <&pm8998_trip1>;
			cooling-device = <&CPU1 22 22>;
			cooling-device =
				<&CPU1 THERMAL_MAX_LIMIT THERMAL_MAX_LIMIT>;
		};
		trip1_cpu2 {
			trip = <&pm8998_trip1>;
			cooling-device = <&CPU2 22 22>;
			cooling-device =
				<&CPU2 THERMAL_MAX_LIMIT THERMAL_MAX_LIMIT>;
		};
		trip1_cpu3 {
			trip = <&pm8998_trip1>;
			cooling-device = <&CPU3 22 22>;
			cooling-device =
				<&CPU3 THERMAL_MAX_LIMIT THERMAL_MAX_LIMIT>;
		};
		trip1_cpu4 {
			trip = <&pm8998_trip1>;
			cooling-device = <&CPU4 22 22>;
			cooling-device =
				<&CPU4 THERMAL_MAX_LIMIT THERMAL_MAX_LIMIT>;
		};
		trip1_cpu5 {
			trip = <&pm8998_trip1>;
			cooling-device = <&CPU5 22 22>;
			cooling-device =
				<&CPU5 THERMAL_MAX_LIMIT THERMAL_MAX_LIMIT>;
		};
		trip1_cpu6 {
			trip = <&pm8998_trip1>;
			cooling-device = <&CPU6 22 22>;
			cooling-device =
				<&CPU6 THERMAL_MAX_LIMIT THERMAL_MAX_LIMIT>;
		};
		trip1_cpu7 {
			trip = <&pm8998_trip1>;
			cooling-device = <&CPU7 22 22>;
			cooling-device =
				<&CPU7 THERMAL_MAX_LIMIT THERMAL_MAX_LIMIT>;
		};
	};
};
+20 −3
Original line number Diff line number Diff line
@@ -1424,9 +1424,26 @@ int thermal_zone_bind_cooling_device(struct thermal_zone_device *tz,
	if (ret)
		return ret;

	/* lower default 0, upper default max_state */
	lower = lower == THERMAL_NO_LIMIT ? 0 : lower;
	upper = upper == THERMAL_NO_LIMIT ? max_state : upper;
	/*
	 * If upper or lower has a MACRO to define the mitigation state,
	 * based on the MACRO determine the default state to use or the
	 * offset from the max_state.
	 */
	if (upper > (THERMAL_MAX_LIMIT - max_state)) {
		/* upper default max_state */
		if (upper == THERMAL_NO_LIMIT)
			upper = max_state;
		else
			upper = max_state - (THERMAL_MAX_LIMIT - upper);
	}

	if (lower > (THERMAL_MAX_LIMIT - max_state)) {
		/* lower default 0 */
		if (lower == THERMAL_NO_LIMIT)
			lower = 0;
		else
			lower =  max_state - (THERMAL_MAX_LIMIT - lower);
	}

	if (lower > upper || upper > max_state)
		return -EINVAL;
+1 −0
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@

/* On cooling devices upper and lower limits */
#define THERMAL_NO_LIMIT		(~0)
#define THERMAL_MAX_LIMIT		(THERMAL_NO_LIMIT - 1)

#endif
+3 −0
Original line number Diff line number Diff line
@@ -40,6 +40,9 @@
/* No upper/lower limit requirement */
#define THERMAL_NO_LIMIT	((u32)~0)

/* upper limit requirement */
#define THERMAL_MAX_LIMIT	(THERMAL_NO_LIMIT - 1)

/* Default weight of a bound cooling device */
#define THERMAL_WEIGHT_DEFAULT 0