Lines Matching defs:thdev

97  * @thdev:	the device to search the resource for
102 intel_th_device_get_resource(struct intel_th_device *thdev, unsigned int type,
107 for (i = 0; i < thdev->num_resources; i++)
108 if (resource_type(&thdev->resource[i]) == type && !num--)
109 return &thdev->resource[i];
127 * @thdev: the output device
132 intel_th_output_assigned(struct intel_th_device *thdev)
134 return thdev->type == INTEL_TH_OUTPUT &&
135 (thdev->output.port >= 0 ||
136 thdev->output.type == GTH_NONE);
161 int (*probe)(struct intel_th_device *thdev);
162 void (*remove)(struct intel_th_device *thdev);
164 int (*assign)(struct intel_th_device *thdev,
166 void (*unassign)(struct intel_th_device *thdev,
168 void (*prepare)(struct intel_th_device *thdev,
170 void (*enable)(struct intel_th_device *thdev,
172 void (*trig_switch)(struct intel_th_device *thdev,
174 void (*disable)(struct intel_th_device *thdev,
177 irqreturn_t (*irq)(struct intel_th_device *thdev);
178 void (*wait_empty)(struct intel_th_device *thdev);
179 int (*activate)(struct intel_th_device *thdev);
180 void (*deactivate)(struct intel_th_device *thdev);
187 int (*set_output)(struct intel_th_device *thdev,
208 to_intel_th_parent(const struct intel_th_device *thdev)
210 struct device *parent = thdev->dev.parent;
218 static inline struct intel_th *to_intel_th(const struct intel_th_device *thdev)
220 if (thdev->type == INTEL_TH_OUTPUT)
221 thdev = to_intel_th_parent(thdev);
223 if (WARN_ON_ONCE(!thdev || thdev->type == INTEL_TH_OUTPUT))
226 return dev_get_drvdata(thdev->dev.parent);
237 int intel_th_trace_enable(struct intel_th_device *thdev);
238 int intel_th_trace_switch(struct intel_th_device *thdev);
239 int intel_th_trace_disable(struct intel_th_device *thdev);
240 int intel_th_set_output(struct intel_th_device *thdev,
263 * @thdev: subdevices
266 * @num_thdevs: number of devices in the @thdev array
276 struct intel_th_device *thdev[TH_SUBDEVICE_MAX];
299 to_intel_th_hub(struct intel_th_device *thdev)
301 if (thdev->type == INTEL_TH_SWITCH)
302 return thdev;
303 else if (thdev->type == INTEL_TH_OUTPUT)
304 return to_intel_th_parent(thdev);
306 return to_intel_th(thdev)->hub;