Lines Matching refs:cscfg_mgr
27 static struct cscfg_manager *cscfg_mgr; variable
110 list_for_each_entry(csdev_item, &cscfg_mgr->csdev_desc_list, item) { in cscfg_add_cfg_to_csdevs()
214 list_for_each_entry(csdev_item, &cscfg_mgr->csdev_desc_list, item) { in cscfg_add_feat_to_csdevs()
229 list_for_each_entry(feat_desc, &cscfg_mgr->feat_desc_list, item) { in cscfg_match_list_feat()
256 list_for_each_entry(feat_desc_exist, &cscfg_mgr->feat_desc_list, item) { in cscfg_load_feat()
266 list_add(&feat_desc->item, &cscfg_mgr->feat_desc_list); in cscfg_load_feat()
280 list_for_each_entry(config_desc_exist, &cscfg_mgr->config_desc_list, item) { in cscfg_load_config()
300 list_add(&config_desc->item, &cscfg_mgr->config_desc_list); in cscfg_load_config()
312 list_for_each_entry(feat_desc_item, &cscfg_mgr->feat_desc_list, item) { in cscfg_get_named_feat_desc()
347 if (atomic_read(&cscfg_mgr->sys_active_cnt)) { in cscfg_update_feat_param_val()
360 list_for_each_entry(csdev_item, &cscfg_mgr->csdev_desc_list, item) { in cscfg_update_feat_param_val()
428 list_for_each_entry(config_desc, &cscfg_mgr->config_desc_list, item) { in cscfg_fs_unregister_cfgs_feats()
432 list_for_each_entry(feat_desc, &cscfg_mgr->feat_desc_list, item) { in cscfg_fs_unregister_cfgs_feats()
453 list_for_each_entry(csdev_item, &cscfg_mgr->csdev_desc_list, item) { in cscfg_unload_owned_cfgs_feats()
463 list_for_each_entry_safe(config_desc, cfg_tmp, &cscfg_mgr->config_desc_list, item) { in cscfg_unload_owned_cfgs_feats()
471 list_for_each_entry_safe(feat_desc, feat_tmp, &cscfg_mgr->feat_desc_list, item) { in cscfg_unload_owned_cfgs_feats()
582 if (cscfg_mgr->load_state != CSCFG_NONE) { in cscfg_load_config_sets()
586 cscfg_mgr->load_state = CSCFG_LOAD; in cscfg_load_config_sets()
594 list_add_tail(&owner_info->item, &cscfg_mgr->load_order_list); in cscfg_load_config_sets()
595 if (!list_is_singular(&cscfg_mgr->load_order_list)) { in cscfg_load_config_sets()
625 if (!list_is_singular(&cscfg_mgr->load_order_list)) in cscfg_load_config_sets()
635 cscfg_mgr->load_state = CSCFG_NONE; in cscfg_load_config_sets()
663 if (cscfg_mgr->load_state != CSCFG_NONE) { in cscfg_unload_config_sets()
669 cscfg_mgr->load_state = CSCFG_UNLOAD; in cscfg_unload_config_sets()
672 if (atomic_read(&cscfg_mgr->sys_active_cnt)) { in cscfg_unload_config_sets()
678 if (!list_empty(&cscfg_mgr->load_order_list)) { in cscfg_unload_config_sets()
679 load_list_item = list_last_entry(&cscfg_mgr->load_order_list, in cscfg_unload_config_sets()
699 if (!list_is_singular(&cscfg_mgr->load_order_list)) { in cscfg_unload_config_sets()
706 cscfg_mgr->load_state = CSCFG_NONE; in cscfg_unload_config_sets()
720 list_for_each_entry(config_desc, &cscfg_mgr->config_desc_list, item) { in cscfg_add_cfgs_csdev()
739 list_for_each_entry(feat_desc, &cscfg_mgr->feat_desc_list, item) { in cscfg_add_feats_csdev()
764 list_add(&csdev_item->item, &cscfg_mgr->csdev_desc_list); in cscfg_list_add_csdev()
778 list_for_each_entry_safe(csdev_item, tmp, &cscfg_mgr->csdev_desc_list, item) { in cscfg_list_remove_csdev()
884 if (cscfg_mgr->load_state == CSCFG_UNLOAD) in _cscfg_activate_config()
887 list_for_each_entry(config_desc, &cscfg_mgr->config_desc_list, item) { in _cscfg_activate_config()
901 atomic_inc(&cscfg_mgr->sys_active_cnt); in _cscfg_activate_config()
921 list_for_each_entry(config_desc, &cscfg_mgr->config_desc_list, item) { in _cscfg_deactivate_config()
924 atomic_dec(&cscfg_mgr->sys_active_cnt); in _cscfg_deactivate_config()
947 if (cscfg_mgr->sysfs_active_config) { in cscfg_config_sysfs_activate()
953 cscfg_mgr->sysfs_active_config = cfg_hash; in cscfg_config_sysfs_activate()
956 if (cscfg_mgr->sysfs_active_config == cfg_hash) { in cscfg_config_sysfs_activate()
958 cscfg_mgr->sysfs_active_config = 0; in cscfg_config_sysfs_activate()
972 cscfg_mgr->sysfs_active_preset = preset; in cscfg_config_sysfs_set_preset()
983 *preset = cscfg_mgr->sysfs_active_preset; in cscfg_config_sysfs_get_active_cfg()
984 *cfg_hash = cscfg_mgr->sysfs_active_config; in cscfg_config_sysfs_get_active_cfg()
1055 if (!atomic_read(&cscfg_mgr->sys_active_cnt)) in cscfg_csdev_enable_active_config()
1148 return cscfg_mgr ? &cscfg_mgr->dev : NULL; in cscfg_device()
1155 kfree(cscfg_mgr); in cscfg_dev_release()
1156 cscfg_mgr = NULL; in cscfg_dev_release()
1167 if (cscfg_mgr) { in cscfg_create_device()
1172 cscfg_mgr = kzalloc(sizeof(struct cscfg_manager), GFP_KERNEL); in cscfg_create_device()
1173 if (!cscfg_mgr) in cscfg_create_device()
1177 INIT_LIST_HEAD(&cscfg_mgr->csdev_desc_list); in cscfg_create_device()
1178 INIT_LIST_HEAD(&cscfg_mgr->feat_desc_list); in cscfg_create_device()
1179 INIT_LIST_HEAD(&cscfg_mgr->config_desc_list); in cscfg_create_device()
1180 INIT_LIST_HEAD(&cscfg_mgr->load_order_list); in cscfg_create_device()
1181 atomic_set(&cscfg_mgr->sys_active_cnt, 0); in cscfg_create_device()
1182 cscfg_mgr->load_state = CSCFG_NONE; in cscfg_create_device()
1216 while (!list_empty(&cscfg_mgr->load_order_list)) { in cscfg_unload_cfgs_on_exit()
1219 owner_info = list_last_entry(&cscfg_mgr->load_order_list, in cscfg_unload_cfgs_on_exit()
1263 cscfg_configfs_release(cscfg_mgr); in cscfg_clear_device()
1278 err = cscfg_configfs_init(cscfg_mgr); in cscfg_init()