Lines Matching full:instance
28 * equals lower limit, deactivate the thermal instance
30 static unsigned long get_target_state(struct thermal_instance *instance, in get_target_state() argument
33 struct thermal_cooling_device *cdev = instance->cdev; in get_target_state()
37 * We keep this instance the way it is by default. in get_target_state()
44 if (!instance->initialized) { in get_target_state()
46 return clamp(cur_state + 1, instance->lower, instance->upper); in get_target_state()
53 return clamp(cur_state + 1, instance->lower, instance->upper); in get_target_state()
55 if (cur_state <= instance->lower) in get_target_state()
60 * request the lower state for this instance. in get_target_state()
62 return instance->lower; in get_target_state()
65 return instance->target; in get_target_state()
75 struct thermal_instance *instance; in thermal_zone_trip_update() local
86 list_for_each_entry(instance, &td->thermal_instances, trip_node) { in thermal_zone_trip_update()
89 old_target = instance->target; in thermal_zone_trip_update()
90 instance->target = get_target_state(instance, trend, throttle); in thermal_zone_trip_update()
92 dev_dbg(&instance->cdev->device, "old_target=%d, target=%ld\n", in thermal_zone_trip_update()
93 old_target, instance->target); in thermal_zone_trip_update()
95 if (instance->initialized && old_target == instance->target) in thermal_zone_trip_update()
98 instance->initialized = true; in thermal_zone_trip_update()
100 scoped_guard(cooling_dev, instance->cdev) { in thermal_zone_trip_update()
101 instance->cdev->updated = false; /* cdev needs update */ in thermal_zone_trip_update()
109 struct thermal_instance *instance; in step_wise_manage() local
132 list_for_each_entry(instance, &td->thermal_instances, trip_node) in step_wise_manage()
133 thermal_cdev_update(instance->cdev); in step_wise_manage()