Lines Matching refs:tz
361 static int __thermal_genl_cmd_tz_get_id(struct thermal_zone_device *tz, in __thermal_genl_cmd_tz_get_id() argument
366 if (nla_put_u32(msg, THERMAL_GENL_ATTR_TZ_ID, tz->id) || in __thermal_genl_cmd_tz_get_id()
367 nla_put_string(msg, THERMAL_GENL_ATTR_TZ_NAME, tz->type)) in __thermal_genl_cmd_tz_get_id()
400 struct thermal_zone_device *tz; in thermal_genl_cmd_tz_get_trip() local
409 tz = thermal_zone_get_by_id(id); in thermal_genl_cmd_tz_get_trip()
410 if (!tz) in thermal_genl_cmd_tz_get_trip()
417 mutex_lock(&tz->lock); in thermal_genl_cmd_tz_get_trip()
419 for (i = 0; i < tz->trips; i++) { in thermal_genl_cmd_tz_get_trip()
424 tz->ops->get_trip_type(tz, i, &type); in thermal_genl_cmd_tz_get_trip()
425 tz->ops->get_trip_temp(tz, i, &temp); in thermal_genl_cmd_tz_get_trip()
426 tz->ops->get_trip_hyst(tz, i, &hyst); in thermal_genl_cmd_tz_get_trip()
435 mutex_unlock(&tz->lock); in thermal_genl_cmd_tz_get_trip()
442 mutex_unlock(&tz->lock); in thermal_genl_cmd_tz_get_trip()
450 struct thermal_zone_device *tz; in thermal_genl_cmd_tz_get_temp() local
458 tz = thermal_zone_get_by_id(id); in thermal_genl_cmd_tz_get_temp()
459 if (!tz) in thermal_genl_cmd_tz_get_temp()
462 ret = thermal_zone_get_temp(tz, &temp); in thermal_genl_cmd_tz_get_temp()
476 struct thermal_zone_device *tz; in thermal_genl_cmd_tz_get_gov() local
484 tz = thermal_zone_get_by_id(id); in thermal_genl_cmd_tz_get_gov()
485 if (!tz) in thermal_genl_cmd_tz_get_gov()
488 mutex_lock(&tz->lock); in thermal_genl_cmd_tz_get_gov()
492 tz->governor->name)) in thermal_genl_cmd_tz_get_gov()
495 mutex_unlock(&tz->lock); in thermal_genl_cmd_tz_get_gov()