#include <linux/kernel.h>
#include <linux/hid.h>
#include <linux/input.h>
#include <linux/input/mt.h>
#include <linux/module.h>
#include <asm/unaligned.h>
#include "hid-ids.h"
#define HID_PRODUCT_ID_T3_BTNLESS …
#define HID_PRODUCT_ID_COSMO …
#define HID_PRODUCT_ID_U1_PTP_1 …
#define HID_PRODUCT_ID_U1 …
#define HID_PRODUCT_ID_U1_PTP_2 …
#define HID_PRODUCT_ID_U1_DUAL …
#define HID_PRODUCT_ID_T4_BTNLESS …
#define DEV_SINGLEPOINT …
#define DEV_DUALPOINT …
#define U1_MOUSE_REPORT_ID …
#define U1_ABSOLUTE_REPORT_ID …
#define U1_ABSOLUTE_REPORT_ID_SECD …
#define U1_FEATURE_REPORT_ID …
#define U1_SP_ABSOLUTE_REPORT_ID …
#define U1_FEATURE_REPORT_LEN …
#define U1_FEATURE_REPORT_LEN_ALL …
#define U1_CMD_REGISTER_READ …
#define U1_CMD_REGISTER_WRITE …
#define U1_DEVTYPE_SP_SUPPORT …
#define U1_DISABLE_DEV …
#define U1_TP_ABS_MODE …
#define U1_SP_ABS_MODE …
#define ADDRESS_U1_DEV_CTRL_1 …
#define ADDRESS_U1_DEVICE_TYP …
#define ADDRESS_U1_NUM_SENS_X …
#define ADDRESS_U1_NUM_SENS_Y …
#define ADDRESS_U1_PITCH_SENS_X …
#define ADDRESS_U1_PITCH_SENS_Y …
#define ADDRESS_U1_RESO_DWN_ABS …
#define ADDRESS_U1_PAD_BTN …
#define ADDRESS_U1_SP_BTN …
#define T4_INPUT_REPORT_LEN …
#define T4_FEATURE_REPORT_LEN …
#define T4_FEATURE_REPORT_ID …
#define T4_CMD_REGISTER_READ …
#define T4_CMD_REGISTER_WRITE …
#define T4_ADDRESS_BASE …
#define PRM_SYS_CONFIG_1 …
#define T4_PRM_FEED_CONFIG_1 …
#define T4_PRM_FEED_CONFIG_4 …
#define T4_PRM_ID_CONFIG_3 …
#define T4_FEEDCFG4_ADVANCED_ABS_ENABLE …
#define T4_I2C_ABS …
#define T4_COUNT_PER_ELECTRODE …
#define MAX_TOUCHES …
enum dev_num { … };
struct alps_dev { … };
struct t4_contact_data { … };
struct t4_input_report { … };
static u16 t4_calc_check_sum(u8 *buffer,
unsigned long offset, unsigned long length)
{ … }
static int t4_read_write_register(struct hid_device *hdev, u32 address,
u8 *read_val, u8 write_val, bool read_flag)
{ … }
static int u1_read_write_register(struct hid_device *hdev, u32 address,
u8 *read_val, u8 write_val, bool read_flag)
{ … }
static int t4_raw_event(struct alps_dev *hdata, u8 *data, int size)
{ … }
static int u1_raw_event(struct alps_dev *hdata, u8 *data, int size)
{ … }
static int alps_raw_event(struct hid_device *hdev,
struct hid_report *report, u8 *data, int size)
{ … }
static int __maybe_unused alps_post_reset(struct hid_device *hdev)
{ … }
static int __maybe_unused alps_post_resume(struct hid_device *hdev)
{ … }
static int u1_init(struct hid_device *hdev, struct alps_dev *pri_data)
{ … }
static int T4_init(struct hid_device *hdev, struct alps_dev *pri_data)
{ … }
static int alps_sp_open(struct input_dev *dev)
{ … }
static void alps_sp_close(struct input_dev *dev)
{ … }
static int alps_input_configured(struct hid_device *hdev, struct hid_input *hi)
{ … }
static int alps_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 alps_probe(struct hid_device *hdev, const struct hid_device_id *id)
{ … }
static const struct hid_device_id alps_id[] = …;
MODULE_DEVICE_TABLE(hid, alps_id);
static struct hid_driver alps_driver = …;
module_hid_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;