#include <linux/device.h>
#include <linux/hid.h>
#include <linux/module.h>
#include "hid-ids.h"
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
enum { … };
enum { … };
static struct { … } accel_limits[] = …;
#define DEVICE_NAME …
#define RES_X …
#define RES_Y …
#define WIDTH …
#define HEIGHT …
#define PRESSURE_OFFSET …
#define MAX_PRESSURE …
struct udraw { … };
static int clamp_accel(int axis, int offset)
{ … }
static int udraw_raw_event(struct hid_device *hdev, struct hid_report *report,
u8 *data, int len)
{ … }
static int udraw_open(struct input_dev *dev)
{ … }
static void udraw_close(struct input_dev *dev)
{ … }
static struct input_dev *allocate_and_setup(struct hid_device *hdev,
const char *name)
{ … }
static bool udraw_setup_touch(struct udraw *udraw,
struct hid_device *hdev)
{ … }
static bool udraw_setup_pen(struct udraw *udraw,
struct hid_device *hdev)
{ … }
static bool udraw_setup_accel(struct udraw *udraw,
struct hid_device *hdev)
{ … }
static bool udraw_setup_joypad(struct udraw *udraw,
struct hid_device *hdev)
{ … }
static int udraw_probe(struct hid_device *hdev, const struct hid_device_id *id)
{ … }
static const struct hid_device_id udraw_devices[] = …;
MODULE_DEVICE_TABLE(hid, udraw_devices);
static struct hid_driver udraw_driver = …;
module_hid_driver(…) …;