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