coresight: cti: Add connection information to sysfs
authorMike Leach <mike.leach@linaro.org>
Fri, 20 Mar 2020 16:53:00 +0000 (10:53 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 21 Mar 2020 10:32:20 +0000 (11:32 +0100)
commit3c5597e398124e6d55f8dcc4355c09b5b3f6e9bb
treec9d50d4533f32ae4aebae97a7bfc49a80b6a0020
parent177af8285b59a3887e4430d2c782598083cddcd7
coresight: cti: Add connection information to sysfs

Dynamically adds sysfs attributes for all connections defined in the CTI.

Each connection has a triggers<N> sub-directory with name, in_signals,
in_types, out_signals and out_types as read-only parameters in the
directory. in_ or out_ parameters may be omitted if there are no in or
out signals for the connection.

Additionally each device has a nr_cons in the connections sub-directory.

This allows clients to explore the connection and trigger signal details
without needing to refer to device tree or specification of the device.

Standardised type information is provided for certain common functions -
e.g. snk_full for a trigger from a sink indicating full. Otherwise type
defaults to genio.

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/20200320165303.13681-10-mathieu.poirier@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hwtracing/coresight/coresight-cti-sysfs.c
drivers/hwtracing/coresight/coresight-cti.c
drivers/hwtracing/coresight/coresight-cti.h