diff options
author | Alexander Shishkin <alexander.shishkin@linux.intel.com> | 2017-08-23 09:52:00 +0300 |
---|---|---|
committer | Alexander Shishkin <alexander.shishkin@linux.intel.com> | 2018-03-28 18:47:21 +0300 |
commit | 282ffec565c2e9fe18bbb48c19767cccd2437f11 (patch) | |
tree | 1f18aab2d7194f8f983b96a02f06b9805ac8431b /drivers/hwtracing/intel_th/core.c | |
parent | 661b0df8489a35da4ee8acaaf43f204a913ccfc9 (diff) | |
download | linux-282ffec565c2e9fe18bbb48c19767cccd2437f11.tar.xz |
intel_th: Allow forcing host mode through drvdata
Some devices can only operate in host mode, so we need means of
communicating this to the core driver on per-device basis. This
adds a flag to drvdata to signal host-only capability to the core.
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Diffstat (limited to 'drivers/hwtracing/intel_th/core.c')
-rw-r--r-- | drivers/hwtracing/intel_th/core.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/hwtracing/intel_th/core.c b/drivers/hwtracing/intel_th/core.c index 8f820c182240..da962aa2cef5 100644 --- a/drivers/hwtracing/intel_th/core.c +++ b/drivers/hwtracing/intel_th/core.c @@ -630,7 +630,8 @@ intel_th_subdevice_alloc(struct intel_th *th, thdev->output.port = -1; thdev->output.scratchpad = subdev->scrpd; } else if (subdev->type == INTEL_TH_SWITCH) { - thdev->host_mode = host_mode; + thdev->host_mode = + INTEL_TH_CAP(th, host_mode_only) ? true : host_mode; th->hub = thdev; } @@ -729,7 +730,8 @@ static int intel_th_populate(struct intel_th *th) struct intel_th_device *thdev; /* only allow SOURCE and SWITCH devices in host mode */ - if (host_mode && subdev->type == INTEL_TH_OUTPUT) + if ((INTEL_TH_CAP(th, host_mode_only) || host_mode) && + subdev->type == INTEL_TH_OUTPUT) continue; /* |