summaryrefslogtreecommitdiff
path: root/include/linux/coresight.h
diff options
context:
space:
mode:
authorMike Leach <mike.leach@linaro.org>2020-05-18 12:02:22 -0600
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-05-19 16:31:15 +0200
commit80961525880e58e0efcf536fd357d642c68f4176 (patch)
treee2184dd895beca8e55e9a8a2f8f1fd57a9e45555 /include/linux/coresight.h
parent68a5d5fccb4a010675a122d9ad0b5089a9896d1f (diff)
coresight: Add generic sysfs link creation functions
To allow the connections between coresight components to be represented in sysfs, generic methods for creating sysfs links between two coresight devices are added. Signed-off-by: Mike Leach <mike.leach@linaro.org> Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com> Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> Link: https://lore.kernel.org/r/20200518180242.7916-4-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/coresight.h')
-rw-r--r--include/linux/coresight.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/linux/coresight.h b/include/linux/coresight.h
index 193cc9dbf448..a2ec25e02ca9 100644
--- a/include/linux/coresight.h
+++ b/include/linux/coresight.h
@@ -149,6 +149,20 @@ struct coresight_connection {
};
/**
+ * struct coresight_sysfs_link - representation of a connection in sysfs.
+ * @orig: Originating (master) coresight device for the link.
+ * @orig_name: Name to use for the link orig->target.
+ * @target: Target (slave) coresight device for the link.
+ * @target_name: Name to use for the link target->orig.
+ */
+struct coresight_sysfs_link {
+ struct coresight_device *orig;
+ const char *orig_name;
+ struct coresight_device *target;
+ const char *target_name;
+};
+
+/**
* struct coresight_device - representation of a device as used by the framework
* @pdata: Platform data with device connections associated to this device.
* @type: as defined by @coresight_dev_type.
@@ -165,6 +179,9 @@ struct coresight_connection {
* @ea: Device attribute for sink representation under PMU directory.
* @ect_dev: Associated cross trigger device. Not part of the trace data
* path or connections.
+ * @nr_links: number of sysfs links created to other components from this
+ * device. These will appear in the "connections" group.
+ * @has_conns_grp: Have added a "connections" group for sysfs links.
*/
struct coresight_device {
struct coresight_platform_data *pdata;
@@ -180,6 +197,9 @@ struct coresight_device {
struct dev_ext_attribute *ea;
/* cross trigger handling */
struct coresight_device *ect_dev;
+ /* sysfs links between components */
+ int nr_links;
+ bool has_conns_grp;
};
/*