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

Commit 727563f0 authored by Siddartha Mohanadoss's avatar Siddartha Mohanadoss
Browse files

thermal: tsens: Remove registering for Critical trip zone



The handle_critical_trips() api in thermal_core gets
invoked during the system resume path on 4.4 kernel.
If a thermal driver has registered for the critical trip
zone the handle_critical_trips() reads the current temperature
and checks against the critical threshold. If the
temperature value is greater than the critical threshold
the device is shutdown.

Remove registering the critical trip zone since its not
used by thermal sys clients. The driver will continue
to use it internally to set thresholds and monitor
the state of the TSENS (temperature sensor) controller.

Change-Id: Ie2024498224f078de77dd006d77cdfa99bb90eee
Signed-off-by: default avatarSiddartha Mohanadoss <smohanad@codeaurora.org>
parent 8c5c49fd
Loading
Loading
Loading
Loading
+4 −7
Original line number Diff line number Diff line
@@ -759,9 +759,9 @@ enum tsens_trip_type {
};

enum tsens_tm_trip_type {
	TSENS_TM_TRIP_CRITICAL = 0,
	TSENS_TM_TRIP_WARM,
	TSENS_TM_TRIP_WARM = 0,
	TSENS_TM_TRIP_COOL,
	TSENS_TM_TRIP_CRITICAL,
	TSENS_TM_TRIP_NUM,
};

@@ -1575,9 +1575,6 @@ static int tsens_tm_get_trip_type(struct thermal_zone_device *thermal,
	case TSENS_TM_TRIP_COOL:
		*type = THERMAL_TRIP_CONFIGURABLE_LOW;
		break;
	case TSENS_TM_TRIP_CRITICAL:
		*type = THERMAL_TRIP_CRITICAL;
		break;
	default:
		return -EINVAL;
	}
@@ -5717,8 +5714,8 @@ static int tsens_thermal_zone_register(struct tsens_tm_device *tmdev)
		tmdev->sensor[i].tm = tmdev;
		if (tmdev->tsens_type == TSENS_TYPE3) {
			tmdev->sensor[i].tz_dev = thermal_zone_device_register(
					name, TSENS_TM_TRIP_NUM,
					TSENS_TM_WRITABLE_TRIPS_MASK,
					name, TSENS_TRIP_NUM,
					TSENS_WRITABLE_TRIPS_MASK,
					&tmdev->sensor[i],
					&tsens_tm_thermal_zone_ops, NULL, 0, 0);
			if (IS_ERR(tmdev->sensor[i].tz_dev)) {