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

Commit d56c9587 authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ARM: dts: msm: Update voltage restriction sensor for sm8150"

parents e9d3e53e 87fbdbbb
Loading
Loading
Loading
Loading
+0 −62
Original line number Original line Diff line number Diff line
@@ -493,68 +493,6 @@
		};
		};
	};
	};


	cpu-1-4-lowf {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-sensors = <&tsens0 11>;
		thermal-governor = "low_limits_floor";
		tracks-low;
		trips {
			cpu14_trip: cpu14-trip {
				temperature = <5000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
		cooling-maps {
			cpu0_cdev {
				trip = <&cpu14_trip>;
				cooling-device = <&CPU0 1 1>;
			};
			cpu1_cdev {
				trip = <&cpu14_trip>;
				cooling-device = <&CPU4 5 5>;
			};
			cx_vdd_cdev {
				trip = <&cpu14_trip>;
				cooling-device = <&cx_cdev 0 0>;
			};
			mx_vdd_cdev {
				trip = <&cpu14_trip>;
				cooling-device = <&mx_cdev 0 0>;
			};
			ebi_vdd_cdev {
				trip = <&cpu14_trip>;
				cooling-device = <&ebi_cdev 0 0>;
			};
			mmcx_vdd_cdev {
				trip = <&cpu14_trip>;
				cooling-device = <&mm_cx_cdev 0 0>;
			};
			modem_vdd_cdev {
				trip = <&cpu14_trip>;
				cooling-device = <&modem0_vdd 0 0>;
			};
			adsp_vdd_cdev {
				trip = <&cpu14_trip>;
				cooling-device = <&adsp_vdd 0 0>;
			};
			cdsp_vdd_cdev {
				trip = <&cpu14_trip>;
				cooling-device = <&cdsp_vdd 0 0>;
			};
			slpi_vdd_cdev {
				trip = <&cpu14_trip>;
				cooling-device = <&slpi_vdd 0 0>;
			};
			gpu_vdd_cdev {
				trip = <&cpu14_trip>;
				cooling-device = <&msm_gpu (THERMAL_MAX_LIMIT-2)
							(THERMAL_MAX_LIMIT-2)>;
			};
		};
	};

	cpu-1-7-lowf {
	cpu-1-7-lowf {
		polling-delay-passive = <0>;
		polling-delay-passive = <0>;
		polling-delay = <0>;
		polling-delay = <0>;
+32 −7
Original line number Original line Diff line number Diff line
@@ -578,12 +578,8 @@ int of_thermal_aggregate_trip(struct thermal_zone_device *tz,
}
}
EXPORT_SYMBOL(of_thermal_aggregate_trip);
EXPORT_SYMBOL(of_thermal_aggregate_trip);


/*
static void handle_thermal_trip(struct thermal_zone_device *tz,
 * of_thermal_handle_trip - Handle thermal trip from sensors
		bool temp_valid, int trip_temp)
 *
 * @tz: pointer to the primary thermal zone.
 */
void of_thermal_handle_trip(struct thermal_zone_device *tz)
{
{
	struct thermal_zone_device *zone;
	struct thermal_zone_device *zone;
	struct __thermal_zone *data = tz->devdata;
	struct __thermal_zone *data = tz->devdata;
@@ -594,8 +590,37 @@ void of_thermal_handle_trip(struct thermal_zone_device *tz)
		zone = data->tzd;
		zone = data->tzd;
		if (data->mode == THERMAL_DEVICE_DISABLED)
		if (data->mode == THERMAL_DEVICE_DISABLED)
			continue;
			continue;
		thermal_zone_device_update(zone, THERMAL_EVENT_UNSPECIFIED);
		if (!temp_valid) {
			thermal_zone_device_update(zone,
				THERMAL_EVENT_UNSPECIFIED);
		} else {
			thermal_zone_device_update_temp(zone,
				THERMAL_EVENT_UNSPECIFIED, trip_temp);
		}
	}
}

/*
 * of_thermal_handle_trip_temp - Handle thermal trip from sensors
 *
 * @tz: pointer to the primary thermal zone.
 * @trip_temp: The temperature
 */
void of_thermal_handle_trip_temp(struct thermal_zone_device *tz,
		int trip_temp)
{
	return handle_thermal_trip(tz, true, trip_temp);
}
}
EXPORT_SYMBOL(of_thermal_handle_trip_temp);

/*
 * of_thermal_handle_trip - Handle thermal trip from sensors
 *
 * @tz: pointer to the primary thermal zone.
 */
void of_thermal_handle_trip(struct thermal_zone_device *tz)
{
	return handle_thermal_trip(tz, false, 0);
}
}
EXPORT_SYMBOL(of_thermal_handle_trip);
EXPORT_SYMBOL(of_thermal_handle_trip);


+36 −12
Original line number Original line Diff line number Diff line
@@ -441,19 +441,8 @@ static void handle_thermal_trip(struct thermal_zone_device *tz, int trip)
	trace_thermal_handle_trip(tz, trip);
	trace_thermal_handle_trip(tz, trip);
}
}


