Lines Matching refs:cnss_tcdev

5287 	struct cnss_thermal_cdev *cnss_tcdev = NULL;  in cnss_tcdev_get_max_state()  local
5294 cnss_tcdev = tcdev->devdata; in cnss_tcdev_get_max_state()
5295 *thermal_state = cnss_tcdev->max_thermal_state; in cnss_tcdev_get_max_state()
5303 struct cnss_thermal_cdev *cnss_tcdev = NULL; in cnss_tcdev_get_cur_state() local
5310 cnss_tcdev = tcdev->devdata; in cnss_tcdev_get_cur_state()
5311 *thermal_state = cnss_tcdev->curr_thermal_state; in cnss_tcdev_get_cur_state()
5319 struct cnss_thermal_cdev *cnss_tcdev = NULL; in cnss_tcdev_set_cur_state() local
5328 cnss_tcdev = tcdev->devdata; in cnss_tcdev_set_cur_state()
5330 if (thermal_state > cnss_tcdev->max_thermal_state) in cnss_tcdev_set_cur_state()
5334 thermal_state, cnss_tcdev->tcdev_id); in cnss_tcdev_set_cur_state()
5339 cnss_tcdev->tcdev_id); in cnss_tcdev_set_cur_state()
5341 cnss_tcdev->curr_thermal_state = thermal_state; in cnss_tcdev_set_cur_state()
5345 ret, cnss_tcdev->tcdev_id); in cnss_tcdev_set_cur_state()
5362 struct cnss_thermal_cdev *cnss_tcdev = NULL; in cnss_thermal_cdev_register() local
5372 cnss_tcdev = kzalloc(sizeof(*cnss_tcdev), GFP_KERNEL); in cnss_thermal_cdev_register()
5373 if (!cnss_tcdev) { in cnss_thermal_cdev_register()
5378 cnss_tcdev->tcdev_id = tcdev_id; in cnss_thermal_cdev_register()
5379 cnss_tcdev->max_thermal_state = max_state; in cnss_thermal_cdev_register()
5387 kfree(cnss_tcdev); in cnss_thermal_cdev_register()
5394 cnss_tcdev->tcdev = thermal_of_cooling_device_register(dev_node, in cnss_thermal_cdev_register()
5396 cnss_tcdev, in cnss_thermal_cdev_register()
5398 if (IS_ERR_OR_NULL(cnss_tcdev->tcdev)) { in cnss_thermal_cdev_register()
5399 ret = PTR_ERR(cnss_tcdev->tcdev); in cnss_thermal_cdev_register()
5401 ret, cnss_tcdev->tcdev_id); in cnss_thermal_cdev_register()
5402 kfree(cnss_tcdev); in cnss_thermal_cdev_register()
5405 cnss_tcdev->tcdev_id); in cnss_thermal_cdev_register()
5407 list_add(&cnss_tcdev->tcdev_list, in cnss_thermal_cdev_register()
5413 kfree(cnss_tcdev); in cnss_thermal_cdev_register()
5424 struct cnss_thermal_cdev *cnss_tcdev = NULL; in cnss_thermal_cdev_unregister() local
5433 cnss_tcdev = list_first_entry(&priv->cnss_tcdev_list, in cnss_thermal_cdev_unregister()
5436 thermal_cooling_device_unregister(cnss_tcdev->tcdev); in cnss_thermal_cdev_unregister()
5437 list_del(&cnss_tcdev->tcdev_list); in cnss_thermal_cdev_unregister()
5438 kfree(cnss_tcdev); in cnss_thermal_cdev_unregister()
5449 struct cnss_thermal_cdev *cnss_tcdev = NULL; in cnss_get_curr_therm_cdev_state() local
5457 list_for_each_entry(cnss_tcdev, &priv->cnss_tcdev_list, tcdev_list) { in cnss_get_curr_therm_cdev_state()
5458 if (cnss_tcdev->tcdev_id != tcdev_id) in cnss_get_curr_therm_cdev_state()
5461 *thermal_state = cnss_tcdev->curr_thermal_state; in cnss_get_curr_therm_cdev_state()
5464 cnss_tcdev->curr_thermal_state, tcdev_id); in cnss_get_curr_therm_cdev_state()