Lines Matching full:trip

88 		&td->trip;						\
95 struct thermal_trip *trip = thermal_trip_of_attr(attr, type); in trip_point_type_show() local
97 return sprintf(buf, "%s\n", thermal_trip_type_name(trip->type)); in trip_point_type_show()
104 struct thermal_trip *trip = thermal_trip_of_attr(attr, temp); in trip_point_temp_store() local
113 if (temp == trip->temperature) in trip_point_temp_store()
118 temp <= trip->hysteresis + THERMAL_TEMP_INVALID) in trip_point_temp_store()
124 ret = tz->ops.set_trip_temp(tz, trip, temp); in trip_point_temp_store()
129 thermal_zone_set_trip_temp(tz, trip, temp); in trip_point_temp_store()
140 struct thermal_trip *trip = thermal_trip_of_attr(attr, temp); in trip_point_temp_show() local
142 return sprintf(buf, "%d\n", READ_ONCE(trip->temperature)); in trip_point_temp_show()
149 struct thermal_trip *trip = thermal_trip_of_attr(attr, hyst); in trip_point_hyst_store() local
158 if (hyst == trip->hysteresis) in trip_point_hyst_store()
167 if (trip->temperature == THERMAL_TEMP_INVALID) { in trip_point_hyst_store()
168 WRITE_ONCE(trip->hysteresis, hyst); in trip_point_hyst_store()
172 if (trip->temperature - hyst <= THERMAL_TEMP_INVALID) in trip_point_hyst_store()
175 thermal_zone_set_trip_hyst(tz, trip, hyst); in trip_point_hyst_store()
186 struct thermal_trip *trip = thermal_trip_of_attr(attr, hyst); in trip_point_hyst_show() local
188 return sprintf(buf, "%d\n", READ_ONCE(trip->hysteresis)); in trip_point_hyst_show()
378 * create_trip_attrs() - create attributes for trip points
381 * helper function to instantiate sysfs entries for every trip
400 /* create trip type attribute */ in create_trip_attrs()
410 /* create trip temp attribute */ in create_trip_attrs()
418 if (td->trip.flags & THERMAL_TRIP_FLAG_RW_TEMP) { in create_trip_attrs()
431 if (td->trip.flags & THERMAL_TRIP_FLAG_RW_HYST) { in create_trip_attrs()
446 * destroy_trip_attrs() - destroy attributes for trip points
846 return sprintf(buf, "%d\n", thermal_zone_trip_id(tz, instance->trip)); in trip_point_show()