stm class: Support devices that override software assigned masters
Some STM devices adjust software assigned master numbers depending on the trace source and its runtime state and whatnot. This patch adds a sysfs attribute to inform the trace-side software that master numbers assigned to software sources will not match those in the STP stream, so that, for example, master/channel allocation policy can be adjusted accordingly. Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

szülő
6327a454a8
commit
8e996a2874
@@ -67,9 +67,24 @@ static ssize_t channels_show(struct device *dev,
|
||||
|
||||
static DEVICE_ATTR_RO(channels);
|
||||
|
||||
static ssize_t hw_override_show(struct device *dev,
|
||||
struct device_attribute *attr,
|
||||
char *buf)
|
||||
{
|
||||
struct stm_device *stm = to_stm_device(dev);
|
||||
int ret;
|
||||
|
||||
ret = sprintf(buf, "%u\n", stm->data->hw_override);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static DEVICE_ATTR_RO(hw_override);
|
||||
|
||||
static struct attribute *stm_attrs[] = {
|
||||
&dev_attr_masters.attr,
|
||||
&dev_attr_channels.attr,
|
||||
&dev_attr_hw_override.attr,
|
||||
NULL,
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user