Lines Matching full:trip

91 		&td->trip;						\
98 struct thermal_trip *trip = thermal_trip_of_attr(attr, type); in trip_point_type_show() local
100 return sprintf(buf, "%s\n", thermal_trip_type_name(trip->type)); in trip_point_type_show()
107 struct thermal_trip *trip = thermal_trip_of_attr(attr, temp); in trip_point_temp_store() local
116 if (temp == trip->temperature) in trip_point_temp_store()
121 temp <= trip->hysteresis + THERMAL_TEMP_INVALID) in trip_point_temp_store()
127 ret = tz->ops.set_trip_temp(tz, trip, temp); in trip_point_temp_store()
132 thermal_zone_set_trip_temp(tz, trip, temp); in trip_point_temp_store()
143 struct thermal_trip *trip = thermal_trip_of_attr(attr, temp); in trip_point_temp_show() local
145 return sprintf(buf, "%d\n", READ_ONCE(trip->temperature)); in trip_point_temp_show()
152 struct thermal_trip *trip = thermal_trip_of_attr(attr, hyst); in trip_point_hyst_store() local
161 if (hyst == trip->hysteresis) in trip_point_hyst_store()
170 if (trip->temperature == THERMAL_TEMP_INVALID) { in trip_point_hyst_store()
171 WRITE_ONCE(trip->hysteresis, hyst); in trip_point_hyst_store()
175 if (trip->temperature - hyst <= THERMAL_TEMP_INVALID) in trip_point_hyst_store()
178 thermal_zone_set_trip_hyst(tz, trip, hyst); in trip_point_hyst_store()
189 struct thermal_trip *trip = thermal_trip_of_attr(attr, hyst); in trip_point_hyst_show() local
191 return sprintf(buf, "%d\n", READ_ONCE(trip->hysteresis)); in trip_point_hyst_show()
381 * create_trip_attrs() - create attributes for trip points
384 * helper function to instantiate sysfs entries for every trip
403 /* create trip type attribute */ in create_trip_attrs()
413 /* create trip temp attribute */ in create_trip_attrs()
421 if (td->trip.flags & THERMAL_TRIP_FLAG_RW_TEMP) { in create_trip_attrs()
434 if (td->trip.flags & THERMAL_TRIP_FLAG_RW_HYST) { in create_trip_attrs()
449 * destroy_trip_attrs() - destroy attributes for trip points
849 return sprintf(buf, "%d\n", thermal_zone_trip_id(tz, instance->trip)); in trip_point_show()