#include "wacom_wac.h"
#include "wacom.h"
#include <linux/input/mt.h>
#define WAC_MSG_RETRIES …
#define WAC_CMD_RETRIES …
#define DEV_ATTR_RW_PERM …
#define DEV_ATTR_WO_PERM …
#define DEV_ATTR_RO_PERM …
static int wacom_get_report(struct hid_device *hdev, u8 type, u8 *buf,
size_t size, unsigned int retries)
{ … }
static int wacom_set_report(struct hid_device *hdev, u8 type, u8 *buf,
size_t size, unsigned int retries)
{ … }
static void wacom_wac_queue_insert(struct hid_device *hdev,
struct kfifo_rec_ptr_2 *fifo,
u8 *raw_data, int size)
{ … }
static void wacom_wac_queue_flush(struct hid_device *hdev,
struct kfifo_rec_ptr_2 *fifo)
{ … }
static int wacom_wac_pen_serial_enforce(struct hid_device *hdev,
struct hid_report *report, u8 *raw_data, int report_size)
{ … }
static int wacom_raw_event(struct hid_device *hdev, struct hid_report *report,
u8 *raw_data, int size)
{ … }
static int wacom_open(struct input_dev *dev)
{ … }
static void wacom_close(struct input_dev *dev)
{ … }
static int wacom_calc_hid_res(int logical_extents, int physical_extents,
unsigned unit, int exponent)
{ … }
static void wacom_hid_usage_quirk(struct hid_device *hdev,
struct hid_field *field, struct hid_usage *usage)
{ … }
static void wacom_feature_mapping(struct hid_device *hdev,
struct hid_field *field, struct hid_usage *usage)
{ … }
static void wacom_usage_mapping(struct hid_device *hdev,
struct hid_field *field, struct hid_usage *usage)
{ … }
static void wacom_post_parse_hid(struct hid_device *hdev,
struct wacom_features *features)
{ … }
static void wacom_parse_hid(struct hid_device *hdev,
struct wacom_features *features)
{ … }
static int wacom_hid_set_device_mode(struct hid_device *hdev)
{ … }
static int wacom_set_device_mode(struct hid_device *hdev,
struct wacom_wac *wacom_wac)
{ … }
static int wacom_bt_query_tablet_data(struct hid_device *hdev, u8 speed,
struct wacom_features *features)
{ … }
static int _wacom_query_tablet_data(struct wacom *wacom)
{ … }
static void wacom_retrieve_hid_descriptor(struct hid_device *hdev,
struct wacom_features *features)
{ … }
struct wacom_hdev_data { … };
static LIST_HEAD(wacom_udev_list);
static DEFINE_MUTEX(wacom_udev_list_lock);
static bool wacom_are_sibling(struct hid_device *hdev,
struct hid_device *sibling)
{ … }
static struct wacom_hdev_data *wacom_get_hdev_data(struct hid_device *hdev)
{ … }
static void wacom_release_shared_data(struct kref *kref)
{ … }
static void wacom_remove_shared_data(void *res)
{ … }
static int wacom_add_shared_data(struct hid_device *hdev)
{ … }
static int wacom_led_control(struct wacom *wacom)
{ … }
static int wacom_led_putimage(struct wacom *wacom, int button_id, u8 xfer_id,
const unsigned len, const void *img)
{ … }
static ssize_t wacom_led_select_store(struct device *dev, int set_id,
const char *buf, size_t count)
{ … }
#define DEVICE_LED_SELECT_ATTR(SET_ID) …
DEVICE_LED_SELECT_ATTR(…);
DEVICE_LED_SELECT_ATTR(…);
static ssize_t wacom_luminance_store(struct wacom *wacom, u8 *dest,
const char *buf, size_t count)
{ … }
#define DEVICE_LUMINANCE_ATTR(name, field) …
DEVICE_LUMINANCE_ATTR(…) …;
DEVICE_LUMINANCE_ATTR(…) …;
DEVICE_LUMINANCE_ATTR(…) …;
static ssize_t wacom_button_image_store(struct device *dev, int button_id,
const char *buf, size_t count)
{ … }
#define DEVICE_BTNIMG_ATTR(BUTTON_ID) …
DEVICE_BTNIMG_ATTR(…);
DEVICE_BTNIMG_ATTR(…);
DEVICE_BTNIMG_ATTR(…);
DEVICE_BTNIMG_ATTR(…);
DEVICE_BTNIMG_ATTR(…);
DEVICE_BTNIMG_ATTR(…);
DEVICE_BTNIMG_ATTR(…);
DEVICE_BTNIMG_ATTR(…);
static struct attribute *cintiq_led_attrs[] = …;
static const struct attribute_group cintiq_led_attr_group = …;
static struct attribute *intuos4_led_attrs[] = …;
static const struct attribute_group intuos4_led_attr_group = …;
static struct attribute *intuos5_led_attrs[] = …;
static const struct attribute_group intuos5_led_attr_group = …;
static struct attribute *generic_led_attrs[] = …;
static const struct attribute_group generic_led_attr_group = …;
struct wacom_sysfs_group_devres { … };
static void wacom_devm_sysfs_group_release(struct device *dev, void *res)
{ … }
static int __wacom_devm_sysfs_create_group(struct wacom *wacom,
struct kobject *root,
const struct attribute_group *group)
{ … }
static int wacom_devm_sysfs_create_group(struct wacom *wacom,
const struct attribute_group *group)
{ … }
static void wacom_devm_kfifo_release(struct device *dev, void *res)
{ … }
static int wacom_devm_kfifo_alloc(struct wacom *wacom)
{ … }
enum led_brightness wacom_leds_brightness_get(struct wacom_led *led)
{ … }
static enum led_brightness __wacom_led_brightness_get(struct led_classdev *cdev)
{ … }
static int wacom_led_brightness_set(struct led_classdev *cdev,
enum led_brightness brightness)
{ … }
static void wacom_led_readonly_brightness_set(struct led_classdev *cdev,
enum led_brightness brightness)
{ … }
static int wacom_led_register_one(struct device *dev, struct wacom *wacom,
struct wacom_led *led, unsigned int group,
unsigned int id, bool read_only)
{ … }
static void wacom_led_groups_release_one(void *data)
{ … }
static int wacom_led_groups_alloc_and_register_one(struct device *dev,
struct wacom *wacom,
int group_id, int count,
bool read_only)
{ … }
struct wacom_led *wacom_led_find(struct wacom *wacom, unsigned int group_id,
unsigned int id)
{ … }
struct wacom_led *wacom_led_next(struct wacom *wacom, struct wacom_led *cur)
{ … }
static void wacom_led_groups_release(void *data)
{ … }
static int wacom_led_groups_allocate(struct wacom *wacom, int count)
{ … }
static int wacom_leds_alloc_and_register(struct wacom *wacom, int group_count,
int led_per_group, bool read_only)
{ … }
int wacom_initialize_leds(struct wacom *wacom)
{ … }
static void wacom_init_work(struct work_struct *work)
{ … }
static void wacom_query_tablet_data(struct wacom *wacom)
{ … }
static enum power_supply_property wacom_battery_props[] = …;
static int wacom_battery_get_property(struct power_supply *psy,
enum power_supply_property psp,
union power_supply_propval *val)
{ … }
static int __wacom_initialize_battery(struct wacom *wacom,
struct wacom_battery *battery)
{ … }
static int wacom_initialize_battery(struct wacom *wacom)
{ … }
static void wacom_destroy_battery(struct wacom *wacom)
{ … }
static void wacom_aes_battery_handler(struct work_struct *work)
{ … }
static ssize_t wacom_show_speed(struct device *dev,
struct device_attribute
*attr, char *buf)
{ … }
static ssize_t wacom_store_speed(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{ … }
static DEVICE_ATTR(speed, DEV_ATTR_RW_PERM,
wacom_show_speed, wacom_store_speed);
static ssize_t wacom_show_remote_mode(struct kobject *kobj,
struct kobj_attribute *kattr,
char *buf, int index)
{ … }
#define DEVICE_EKR_ATTR_GROUP(SET_ID) …
DEVICE_EKR_ATTR_GROUP(…);
DEVICE_EKR_ATTR_GROUP(…);
DEVICE_EKR_ATTR_GROUP(…);
DEVICE_EKR_ATTR_GROUP(…);
DEVICE_EKR_ATTR_GROUP(…);
static int wacom_remote_create_attr_group(struct wacom *wacom, __u32 serial,
int index)
{ … }
static int wacom_cmd_unpair_remote(struct wacom *wacom, unsigned char selector)
{ … }
static ssize_t wacom_store_unpair_remote(struct kobject *kobj,
struct kobj_attribute *attr,
const char *buf, size_t count)
{ … }
static struct kobj_attribute unpair_remote_attr = …;
static const struct attribute *remote_unpair_attrs[] = …;
static void wacom_remotes_destroy(void *data)
{ … }
static int wacom_initialize_remotes(struct wacom *wacom)
{ … }
static struct input_dev *wacom_allocate_input(struct wacom *wacom)
{ … }
static int wacom_allocate_inputs(struct wacom *wacom)
{ … }
static int wacom_setup_inputs(struct wacom *wacom)
{ … }
static int wacom_register_inputs(struct wacom *wacom)
{ … }
static void wacom_set_default_phy(struct wacom_features *features)
{ … }
static void wacom_calculate_res(struct wacom_features *features)
{ … }
void wacom_battery_work(struct work_struct *work)
{ … }
static size_t wacom_compute_pktlen(struct hid_device *hdev)
{ … }
static void wacom_update_name(struct wacom *wacom, const char *suffix)
{ … }
static void wacom_release_resources(struct wacom *wacom)
{ … }
static void wacom_set_shared_values(struct wacom_wac *wacom_wac)
{ … }
static int wacom_parse_and_register(struct wacom *wacom, bool wireless)
{ … }
static void wacom_wireless_work(struct work_struct *work)
{ … }
static void wacom_remote_destroy_battery(struct wacom *wacom, int index)
{ … }
static void wacom_remote_destroy_one(struct wacom *wacom, unsigned int index)
{ … }
static int wacom_remote_create_one(struct wacom *wacom, u32 serial,
unsigned int index)
{ … }
static int wacom_remote_attach_battery(struct wacom *wacom, int index)
{ … }
static void wacom_remote_work(struct work_struct *work)
{ … }
static void wacom_mode_change_work(struct work_struct *work)
{ … }
static int wacom_probe(struct hid_device *hdev,
const struct hid_device_id *id)
{ … }
static void wacom_remove(struct hid_device *hdev)
{ … }
#ifdef CONFIG_PM
static int wacom_resume(struct hid_device *hdev)
{ … }
static int wacom_reset_resume(struct hid_device *hdev)
{ … }
#endif
static struct hid_driver wacom_driver = …;
module_hid_driver(…) …;
MODULE_VERSION(…);
MODULE_AUTHOR(…);
MODULE_DESCRIPTION(…);
MODULE_LICENSE(…) …;