Lines Matching refs:tzd
399 struct thermal_zone_device *tzd; in thermal_zone_of_add_sensor() local
402 tzd = thermal_zone_get_zone_by_name(zone->name); in thermal_zone_of_add_sensor()
403 if (IS_ERR(tzd)) in thermal_zone_of_add_sensor()
406 tz = tzd->devdata; in thermal_zone_of_add_sensor()
411 mutex_lock(&tzd->lock); in thermal_zone_of_add_sensor()
415 tzd->ops->get_temp = of_thermal_get_temp; in thermal_zone_of_add_sensor()
416 tzd->ops->get_trend = of_thermal_get_trend; in thermal_zone_of_add_sensor()
417 tzd->ops->set_emul_temp = of_thermal_set_emul_temp; in thermal_zone_of_add_sensor()
418 mutex_unlock(&tzd->lock); in thermal_zone_of_add_sensor()
420 return tzd; in thermal_zone_of_add_sensor()
460 struct thermal_zone_device *tzd = ERR_PTR(-ENODEV); in thermal_zone_of_sensor_register() local
498 tzd = thermal_zone_of_add_sensor(child, sensor_np, in thermal_zone_of_sensor_register()
500 if (!IS_ERR(tzd)) in thermal_zone_of_sensor_register()
501 tzd->ops->set_mode(tzd, THERMAL_DEVICE_ENABLED); in thermal_zone_of_sensor_register()
513 return tzd; in thermal_zone_of_sensor_register()
533 struct thermal_zone_device *tzd) in thermal_zone_of_sensor_unregister() argument
537 if (!dev || !tzd || !tzd->devdata) in thermal_zone_of_sensor_unregister()
540 tz = tzd->devdata; in thermal_zone_of_sensor_unregister()
546 mutex_lock(&tzd->lock); in thermal_zone_of_sensor_unregister()
547 tzd->ops->get_temp = NULL; in thermal_zone_of_sensor_unregister()
548 tzd->ops->get_trend = NULL; in thermal_zone_of_sensor_unregister()
549 tzd->ops->set_emul_temp = NULL; in thermal_zone_of_sensor_unregister()
553 mutex_unlock(&tzd->lock); in thermal_zone_of_sensor_unregister()