1 /* SPDX-License-Identifier: GPL-2.0-only */ 2 /* 3 * Coresight system configuration driver - support for configfs. 4 */ 5 6 #ifndef CORESIGHT_SYSCFG_CONFIGFS_H 7 #define CORESIGHT_SYSCFG_CONFIGFS_H 8 9 #include <linux/configfs.h> 10 #include "coresight-syscfg.h" 11 12 #define CSCFG_FS_SUBSYS_NAME "cs-syscfg" 13 14 /* container for configuration view */ 15 struct cscfg_fs_config { 16 struct cscfg_config_desc *config_desc; 17 struct config_group group; 18 }; 19 20 /* container for feature view */ 21 struct cscfg_fs_feature { 22 struct cscfg_feature_desc *feat_desc; 23 struct config_group group; 24 }; 25 26 /* container for parameter view */ 27 struct cscfg_fs_param { 28 int param_idx; 29 struct cscfg_feature_desc *feat_desc; 30 struct config_group group; 31 }; 32 33 /* container for preset view */ 34 struct cscfg_fs_preset { 35 int preset_num; 36 struct cscfg_config_desc *config_desc; 37 struct config_group group; 38 }; 39 40 int cscfg_configfs_init(struct cscfg_manager *cscfg_mgr); 41 void cscfg_configfs_release(struct cscfg_manager *cscfg_mgr); 42 int cscfg_configfs_add_config(struct cscfg_config_desc *config_desc); 43 int cscfg_configfs_add_feature(struct cscfg_feature_desc *feat_desc); 44 45 #endif /* CORESIGHT_SYSCFG_CONFIGFS_H */ 46