static void update_temperature(struct thermal_zone_device *tz)
static void store_temperature(struct thermal_zone_device *tz, int temp)
{
{
	int temp, ret;

	ret = thermal_zone_get_temp(tz, &temp);
	if (ret) {
		if (ret != -EAGAIN)
			dev_warn(&tz->device,
				 "failed to read out thermal zone (%d)\n",
				 ret);
		return;
	}

	mutex_lock(&tz->lock);
	mutex_lock(&tz->lock);
	tz->last_temperature = tz->temperature;
	tz->last_temperature = tz->temperature;
	tz->temperature = temp;
	tz->temperature = temp;
@@ -469,6 +458,21 @@ static void update_temperature(struct thermal_zone_device *tz)
			tz->last_temperature, tz->temperature);
			tz->last_temperature, tz->temperature);
}
}


static void update_temperature(struct thermal_zone_device *tz)
{
	int temp, ret;

	ret = thermal_zone_get_temp(tz, &temp);
	if (ret) {
		if (ret != -EAGAIN)
			dev_warn(&tz->device,
				 "failed to read out thermal zone (%d)\n",
				 ret);
		return;
	}
	store_temperature(tz, temp);
}

static void thermal_zone_device_reset(struct thermal_zone_device *tz)
static void thermal_zone_device_reset(struct thermal_zone_device *tz)
{
{
	struct thermal_instance *pos;
	struct thermal_instance *pos;
@@ -479,6 +483,26 @@ static void thermal_zone_device_reset(struct thermal_zone_device *tz)
		pos->initialized = false;
		pos->initialized = false;
}
}


void thermal_zone_device_update_temp(struct thermal_zone_device *tz,
				enum thermal_notify_event event, int temp)
{
	int count;

	if (atomic_read(&in_suspend))
		return;

	trace_thermal_device_update(tz, event);
	store_temperature(tz, temp);

	thermal_zone_set_trips(tz);

	tz->notify_event = event;

	for (count = 0; count < tz->trips; count++)
		handle_thermal_trip(tz, count);
}
EXPORT_SYMBOL(thermal_zone_device_update_temp);

void thermal_zone_device_update(struct thermal_zone_device *tz,
void thermal_zone_device_update(struct thermal_zone_device *tz,
				enum thermal_notify_event event)
				enum thermal_notify_event event)
{
{
+6 −0
Original line number Original line Diff line number Diff line
@@ -164,6 +164,8 @@ int of_thermal_aggregate_trip(struct thermal_zone_device *tz,
			      enum thermal_trip_type type,
			      enum thermal_trip_type type,
			      int *low, int *high);
			      int *low, int *high);
void of_thermal_handle_trip(struct thermal_zone_device *tz);
void of_thermal_handle_trip(struct thermal_zone_device *tz);
void of_thermal_handle_trip_temp(struct thermal_zone_device *tz,
					int trip_temp);
#else
#else
static inline int of_parse_thermal_zones(void) { return 0; }
static inline int of_parse_thermal_zones(void) { return 0; }
static inline void of_thermal_destroy_zones(void) { }
static inline void of_thermal_destroy_zones(void) { }
@@ -190,6 +192,10 @@ static inline int of_thermal_aggregate_trip(struct thermal_zone_device *tz,
static inline
static inline
void of_thermal_handle_trip(struct thermal_zone_device *tz)
void of_thermal_handle_trip(struct thermal_zone_device *tz)
{ }
{ }
static inline
void of_thermal_handle_trip_temp(struct thermal_zone_device *tz,
					int trip_temp)
{ }
#endif
#endif


#endif /* __THERMAL_CORE_H__ */
#endif /* __THERMAL_CORE_H__ */
+1 −1
Original line number Original line Diff line number Diff line
@@ -501,7 +501,7 @@ static irqreturn_t tsens_tm_irq_thread(int irq, void *data)
			/* Use id for multiple controllers */
			/* Use id for multiple controllers */
			pr_debug("sensor:%d trigger temp (%d degC)\n",
			pr_debug("sensor:%d trigger temp (%d degC)\n",
				tm->sensor[i].hw_id, temp);
				tm->sensor[i].hw_id, temp);
			of_thermal_handle_trip(tm->sensor[i].tzd);
			of_thermal_handle_trip_temp(tm->sensor[i].tzd, temp);
		}
		}
	}
	}


Loading