#define pr_fmt(fmt) …
#include <linux/types.h>
#include <linux/module.h>
#include <linux/device.h>
#include <linux/sysfs.h>
#include <linux/kdev_t.h>
#include <linux/debugfs.h>
#include <linux/idr.h>
#include <linux/pci.h>
#include <linux/pm_runtime.h>
#include <linux/dma-mapping.h>
#include "intel_th.h"
#include "debug.h"
static bool host_mode __read_mostly;
module_param(host_mode, bool, 0444);
static DEFINE_IDA(intel_th_ida);
static int intel_th_match(struct device *dev, const struct device_driver *driver)
{ … }
static int intel_th_child_remove(struct device *dev, void *data)
{ … }
static int intel_th_probe(struct device *dev)
{ … }
static void intel_th_device_remove(struct intel_th_device *thdev);
static void intel_th_remove(struct device *dev)
{ … }
static struct bus_type intel_th_bus = …;
static void intel_th_device_free(struct intel_th_device *thdev);
static void intel_th_device_release(struct device *dev)
{ … }
static const struct device_type intel_th_source_device_type = …;
static char *intel_th_output_devnode(const struct device *dev, umode_t *mode,
kuid_t *uid, kgid_t *gid)
{ … }
static ssize_t port_show(struct device *dev, struct device_attribute *attr,
char *buf)
{ … }
static DEVICE_ATTR_RO(port);
static void intel_th_trace_prepare(struct intel_th_device *thdev)
{ … }
static int intel_th_output_activate(struct intel_th_device *thdev)
{ … }
static void intel_th_output_deactivate(struct intel_th_device *thdev)
{ … }
static ssize_t active_show(struct device *dev, struct device_attribute *attr,
char *buf)
{ … }
static ssize_t active_store(struct device *dev, struct device_attribute *attr,
const char *buf, size_t size)
{ … }
static DEVICE_ATTR_RW(active);
static struct attribute *intel_th_output_attrs[] = …;
ATTRIBUTE_GROUPS(…);
static const struct device_type intel_th_output_device_type = …;
static const struct device_type intel_th_switch_device_type = …;
static const struct device_type *intel_th_device_type[] = …;
int intel_th_driver_register(struct intel_th_driver *thdrv)
{ … }
EXPORT_SYMBOL_GPL(…);
void intel_th_driver_unregister(struct intel_th_driver *thdrv)
{ … }
EXPORT_SYMBOL_GPL(…);
static struct intel_th_device *
intel_th_device_alloc(struct intel_th *th, unsigned int type, const char *name,
int id)
{ … }
static int intel_th_device_add_resources(struct intel_th_device *thdev,
struct resource *res, int nres)
{ … }
static void intel_th_device_remove(struct intel_th_device *thdev)
{ … }
static void intel_th_device_free(struct intel_th_device *thdev)
{ … }
static const struct intel_th_subdevice { … } intel_th_subdevices[] = …;
#ifdef CONFIG_MODULES
static void __intel_th_request_hub_module(struct work_struct *work)
{ … }
static int intel_th_request_hub_module(struct intel_th *th)
{ … }
static void intel_th_request_hub_module_flush(struct intel_th *th)
{ … }
#else
static inline int intel_th_request_hub_module(struct intel_th *th)
{
return -EINVAL;
}
static inline void intel_th_request_hub_module_flush(struct intel_th *th)
{
}
#endif
static struct intel_th_device *
intel_th_subdevice_alloc(struct intel_th *th,
const struct intel_th_subdevice *subdev)
{ … }
int intel_th_output_enable(struct intel_th *th, unsigned int otype)
{ … }
EXPORT_SYMBOL_GPL(…);
static int intel_th_populate(struct intel_th *th)
{ … }
static int intel_th_output_open(struct inode *inode, struct file *file)
{ … }
static const struct file_operations intel_th_output_fops = …;
static irqreturn_t intel_th_irq(int irq, void *data)
{ … }
struct intel_th *
intel_th_alloc(struct device *dev, const struct intel_th_drvdata *drvdata,
struct resource *devres, unsigned int ndevres)
{ … }
EXPORT_SYMBOL_GPL(…);
void intel_th_free(struct intel_th *th)
{ … }
EXPORT_SYMBOL_GPL(…);
int intel_th_trace_enable(struct intel_th_device *thdev)
{ … }
EXPORT_SYMBOL_GPL(…);
int intel_th_trace_switch(struct intel_th_device *thdev)
{ … }
EXPORT_SYMBOL_GPL(…);
int intel_th_trace_disable(struct intel_th_device *thdev)
{ … }
EXPORT_SYMBOL_GPL(…);
int intel_th_set_output(struct intel_th_device *thdev,
unsigned int master)
{ … }
EXPORT_SYMBOL_GPL(…);
static int __init intel_th_init(void)
{ … }
subsys_initcall(intel_th_init);
static void __exit intel_th_exit(void)
{ … }
module_exit(intel_th_exit);
MODULE_LICENSE(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;