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

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

Merge "drivers: of-thermal: Notify all sibling thermal zones on trip" into msm-4.9

parents d1341af3 cf54360e
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
@@ -492,6 +492,25 @@ int of_thermal_aggregate_trip(struct thermal_zone_device *tz,
}
EXPORT_SYMBOL(of_thermal_aggregate_trip);

/*
 * 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)
{
	struct thermal_zone_device *zone;
	struct __thermal_zone *data = tz->devdata;
	struct list_head *head;

	head = &data->senps->first_tz;
	for_each_tz_sibling(data, head) {
		zone = data->tzd;
		thermal_zone_device_update(zone, THERMAL_EVENT_UNSPECIFIED);
	}
}
EXPORT_SYMBOL(of_thermal_handle_trip);

static struct thermal_zone_device_ops of_thermal_ops = {
	.get_mode = of_thermal_get_mode,
	.set_mode = of_thermal_set_mode,
+1 −1
Original line number Diff line number Diff line
@@ -457,7 +457,7 @@ static void handle_critical_trips(struct thermal_zone_device *tz,
	}
}

static void handle_thermal_trip(struct thermal_zone_device *tz, int trip)
void handle_thermal_trip(struct thermal_zone_device *tz, int trip)
{
	enum thermal_trip_type type;

+5 −0
Original line number Diff line number Diff line
@@ -56,6 +56,7 @@ struct thermal_instance {

int thermal_register_governor(struct thermal_governor *);
void thermal_unregister_governor(struct thermal_governor *);
void handle_thermal_trip(struct thermal_zone_device *tz, int trip);

#ifdef CONFIG_THERMAL_GOV_STEP_WISE
int thermal_gov_step_wise_register(void);
@@ -108,6 +109,7 @@ of_thermal_get_trip_points(struct thermal_zone_device *);
int of_thermal_aggregate_trip(struct thermal_zone_device *tz,
			      enum thermal_trip_type type,
			      int *low, int *high);
void of_thermal_handle_trip(struct thermal_zone_device *tz);
#else
static inline int of_parse_thermal_zones(void) { return 0; }
static inline void of_thermal_destroy_zones(void) { }
@@ -131,6 +133,9 @@ static inline int of_thermal_aggregate_trip(struct thermal_zone_device *tz,
{
	return -ENODEV;
}
static inline
void of_thermal_handle_trip(struct thermal_zone_device *tz)
{ }
#endif

#endif /* __THERMAL_CORE_H__ */