#include <linux/module.h>
#include <linux/workqueue.h>
#define ELO_PERIODIC_READ_INTERVAL HZ
#define ELO_SMARTSET_CMD_TIMEOUT 2000
#define ELO_FLUSH_SMARTSET_RESPONSES 0x02
#define ELO_SEND_SMARTSET_COMMAND 0x05
#define ELO_GET_SMARTSET_RESPONSE 0x06
#define ELO_SMARTSET_PACKET_SIZE 8
struct usb_device *usbdev;
struct delayed_work work;
unsigned char buffer[ELO_SMARTSET_PACKET_SIZE];
static struct workqueue_struct *wq;
static bool use_fw_quirk = true;
module_param(use_fw_quirk, bool, S_IRUGO);
MODULE_PARM_DESC(use_fw_quirk, "Do periodic pokes for broken M firmwares (default = true)");
static int elo_input_configured(struct hid_device *hdev,
struct hid_input *hidinput)
struct input_dev *input = hidinput->input;
clear_bit(BTN_LEFT, input->keybit);
set_bit(BTN_TOUCH, input->keybit);
set_bit(ABS_PRESSURE, input->absbit);
input_set_abs_params(input, ABS_PRESSURE, 0, 256, 0, 0);
static void elo_process_data(struct input_dev *input, const u8 *data, int size)
input_report_abs(input, ABS_X, (data[3] << 8) | data[2]);
input_report_abs(input, ABS_Y, (data[5] << 8) | data[4]);