Lines Matching defs:cdev
46 struct thermal_cooling_device *cdev, int trip)
52 mutex_lock(&cdev->lock);
55 if (pos->tz == tz && pos->trip == trip && pos->cdev == cdev) {
61 mutex_unlock(&cdev->lock);
178 static void thermal_cdev_set_cur_state(struct thermal_cooling_device *cdev,
181 if (cdev->ops->set_cur_state(cdev, target))
184 thermal_notify_cdev_state_update(cdev->id, target);
185 thermal_cooling_device_stats_update(cdev, target);
188 void thermal_cdev_update(struct thermal_cooling_device *cdev)
193 mutex_lock(&cdev->lock);
195 if (cdev->updated) {
196 mutex_unlock(&cdev->lock);
200 /* Make sure cdev enters the deepest cooling state */
201 list_for_each_entry(instance, &cdev->thermal_instances, cdev_node) {
202 dev_dbg(&cdev->device, "zone%d->target=%lu\n",
210 thermal_cdev_set_cur_state(cdev, target);
212 cdev->updated = true;
213 mutex_unlock(&cdev->lock);
214 trace_cdev_update(cdev, target);
215 dev_dbg(&cdev->device, "set to state %lu\n", target);