Lines Matching defs:cdev
45 struct thermal_cooling_device *cdev, int trip_index)
52 mutex_lock(&cdev->lock);
57 if (pos->tz == tz && pos->trip == trip && pos->cdev == cdev) {
63 mutex_unlock(&cdev->lock);
155 static void thermal_cdev_set_cur_state(struct thermal_cooling_device *cdev,
158 if (cdev->ops->set_cur_state(cdev, target))
161 thermal_notify_cdev_state_update(cdev->id, target);
162 thermal_cooling_device_stats_update(cdev, target);
165 void __thermal_cdev_update(struct thermal_cooling_device *cdev)
170 /* Make sure cdev enters the deepest cooling state */
171 list_for_each_entry(instance, &cdev->thermal_instances, cdev_node) {
172 dev_dbg(&cdev->device, "zone%d->target=%lu\n",
180 thermal_cdev_set_cur_state(cdev, target);
182 trace_cdev_update(cdev, target);
183 dev_dbg(&cdev->device, "set to state %lu\n", target);
188 * @cdev: pointer to struct thermal_cooling_device
192 void thermal_cdev_update(struct thermal_cooling_device *cdev)
194 mutex_lock(&cdev->lock);
195 if (!cdev->updated) {
196 __thermal_cdev_update(cdev);
197 cdev->updated = true;
199 mutex_unlock(&cdev->lock);