linux/drivers/hid/hid-udraw-ps3.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * HID driver for THQ PS3 uDraw tablet
 *
 * Copyright (C) 2016 Red Hat Inc. All Rights Reserved
 */

#include <linux/device.h>
#include <linux/hid.h>
#include <linux/module.h>
#include "hid-ids.h"

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();

/*
 * Protocol information from:
 * https://brandonw.net/udraw/
 * and the source code of:
 * https://vvvv.org/contribution/udraw-hid
 */

/*
 * The device is setup with multiple input devices:
 * - the touch area which works as a touchpad
 * - the tablet area which works as a touchpad/drawing tablet
 * - a joypad with a d-pad, and 7 buttons
 * - an accelerometer device
 */

enum {};

enum {};

/*
 * Accelerometer min/max values
 * in order, X, Y and Z
 */
static struct {} accel_limits[] =;

#define DEVICE_NAME
/* resolution in pixels */
#define RES_X
#define RES_Y
/* size in mm */
#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();