Lines Matching refs:feat_csdev
35 struct cscfg_feature_csdev *feat_csdev = NULL; in cscfg_get_feat_csdev() local
37 list_for_each_entry(feat_csdev, &csdev->feature_csdev_list, node) { in cscfg_get_feat_csdev()
38 if (strcmp(feat_csdev->feat_desc->name, name) == 0) in cscfg_get_feat_csdev()
39 return feat_csdev; in cscfg_get_feat_csdev()
67 struct cscfg_feature_csdev *feat_csdev; in cscfg_add_csdev_cfg() local
74 feat_csdev = cscfg_get_feat_csdev(csdev, config_desc->feat_ref_names[i]); in cscfg_add_csdev_cfg()
75 if (feat_csdev) { in cscfg_add_csdev_cfg()
87 config_csdev->feats_csdev[config_csdev->nr_feat++] = feat_csdev; in cscfg_add_csdev_cfg()
125 struct cscfg_feature_csdev *feat_csdev = NULL; in cscfg_alloc_csdev_feat() local
129 feat_csdev = devm_kzalloc(dev, sizeof(struct cscfg_feature_csdev), GFP_KERNEL); in cscfg_alloc_csdev_feat()
130 if (!feat_csdev) in cscfg_alloc_csdev_feat()
134 feat_csdev->nr_params = feat_desc->nr_params; in cscfg_alloc_csdev_feat()
141 if (feat_csdev->nr_params) { in cscfg_alloc_csdev_feat()
142 feat_csdev->params_csdev = devm_kcalloc(dev, feat_csdev->nr_params, in cscfg_alloc_csdev_feat()
145 if (!feat_csdev->params_csdev) in cscfg_alloc_csdev_feat()
152 for (i = 0; i < feat_csdev->nr_params; i++) in cscfg_alloc_csdev_feat()
153 feat_csdev->params_csdev[i].feat_csdev = feat_csdev; in cscfg_alloc_csdev_feat()
160 feat_csdev->nr_regs = feat_desc->nr_regs; in cscfg_alloc_csdev_feat()
161 feat_csdev->regs_csdev = devm_kcalloc(dev, feat_csdev->nr_regs, in cscfg_alloc_csdev_feat()
164 if (!feat_csdev->regs_csdev) in cscfg_alloc_csdev_feat()
168 feat_csdev->feat_desc = feat_desc; in cscfg_alloc_csdev_feat()
169 feat_csdev->csdev = csdev; in cscfg_alloc_csdev_feat()
171 return feat_csdev; in cscfg_alloc_csdev_feat()
179 struct cscfg_feature_csdev *feat_csdev; in cscfg_load_feat_csdev() local
186 feat_csdev = cscfg_alloc_csdev_feat(csdev, feat_desc); in cscfg_load_feat_csdev()
187 if (!feat_csdev) in cscfg_load_feat_csdev()
191 err = ops->load_feat(csdev, feat_csdev); in cscfg_load_feat_csdev()
196 cscfg_reset_feat(feat_csdev); in cscfg_load_feat_csdev()
198 list_add(&feat_csdev->node, &csdev->feature_csdev_list); in cscfg_load_feat_csdev()
328 struct cscfg_feature_csdev *feat_csdev; in cscfg_csdev_get_feat_from_desc() local
330 list_for_each_entry(feat_csdev, &csdev->feature_csdev_list, node) { in cscfg_csdev_get_feat_from_desc()
331 if (feat_csdev->feat_desc == feat_desc) in cscfg_csdev_get_feat_from_desc()
332 return feat_csdev; in cscfg_csdev_get_feat_from_desc()
341 struct cscfg_feature_csdev *feat_csdev; in cscfg_update_feat_param_val() local
361 feat_csdev = cscfg_csdev_get_feat_from_desc(csdev_item->csdev, feat_desc); in cscfg_update_feat_param_val()
362 if (feat_csdev) in cscfg_update_feat_param_val()
363 feat_csdev->params_csdev[param_idx].current_value = value; in cscfg_update_feat_param_val()
406 struct cscfg_feature_csdev *feat_csdev, *tmp; in cscfg_remove_owned_csdev_features() local
411 list_for_each_entry_safe(feat_csdev, tmp, &csdev->feature_csdev_list, node) { in cscfg_remove_owned_csdev_features()
412 if (feat_csdev->feat_desc->load_owner == load_owner) in cscfg_remove_owned_csdev_features()
413 list_del(&feat_csdev->node); in cscfg_remove_owned_csdev_features()
855 struct cscfg_feature_csdev *feat_csdev; in cscfg_csdev_reset_feats() local
862 list_for_each_entry(feat_csdev, &csdev->feature_csdev_list, node) in cscfg_csdev_reset_feats()
863 cscfg_reset_feat(feat_csdev); in cscfg_csdev_reset_feats()