#include <linux/kernel.h>
#include <linux/hid.h>
#include <linux/input.h>
#include <linux/input/mt.h>
#include <linux/irq.h>
#include <linux/irqdomain.h>
#include <linux/module.h>
#include <linux/pm.h>
#include <linux/slab.h>
#include <linux/wait.h>
#include <linux/sched.h>
#include <linux/rmi.h>
#include "hid-ids.h"
#define RMI_MOUSE_REPORT_ID …
#define RMI_WRITE_REPORT_ID …
#define RMI_READ_ADDR_REPORT_ID …
#define RMI_READ_DATA_REPORT_ID …
#define RMI_ATTN_REPORT_ID …
#define RMI_SET_RMI_MODE_REPORT_ID …
#define RMI_READ_REQUEST_PENDING …
#define RMI_READ_DATA_PENDING …
#define RMI_STARTED …
#define RMI_DEVICE …
#define RMI_DEVICE_HAS_PHYS_BUTTONS …
#define RMI_DEVICE_OUTPUT_SET_REPORT …
#define RMI_F11_CTRL_REG_COUNT …
enum rmi_mode_type { … };
struct rmi_data { … };
#define RMI_PAGE(addr) …
static int rmi_write_report(struct hid_device *hdev, u8 *report, int len);
static int rmi_set_page(struct hid_device *hdev, u8 page)
{ … }
static int rmi_set_mode(struct hid_device *hdev, u8 mode)
{ … }
static int rmi_write_report(struct hid_device *hdev, u8 *report, int len)
{ … }
static int rmi_hid_read_block(struct rmi_transport_dev *xport, u16 addr,
void *buf, size_t len)
{ … }
static int rmi_hid_write_block(struct rmi_transport_dev *xport, u16 addr,
const void *buf, size_t len)
{ … }
static int rmi_reset_attn_mode(struct hid_device *hdev)
{ … }
static void rmi_reset_work(struct work_struct *work)
{ … }
static int rmi_input_event(struct hid_device *hdev, u8 *data, int size)
{ … }
static int rmi_read_data_event(struct hid_device *hdev, u8 *data, int size)
{ … }
static int rmi_check_sanity(struct hid_device *hdev, u8 *data, int size)
{ … }
static int rmi_raw_event(struct hid_device *hdev,
struct hid_report *report, u8 *data, int size)
{ … }
static int rmi_event(struct hid_device *hdev, struct hid_field *field,
struct hid_usage *usage, __s32 value)
{ … }
static void rmi_report(struct hid_device *hid, struct hid_report *report)
{ … }
static int rmi_suspend(struct hid_device *hdev, pm_message_t message)
{ … }
static int rmi_post_resume(struct hid_device *hdev)
{ … }
static int rmi_hid_reset(struct rmi_transport_dev *xport, u16 reset_addr)
{ … }
static int rmi_input_configured(struct hid_device *hdev, struct hid_input *hi)
{ … }
static int rmi_input_mapping(struct hid_device *hdev,
struct hid_input *hi, struct hid_field *field,
struct hid_usage *usage, unsigned long **bit, int *max)
{ … }
static int rmi_check_valid_report_id(struct hid_device *hdev, unsigned type,
unsigned id, struct hid_report **report)
{ … }
static struct rmi_device_platform_data rmi_hid_pdata = …;
static const struct rmi_transport_ops hid_rmi_ops = …;
static void rmi_irq_teardown(void *data)
{ … }
static int rmi_irq_map(struct irq_domain *h, unsigned int virq,
irq_hw_number_t hw_irq_num)
{ … }
static const struct irq_domain_ops rmi_irq_ops = …;
static int rmi_setup_irq_domain(struct hid_device *hdev)
{ … }
static int rmi_probe(struct hid_device *hdev, const struct hid_device_id *id)
{ … }
static void rmi_remove(struct hid_device *hdev)
{ … }
static const struct hid_device_id rmi_id[] = …;
MODULE_DEVICE_TABLE(hid, rmi_id);
static struct hid_driver rmi_driver = …;
module_hid_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;