• Home
  • Raw
  • Download

Lines Matching full:instance

43  *       equals lower limit, deactivate the thermal instance
47 * deactivate the thermal instance
49 static unsigned long get_target_state(struct thermal_instance *instance, in get_target_state() argument
52 struct thermal_cooling_device *cdev = instance->cdev; in get_target_state()
57 * We keep this instance the way it is by default. in get_target_state()
62 next_target = instance->target; in get_target_state()
65 if (!instance->initialized) { in get_target_state()
67 next_target = (cur_state + 1) >= instance->upper ? in get_target_state()
68 instance->upper : in get_target_state()
69 ((cur_state + 1) < instance->lower ? in get_target_state()
70 instance->lower : (cur_state + 1)); in get_target_state()
81 next_target = cur_state < instance->upper ? in get_target_state()
82 (cur_state + 1) : instance->upper; in get_target_state()
83 if (next_target < instance->lower) in get_target_state()
84 next_target = instance->lower; in get_target_state()
89 next_target = instance->upper; in get_target_state()
92 if (cur_state <= instance->lower) { in get_target_state()
98 if (next_target > instance->upper) in get_target_state()
99 next_target = instance->upper; in get_target_state()
104 if (cur_state == instance->lower) { in get_target_state()
108 next_target = instance->lower; in get_target_state()
121 * If value is +1, activate a passive instance. in update_passive_instance()
122 * If value is -1, deactivate a passive instance. in update_passive_instance()
133 struct thermal_instance *instance; in thermal_zone_trip_update() local
157 list_for_each_entry(instance, &tz->thermal_instances, tz_node) { in thermal_zone_trip_update()
158 if (instance->trip != trip) in thermal_zone_trip_update()
161 old_target = instance->target; in thermal_zone_trip_update()
162 instance->target = get_target_state(instance, trend, throttle); in thermal_zone_trip_update()
163 dev_dbg(&instance->cdev->device, "old_target=%d, target=%d\n", in thermal_zone_trip_update()
164 old_target, (int)instance->target); in thermal_zone_trip_update()
166 if (instance->initialized && old_target == instance->target) in thermal_zone_trip_update()
169 /* Activate a passive thermal instance */ in thermal_zone_trip_update()
171 instance->target != THERMAL_NO_TARGET) in thermal_zone_trip_update()
173 /* Deactivate a passive thermal instance */ in thermal_zone_trip_update()
175 instance->target == THERMAL_NO_TARGET) in thermal_zone_trip_update()
178 instance->initialized = true; in thermal_zone_trip_update()
179 mutex_lock(&instance->cdev->lock); in thermal_zone_trip_update()
180 instance->cdev->updated = false; /* cdev needs update */ in thermal_zone_trip_update()
181 mutex_unlock(&instance->cdev->lock); in thermal_zone_trip_update()
200 struct thermal_instance *instance; in step_wise_throttle() local
209 list_for_each_entry(instance, &tz->thermal_instances, tz_node) in step_wise_throttle()
210 thermal_cdev_update(instance->cdev); in step_wise_throttle()