Lines Matching refs:tzd
404 struct thermal_zone_device *tzd; in thermal_zone_of_add_sensor() local
407 tzd = thermal_zone_get_zone_by_name(zone->name); in thermal_zone_of_add_sensor()
408 if (IS_ERR(tzd)) in thermal_zone_of_add_sensor()
411 tz = tzd->devdata; in thermal_zone_of_add_sensor()
416 mutex_lock(&tzd->lock); in thermal_zone_of_add_sensor()
420 tzd->ops->get_temp = of_thermal_get_temp; in thermal_zone_of_add_sensor()
421 tzd->ops->get_trend = of_thermal_get_trend; in thermal_zone_of_add_sensor()
422 tzd->ops->set_emul_temp = of_thermal_set_emul_temp; in thermal_zone_of_add_sensor()
423 mutex_unlock(&tzd->lock); in thermal_zone_of_add_sensor()
425 return tzd; in thermal_zone_of_add_sensor()
465 struct thermal_zone_device *tzd = ERR_PTR(-ENODEV); in thermal_zone_of_sensor_register() local
503 tzd = thermal_zone_of_add_sensor(child, sensor_np, in thermal_zone_of_sensor_register()
505 if (!IS_ERR(tzd)) in thermal_zone_of_sensor_register()
506 tzd->ops->set_mode(tzd, THERMAL_DEVICE_ENABLED); in thermal_zone_of_sensor_register()
518 return tzd; in thermal_zone_of_sensor_register()
538 struct thermal_zone_device *tzd) in thermal_zone_of_sensor_unregister() argument
542 if (!dev || !tzd || !tzd->devdata) in thermal_zone_of_sensor_unregister()
545 tz = tzd->devdata; in thermal_zone_of_sensor_unregister()
551 mutex_lock(&tzd->lock); in thermal_zone_of_sensor_unregister()
552 tzd->ops->get_temp = NULL; in thermal_zone_of_sensor_unregister()
553 tzd->ops->get_trend = NULL; in thermal_zone_of_sensor_unregister()
554 tzd->ops->set_emul_temp = NULL; in thermal_zone_of_sensor_unregister()
558 mutex_unlock(&tzd->lock); in thermal_zone_of_sensor_unregister()