Lines Matching refs:tzd

382 	struct thermal_zone_device *tzd;  in thermal_zone_of_add_sensor()  local
385 tzd = thermal_zone_get_zone_by_name(zone->name); in thermal_zone_of_add_sensor()
386 if (IS_ERR(tzd)) in thermal_zone_of_add_sensor()
389 tz = tzd->devdata; in thermal_zone_of_add_sensor()
394 mutex_lock(&tzd->lock); in thermal_zone_of_add_sensor()
398 tzd->ops->get_temp = of_thermal_get_temp; in thermal_zone_of_add_sensor()
399 tzd->ops->get_trend = of_thermal_get_trend; in thermal_zone_of_add_sensor()
406 tzd->ops->set_trips = of_thermal_set_trips; in thermal_zone_of_add_sensor()
409 tzd->ops->set_emul_temp = of_thermal_set_emul_temp; in thermal_zone_of_add_sensor()
411 mutex_unlock(&tzd->lock); in thermal_zone_of_add_sensor()
413 return tzd; in thermal_zone_of_add_sensor()
497 struct thermal_zone_device *tzd = ERR_PTR(-ENODEV); in thermal_zone_of_sensor_register() local
519 tzd = thermal_zone_of_add_sensor(child, sensor_np, in thermal_zone_of_sensor_register()
521 if (!IS_ERR(tzd)) in thermal_zone_of_sensor_register()
522 thermal_zone_device_enable(tzd); in thermal_zone_of_sensor_register()
532 return tzd; in thermal_zone_of_sensor_register()
552 struct thermal_zone_device *tzd) in thermal_zone_of_sensor_unregister() argument
556 if (!dev || !tzd || !tzd->devdata) in thermal_zone_of_sensor_unregister()
559 tz = tzd->devdata; in thermal_zone_of_sensor_unregister()
566 thermal_zone_device_disable(tzd); in thermal_zone_of_sensor_unregister()
568 mutex_lock(&tzd->lock); in thermal_zone_of_sensor_unregister()
569 tzd->ops->get_temp = NULL; in thermal_zone_of_sensor_unregister()
570 tzd->ops->get_trend = NULL; in thermal_zone_of_sensor_unregister()
571 tzd->ops->set_emul_temp = NULL; in thermal_zone_of_sensor_unregister()
575 mutex_unlock(&tzd->lock); in thermal_zone_of_sensor_unregister()
619 struct thermal_zone_device **ptr, *tzd; in devm_thermal_zone_of_sensor_register() local
626 tzd = thermal_zone_of_sensor_register(dev, sensor_id, data, ops); in devm_thermal_zone_of_sensor_register()
627 if (IS_ERR(tzd)) { in devm_thermal_zone_of_sensor_register()
629 return tzd; in devm_thermal_zone_of_sensor_register()
632 *ptr = tzd; in devm_thermal_zone_of_sensor_register()
635 return tzd; in devm_thermal_zone_of_sensor_register()
653 struct thermal_zone_device *tzd) in devm_thermal_zone_of_sensor_unregister() argument
656 devm_thermal_zone_of_sensor_match, tzd)); in devm_thermal_zone_of_sensor_unregister()