Lines Matching refs:icnss_tcdev
2926 struct icnss_thermal_cdev *icnss_tcdev = tcdev->devdata; in icnss_tcdev_get_max_state() local
2928 *thermal_state = icnss_tcdev->max_thermal_state; in icnss_tcdev_get_max_state()
2936 struct icnss_thermal_cdev *icnss_tcdev = tcdev->devdata; in icnss_tcdev_get_cur_state() local
2938 *thermal_state = icnss_tcdev->curr_thermal_state; in icnss_tcdev_get_cur_state()
2946 struct icnss_thermal_cdev *icnss_tcdev = tcdev->devdata; in icnss_tcdev_set_cur_state() local
2954 if (thermal_state > icnss_tcdev->max_thermal_state) in icnss_tcdev_set_cur_state()
2958 thermal_state, icnss_tcdev->tcdev_id); in icnss_tcdev_set_cur_state()
2962 icnss_tcdev->tcdev_id); in icnss_tcdev_set_cur_state()
2964 icnss_tcdev->curr_thermal_state = thermal_state; in icnss_tcdev_set_cur_state()
2968 ret, icnss_tcdev->tcdev_id); in icnss_tcdev_set_cur_state()
2985 struct icnss_thermal_cdev *icnss_tcdev = NULL; in icnss_thermal_cdev_register() local
2990 icnss_tcdev = kzalloc(sizeof(*icnss_tcdev), GFP_KERNEL); in icnss_thermal_cdev_register()
2991 if (!icnss_tcdev) in icnss_thermal_cdev_register()
2994 icnss_tcdev->tcdev_id = tcdev_id; in icnss_thermal_cdev_register()
2995 icnss_tcdev->max_thermal_state = max_state; in icnss_thermal_cdev_register()
3009 icnss_tcdev->tcdev = thermal_of_cooling_device_register( in icnss_thermal_cdev_register()
3011 cdev_node_name, icnss_tcdev, in icnss_thermal_cdev_register()
3013 if (IS_ERR_OR_NULL(icnss_tcdev->tcdev)) { in icnss_thermal_cdev_register()
3014 ret = PTR_ERR(icnss_tcdev->tcdev); in icnss_thermal_cdev_register()
3016 ret, icnss_tcdev->tcdev_id); in icnss_thermal_cdev_register()
3019 icnss_tcdev->tcdev_id); in icnss_thermal_cdev_register()
3020 list_add(&icnss_tcdev->tcdev_list, in icnss_thermal_cdev_register()
3035 struct icnss_thermal_cdev *icnss_tcdev = NULL; in icnss_thermal_cdev_unregister() local
3038 icnss_tcdev = list_first_entry(&priv->icnss_tcdev_list, in icnss_thermal_cdev_unregister()
3041 thermal_cooling_device_unregister(icnss_tcdev->tcdev); in icnss_thermal_cdev_unregister()
3042 list_del(&icnss_tcdev->tcdev_list); in icnss_thermal_cdev_unregister()
3043 kfree(icnss_tcdev); in icnss_thermal_cdev_unregister()
3053 struct icnss_thermal_cdev *icnss_tcdev = NULL; in icnss_get_curr_therm_cdev_state() local
3056 list_for_each_entry(icnss_tcdev, &priv->icnss_tcdev_list, tcdev_list) { in icnss_get_curr_therm_cdev_state()
3057 if (icnss_tcdev->tcdev_id != tcdev_id) in icnss_get_curr_therm_cdev_state()
3060 *thermal_state = icnss_tcdev->curr_thermal_state; in icnss_get_curr_therm_cdev_state()
3063 icnss_tcdev->curr_thermal_state, tcdev_id); in icnss_get_curr_therm_cdev_state()