summaryrefslogtreecommitdiff
path: root/drivers/hwtracing/coresight/coresight-syscfg-configfs.h
blob: 7d6ffe35ca4c9ade798fe26224ba24a866576097 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Coresight system configuration driver - support for configfs.
 */

#ifndef CORESIGHT_SYSCFG_CONFIGFS_H
#define CORESIGHT_SYSCFG_CONFIGFS_H

#include <linux/configfs.h>
#include "coresight-syscfg.h"

#define CSCFG_FS_SUBSYS_NAME "cs-syscfg"

/* container for configuration view */
struct cscfg_fs_config {
	struct cscfg_config_desc *config_desc;
	struct config_group group;
};

/* container for feature view */
struct cscfg_fs_feature {
	struct cscfg_feature_desc *feat_desc;
	struct config_group group;
};

/* container for parameter view */
struct cscfg_fs_param {
	int param_idx;
	struct cscfg_feature_desc *feat_desc;
	struct config_group group;
};

/* container for preset view */
struct cscfg_fs_preset {
	int preset_num;
	struct cscfg_config_desc *config_desc;
	struct config_group group;
};

int cscfg_configfs_init(struct cscfg_manager *cscfg_mgr);
void cscfg_configfs_release(struct cscfg_manager *cscfg_mgr);
int cscfg_configfs_add_config(struct cscfg_config_desc *config_desc);
int cscfg_configfs_add_feature(struct cscfg_feature_desc *feat_desc);

#endif /* CORESIGHT_SYSCFG_CONFIGFS_H */