diff options
author | Mike Leach <mike.leach@linaro.org> | 2021-08-18 22:40:20 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-08-18 23:33:28 +0300 |
commit | a13d5a246aca17c44514be9afa20b34443182356 (patch) | |
tree | 0032de017f48216b21cc5f50e062d79d7578d190 /drivers/hwtracing/coresight/coresight-syscfg.h | |
parent | 7fdc9bb2ce113c5318fdacbb717897fede81949d (diff) | |
download | linux-a13d5a246aca17c44514be9afa20b34443182356.tar.xz |
coresight: syscfg: Add initial configfs support
Adds configfs subsystem and attributes to the configuration manager
to enable the listing of loaded configurations and features.
The default values of feature parameters can be accessed and altered
from these attributes to affect all installed devices using the feature.
Link: https://lore.kernel.org/r/20210723165444.1048-10-mike.leach@linaro.org
Signed-off-by: Mike Leach <mike.leach@linaro.org>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Link: https://lore.kernel.org/r/20210818194022.379573-10-mathieu.poirier@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hwtracing/coresight/coresight-syscfg.h')
-rw-r--r-- | drivers/hwtracing/coresight/coresight-syscfg.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/hwtracing/coresight/coresight-syscfg.h b/drivers/hwtracing/coresight/coresight-syscfg.h index 7bb8c8e497ba..8d018efd6ead 100644 --- a/drivers/hwtracing/coresight/coresight-syscfg.h +++ b/drivers/hwtracing/coresight/coresight-syscfg.h @@ -6,6 +6,7 @@ #ifndef CORESIGHT_SYSCFG_H #define CORESIGHT_SYSCFG_H +#include <linux/configfs.h> #include <linux/coresight.h> #include <linux/device.h> @@ -25,6 +26,7 @@ * @feat_desc_list: List of feature descriptors to load into registered devices. * @config_desc_list: List of system configuration descriptors to load into registered devices. * @sys_active_cnt: Total number of active config descriptor references. + * @cfgfs_subsys: configfs subsystem used to manage configurations. */ struct cscfg_manager { struct device dev; @@ -32,6 +34,7 @@ struct cscfg_manager { struct list_head feat_desc_list; struct list_head config_desc_list; atomic_t sys_active_cnt; + struct configfs_subsystem cfgfs_subsys; }; /* get reference to dev in cscfg_manager */ @@ -57,6 +60,10 @@ struct cscfg_registered_csdev { int __init cscfg_init(void); void cscfg_exit(void); int cscfg_preload(void); +const struct cscfg_feature_desc *cscfg_get_named_feat_desc(const char *name); +int cscfg_update_feat_param_val(struct cscfg_feature_desc *feat_desc, + int param_idx, u64 value); + /* syscfg manager external API */ int cscfg_load_config_sets(struct cscfg_config_desc **cfg_descs, |