drivers/hid/wacom.h
111
struct wacom;
drivers/hid/wacom.h
116
struct wacom *wacom;
drivers/hid/wacom.h
132
struct wacom *wacom;
drivers/hid/wacom.h
188
struct wacom *wacom = container_of(wacom_wac, struct wacom, wacom_wac);
drivers/hid/wacom.h
192
schedule_work(&wacom->wireless_work);
drivers/hid/wacom.h
195
schedule_work(&wacom->battery_work);
drivers/hid/wacom.h
198
schedule_work(&wacom->remote_work);
drivers/hid/wacom.h
201
schedule_work(&wacom->mode_change_work);
drivers/hid/wacom.h
232
void wacom_setup_device_quirks(struct wacom *wacom);
drivers/hid/wacom.h
246
struct wacom_led *wacom_led_find(struct wacom *wacom, unsigned int group,
drivers/hid/wacom.h
248
struct wacom_led *wacom_led_next(struct wacom *wacom, struct wacom_led *cur);
drivers/hid/wacom.h
250
int wacom_initialize_leds(struct wacom *wacom);
drivers/hid/wacom_sys.c
1004
static int wacom_led_putimage(struct wacom *wacom, int button_id, u8 xfer_id,
drivers/hid/wacom_sys.c
1018
retval = wacom_set_report(wacom->hdev, HID_FEATURE_REPORT, buf, 2,
drivers/hid/wacom_sys.c
1029
retval = wacom_set_report(wacom->hdev, HID_FEATURE_REPORT,
drivers/hid/wacom_sys.c
1038
wacom_set_report(wacom->hdev, HID_FEATURE_REPORT, buf, 2,
drivers/hid/wacom_sys.c
1050
struct wacom *wacom = hid_get_drvdata(hdev);
drivers/hid/wacom_sys.c
1058
mutex_lock(&wacom->lock);
drivers/hid/wacom_sys.c
106
struct wacom *wacom = hid_get_drvdata(hdev);
drivers/hid/wacom_sys.c
1060
wacom->led.groups[set_id].select = id & 0x3;
drivers/hid/wacom_sys.c
1061
err = wacom_led_control(wacom);
drivers/hid/wacom_sys.c
1063
mutex_unlock(&wacom->lock);
drivers/hid/wacom_sys.c
107
struct wacom_wac *wacom_wac = &wacom->wacom_wac;
drivers/hid/wacom_sys.c
1078
struct wacom *wacom = hid_get_drvdata(hdev); \
drivers/hid/wacom_sys.c
1080
wacom->led.groups[SET_ID].select); \
drivers/hid/wacom_sys.c
1089
static ssize_t wacom_luminance_store(struct wacom *wacom, u8 *dest,
drivers/hid/wacom_sys.c
1099
mutex_lock(&wacom->lock);
drivers/hid/wacom_sys.c
1102
for (unsigned int i = 0; i < wacom->led.count; i++) {
drivers/hid/wacom_sys.c
1103
struct wacom_group_leds *group = &wacom->led.groups[i];
drivers/hid/wacom_sys.c
1106
if (dest == &wacom->led.llv)
drivers/hid/wacom_sys.c
1108
else if (dest == &wacom->led.hlv)
drivers/hid/wacom_sys.c
1113
err = wacom_led_control(wacom);
drivers/hid/wacom_sys.c
1115
mutex_unlock(&wacom->lock);
drivers/hid/wacom_sys.c
1125
struct wacom *wacom = hid_get_drvdata(hdev); \
drivers/hid/wacom_sys.c
1127
return wacom_luminance_store(wacom, &wacom->led.field, \
drivers/hid/wacom_sys.c
1133
struct wacom *wacom = dev_get_drvdata(dev); \
drivers/hid/wacom_sys.c
1134
return scnprintf(buf, PAGE_SIZE, "%d\n", wacom->led.field); \
drivers/hid/wacom_sys.c
1148
struct wacom *wacom = hid_get_drvdata(hdev);
drivers/hid/wacom_sys.c
1164
mutex_lock(&wacom->lock);
drivers/hid/wacom_sys.c
1166
err = wacom_led_putimage(wacom, button_id, xfer_id, len, buf);
drivers/hid/wacom_sys.c
1168
mutex_unlock(&wacom->lock);
drivers/hid/wacom_sys.c
1260
static int __wacom_devm_sysfs_create_group(struct wacom *wacom,
drivers/hid/wacom_sys.c
1282
devres_add(&wacom->hdev->dev, devres);
drivers/hid/wacom_sys.c
1287
static int wacom_devm_sysfs_create_group(struct wacom *wacom,
drivers/hid/wacom_sys.c
1290
return __wacom_devm_sysfs_create_group(wacom, &wacom->hdev->dev.kobj,
drivers/hid/wacom_sys.c
1301
static int wacom_devm_kfifo_alloc(struct wacom *wacom)
drivers/hid/wacom_sys.c
1303
struct wacom_wac *wacom_wac = &wacom->wacom_wac;
drivers/hid/wacom_sys.c
1321
devres_add(&wacom->hdev->dev, pen_fifo);
drivers/hid/wacom_sys.c
1329
struct wacom *wacom = led->wacom;
drivers/hid/wacom_sys.c
1331
if (wacom->led.max_hlv)
drivers/hid/wacom_sys.c
1332
return wacom_rescale(led->hlv, wacom->led.max_hlv, LED_FULL);
drivers/hid/wacom_sys.c
1334
if (wacom->led.max_llv)
drivers/hid/wacom_sys.c
1335
return wacom_rescale(led->llv, wacom->led.max_llv, LED_FULL);
drivers/hid/wacom_sys.c
1344
struct wacom *wacom = led->wacom;
drivers/hid/wacom_sys.c
1346
if (wacom->led.groups[led->group].select != led->id)
drivers/hid/wacom_sys.c
1356
struct wacom *wacom = led->wacom;
drivers/hid/wacom_sys.c
1359
mutex_lock(&wacom->lock);
drivers/hid/wacom_sys.c
1361
if (!wacom->led.groups || (brightness == LED_OFF &&
drivers/hid/wacom_sys.c
1362
wacom->led.groups[led->group].select != led->id)) {
drivers/hid/wacom_sys.c
1367
led->llv = wacom->led.llv = wacom_rescale(brightness, LED_FULL, wacom->led.max_llv);
drivers/hid/wacom_sys.c
1368
led->hlv = wacom->led.hlv = wacom_rescale(brightness, LED_FULL, wacom->led.max_hlv);
drivers/hid/wacom_sys.c
1370
wacom->led.groups[led->group].select = led->id;
drivers/hid/wacom_sys.c
1372
error = wacom_led_control(wacom);
drivers/hid/wacom_sys.c
1375
mutex_unlock(&wacom->lock);
drivers/hid/wacom_sys.c
1385
static int wacom_led_register_one(struct device *dev, struct wacom *wacom,
drivers/hid/wacom_sys.c
1402
led->wacom = wacom;
drivers/hid/wacom_sys.c
1403
led->llv = wacom->led.llv;
drivers/hid/wacom_sys.c
1404
led->hlv = wacom->led.hlv;
drivers/hid/wacom_sys.c
1418
if (id == wacom->led.groups[group].select)
drivers/hid/wacom_sys.c
1422
hid_err(wacom->hdev,
drivers/hid/wacom_sys.c
1431
hid_err(wacom->hdev,
drivers/hid/wacom_sys.c
1449
struct wacom *wacom,
drivers/hid/wacom_sys.c
1456
if (group_id >= wacom->led.count || count <= 0)
drivers/hid/wacom_sys.c
1459
if (!devres_open_group(dev, &wacom->led.groups[group_id], GFP_KERNEL))
drivers/hid/wacom_sys.c
1468
wacom->led.groups[group_id].leds = leds;
drivers/hid/wacom_sys.c
1469
wacom->led.groups[group_id].count = count;
drivers/hid/wacom_sys.c
1472
error = wacom_led_register_one(dev, wacom, &leds[i],
drivers/hid/wacom_sys.c
1478
wacom->led.groups[group_id].dev = dev;
drivers/hid/wacom_sys.c
1480
devres_close_group(dev, &wacom->led.groups[group_id]);
drivers/hid/wacom_sys.c
1491
error = devm_add_action_or_reset(&wacom->hdev->dev,
drivers/hid/wacom_sys.c
1493
&wacom->led.groups[group_id]);
drivers/hid/wacom_sys.c
1500
devres_release_group(dev, &wacom->led.groups[group_id]);
drivers/hid/wacom_sys.c
1504
struct wacom_led *wacom_led_find(struct wacom *wacom, unsigned int group_id,
drivers/hid/wacom_sys.c
1509
if (group_id >= wacom->led.count)
drivers/hid/wacom_sys.c
1512
group = &wacom->led.groups[group_id];
drivers/hid/wacom_sys.c
1528
struct wacom_led *wacom_led_next(struct wacom *wacom, struct wacom_led *cur)
drivers/hid/wacom_sys.c
1533
if (!wacom || !cur)
drivers/hid/wacom_sys.c
1540
next_led = wacom_led_find(wacom, group, ++next);
drivers/hid/wacom_sys.c
1550
struct wacom *wacom = data;
drivers/hid/wacom_sys.c
1552
wacom->led.groups = NULL;
drivers/hid/wacom_sys.c
1553
wacom->led.count = 0;
drivers/hid/wacom_sys.c
1556
static int wacom_led_groups_allocate(struct wacom *wacom, int count)
drivers/hid/wacom_sys.c
1558
struct device *dev = &wacom->hdev->dev;
drivers/hid/wacom_sys.c
1567
error = devm_add_action_or_reset(dev, wacom_led_groups_release, wacom);
drivers/hid/wacom_sys.c
1571
wacom->led.groups = groups;
drivers/hid/wacom_sys.c
1572
wacom->led.count = count;
drivers/hid/wacom_sys.c
1577
static int wacom_leds_alloc_and_register(struct wacom *wacom, int group_count,
drivers/hid/wacom_sys.c
1583
if (!wacom->wacom_wac.pad_input)
drivers/hid/wacom_sys.c
1586
dev = &wacom->wacom_wac.pad_input->dev;
drivers/hid/wacom_sys.c
1588
error = wacom_led_groups_allocate(wacom, group_count);
drivers/hid/wacom_sys.c
1593
error = wacom_led_groups_alloc_and_register_one(dev, wacom, i,
drivers/hid/wacom_sys.c
1603
int wacom_initialize_leds(struct wacom *wacom)
drivers/hid/wacom_sys.c
1607
if (!(wacom->wacom_wac.features.device_type & WACOM_DEVICETYPE_PAD))
drivers/hid/wacom_sys.c
1611
switch (wacom->wacom_wac.features.type) {
drivers/hid/wacom_sys.c
1613
if (!wacom->generic_has_leds)
drivers/hid/wacom_sys.c
1615
wacom->led.llv = 100;
drivers/hid/wacom_sys.c
1616
wacom->led.max_llv = 100;
drivers/hid/wacom_sys.c
1618
error = wacom_leds_alloc_and_register(wacom, 1, 4, false);
drivers/hid/wacom_sys.c
1620
hid_err(wacom->hdev,
drivers/hid/wacom_sys.c
1625
error = wacom_devm_sysfs_create_group(wacom,
drivers/hid/wacom_sys.c
1633
wacom->led.llv = 10;
drivers/hid/wacom_sys.c
1634
wacom->led.hlv = 20;
drivers/hid/wacom_sys.c
1635
wacom->led.max_llv = 127;
drivers/hid/wacom_sys.c
1636
wacom->led.max_hlv = 127;
drivers/hid/wacom_sys.c
1637
wacom->led.img_lum = 10;
drivers/hid/wacom_sys.c
1639
error = wacom_leds_alloc_and_register(wacom, 1, 4, false);
drivers/hid/wacom_sys.c
1641
hid_err(wacom->hdev,
drivers/hid/wacom_sys.c
1646
error = wacom_devm_sysfs_create_group(wacom,
drivers/hid/wacom_sys.c
1652
wacom->led.llv = 0;
drivers/hid/wacom_sys.c
1653
wacom->led.hlv = 0;
drivers/hid/wacom_sys.c
1654
wacom->led.img_lum = 0;
drivers/hid/wacom_sys.c
1656
error = wacom_leds_alloc_and_register(wacom, 2, 4, false);
drivers/hid/wacom_sys.c
1658
hid_err(wacom->hdev,
drivers/hid/wacom_sys.c
1663
error = wacom_devm_sysfs_create_group(wacom,
drivers/hid/wacom_sys.c
1673
wacom->led.llv = 32;
drivers/hid/wacom_sys.c
1674
wacom->led.max_llv = 96;
drivers/hid/wacom_sys.c
1676
error = wacom_leds_alloc_and_register(wacom, 1, 4, false);
drivers/hid/wacom_sys.c
1678
hid_err(wacom->hdev,
drivers/hid/wacom_sys.c
1683
error = wacom_devm_sysfs_create_group(wacom,
drivers/hid/wacom_sys.c
1688
wacom->led.llv = 50;
drivers/hid/wacom_sys.c
1689
wacom->led.max_llv = 100;
drivers/hid/wacom_sys.c
1690
error = wacom_leds_alloc_and_register(wacom, 1, 4, false);
drivers/hid/wacom_sys.c
1692
hid_err(wacom->hdev,
drivers/hid/wacom_sys.c
1699
wacom->led.llv = 255;
drivers/hid/wacom_sys.c
1700
wacom->led.max_llv = 255;
drivers/hid/wacom_sys.c
1701
error = wacom_led_groups_allocate(wacom, 5);
drivers/hid/wacom_sys.c
1703
hid_err(wacom->hdev,
drivers/hid/wacom_sys.c
1714
hid_err(wacom->hdev,
drivers/hid/wacom_sys.c
1724
struct wacom *wacom = container_of(work, struct wacom, init_work.work);
drivers/hid/wacom_sys.c
1726
_wacom_query_tablet_data(wacom);
drivers/hid/wacom_sys.c
1727
wacom_led_control(wacom);
drivers/hid/wacom_sys.c
1730
static void wacom_query_tablet_data(struct wacom *wacom)
drivers/hid/wacom_sys.c
1732
schedule_delayed_work(&wacom->init_work, msecs_to_jiffies(1000));
drivers/hid/wacom_sys.c
174
struct wacom *wacom = hid_get_drvdata(hdev);
drivers/hid/wacom_sys.c
1752
val->strval = battery->wacom->wacom_wac.name;
drivers/hid/wacom_sys.c
176
if (wacom->wacom_wac.features.type == BOOTLOADER)
drivers/hid/wacom_sys.c
1784
static int __wacom_initialize_battery(struct wacom *wacom,
drivers/hid/wacom_sys.c
1788
struct device *dev = &wacom->hdev->dev;
drivers/hid/wacom_sys.c
1798
battery->wacom = wacom;
drivers/hid/wacom_sys.c
1816
power_supply_powers(ps_bat, &wacom->hdev->dev);
drivers/hid/wacom_sys.c
182
wacom->wacom_wac.data = raw_data;
drivers/hid/wacom_sys.c
1828
static int wacom_initialize_battery(struct wacom *wacom)
drivers/hid/wacom_sys.c
1830
if (wacom->wacom_wac.features.quirks & WACOM_QUIRK_BATTERY)
drivers/hid/wacom_sys.c
1831
return __wacom_initialize_battery(wacom, &wacom->battery);
drivers/hid/wacom_sys.c
1836
static void wacom_destroy_battery(struct wacom *wacom)
drivers/hid/wacom_sys.c
1838
if (wacom->battery.battery) {
drivers/hid/wacom_sys.c
1839
devres_release_group(&wacom->hdev->dev,
drivers/hid/wacom_sys.c
184
wacom_wac_irq(&wacom->wacom_wac, size);
drivers/hid/wacom_sys.c
1840
&wacom->battery.bat_desc);
drivers/hid/wacom_sys.c
1841
wacom->battery.battery = NULL;
drivers/hid/wacom_sys.c
1847
struct wacom *wacom = container_of(work, struct wacom, aes_battery_work.work);
drivers/hid/wacom_sys.c
1849
wacom_destroy_battery(wacom);
drivers/hid/wacom_sys.c
1857
struct wacom *wacom = hid_get_drvdata(hdev);
drivers/hid/wacom_sys.c
1859
return sysfs_emit(buf, "%i\n", wacom->wacom_wac.bt_high_speed);
drivers/hid/wacom_sys.c
1867
struct wacom *wacom = hid_get_drvdata(hdev);
drivers/hid/wacom_sys.c
1876
wacom_bt_query_tablet_data(hdev, new_speed, &wacom->wacom_wac.features);
drivers/hid/wacom_sys.c
1891
struct wacom *wacom = hid_get_drvdata(hdev);
drivers/hid/wacom_sys.c
1894
mode = wacom->led.groups[index].select;
drivers/hid/wacom_sys.c
191
struct wacom *wacom = input_get_drvdata(dev);
drivers/hid/wacom_sys.c
1924
static int wacom_remote_create_attr_group(struct wacom *wacom, __u32 serial,
drivers/hid/wacom_sys.c
1928
struct wacom_remote *remote = wacom->remote;
drivers/hid/wacom_sys.c
193
return hid_hw_open(wacom->hdev);
drivers/hid/wacom_sys.c
1930
remote->remotes[index].group.name = devm_kasprintf(&wacom->hdev->dev,
drivers/hid/wacom_sys.c
1936
error = __wacom_devm_sysfs_create_group(wacom, remote->remote_dir,
drivers/hid/wacom_sys.c
1940
hid_err(wacom->hdev,
drivers/hid/wacom_sys.c
1948
static int wacom_cmd_unpair_remote(struct wacom *wacom, unsigned char selector)
drivers/hid/wacom_sys.c
1961
retval = wacom_set_report(wacom->hdev, HID_OUTPUT_REPORT, buf,
drivers/hid/wacom_sys.c
1975
struct wacom *wacom = hid_get_drvdata(hdev);
drivers/hid/wacom_sys.c
198
struct wacom *wacom = input_get_drvdata(dev);
drivers/hid/wacom_sys.c
1981
hid_info(wacom->hdev, "remote: unrecognized unpair code: %s\n",
drivers/hid/wacom_sys.c
1986
mutex_lock(&wacom->lock);
drivers/hid/wacom_sys.c
1988
err = wacom_cmd_unpair_remote(wacom, selector);
drivers/hid/wacom_sys.c
1989
mutex_unlock(&wacom->lock);
drivers/hid/wacom_sys.c
2006
struct wacom *wacom = data;
drivers/hid/wacom_sys.c
2007
struct wacom_remote *remote = wacom->remote;
drivers/hid/wacom_sys.c
2014
wacom->remote = NULL;
drivers/hid/wacom_sys.c
2017
static int wacom_initialize_remotes(struct wacom *wacom)
drivers/hid/wacom_sys.c
2023
if (wacom->wacom_wac.features.type != REMOTE)
drivers/hid/wacom_sys.c
2026
remote = devm_kzalloc(&wacom->hdev->dev, sizeof(*wacom->remote),
drivers/hid/wacom_sys.c
2031
wacom->remote = remote;
drivers/hid/wacom_sys.c
2039
hid_err(wacom->hdev, "failed allocating remote_fifo\n");
drivers/hid/wacom_sys.c
204
if (wacom->hdev)
drivers/hid/wacom_sys.c
205
hid_hw_close(wacom->hdev);
drivers/hid/wacom_sys.c
2050
&wacom->hdev->dev.kobj);
drivers/hid/wacom_sys.c
2059
hid_err(wacom->hdev,
drivers/hid/wacom_sys.c
2067
wacom->led.groups[i].select = WACOM_STATUS_UNKNOWN;
drivers/hid/wacom_sys.c
2071
error = devm_add_action_or_reset(&wacom->hdev->dev,
drivers/hid/wacom_sys.c
2072
wacom_remotes_destroy, wacom);
drivers/hid/wacom_sys.c
2079
static struct input_dev *wacom_allocate_input(struct wacom *wacom)
drivers/hid/wacom_sys.c
2082
struct hid_device *hdev = wacom->hdev;
drivers/hid/wacom_sys.c
2083
struct wacom_wac *wacom_wac = &(wacom->wacom_wac);
drivers/hid/wacom_sys.c
2099
input_set_drvdata(input_dev, wacom);
drivers/hid/wacom_sys.c
2104
static int wacom_allocate_inputs(struct wacom *wacom)
drivers/hid/wacom_sys.c
2106
struct wacom_wac *wacom_wac = &(wacom->wacom_wac);
drivers/hid/wacom_sys.c
2108
wacom_wac->pen_input = wacom_allocate_input(wacom);
drivers/hid/wacom_sys.c
2109
wacom_wac->touch_input = wacom_allocate_input(wacom);
drivers/hid/wacom_sys.c
2110
wacom_wac->pad_input = wacom_allocate_input(wacom);
drivers/hid/wacom_sys.c
2123
static int wacom_setup_inputs(struct wacom *wacom)
drivers/hid/wacom_sys.c
2126
struct wacom_wac *wacom_wac = &(wacom->wacom_wac);
drivers/hid/wacom_sys.c
2163
static int wacom_register_inputs(struct wacom *wacom)
drivers/hid/wacom_sys.c
2166
struct wacom_wac *wacom_wac = &(wacom->wacom_wac);
drivers/hid/wacom_sys.c
2235
struct wacom *wacom = container_of(work, struct wacom, battery_work);
drivers/hid/wacom_sys.c
2237
if ((wacom->wacom_wac.features.quirks & WACOM_QUIRK_BATTERY) &&
drivers/hid/wacom_sys.c
2238
!wacom->battery.battery) {
drivers/hid/wacom_sys.c
2239
wacom_initialize_battery(wacom);
drivers/hid/wacom_sys.c
2241
else if (!(wacom->wacom_wac.features.quirks & WACOM_QUIRK_BATTERY) &&
drivers/hid/wacom_sys.c
2242
wacom->battery.battery) {
drivers/hid/wacom_sys.c
2243
wacom_destroy_battery(wacom);
drivers/hid/wacom_sys.c
2264
static void wacom_update_name(struct wacom *wacom, const char *suffix)
drivers/hid/wacom_sys.c
2266
struct wacom_wac *wacom_wac = &wacom->wacom_wac;
drivers/hid/wacom_sys.c
227
struct wacom *wacom = hid_get_drvdata(hdev);
drivers/hid/wacom_sys.c
2272
char *product_name = wacom->hdev->name;
drivers/hid/wacom_sys.c
2274
if (hid_is_usb(wacom->hdev)) {
drivers/hid/wacom_sys.c
2275
struct usb_interface *intf = to_usb_interface(wacom->hdev->dev.parent);
drivers/hid/wacom_sys.c
228
struct wacom_features *features = &wacom->wacom_wac.features;
drivers/hid/wacom_sys.c
2281
if (wacom->hdev->bus == BUS_I2C) {
drivers/hid/wacom_sys.c
2283
features->name, wacom->hdev->product);
drivers/hid/wacom_sys.c
2288
hid_warn(wacom->hdev, "String overflow while assembling device name");
drivers/hid/wacom_sys.c
2308
hid_warn(wacom->hdev, "String overflow while assembling device name");
drivers/hid/wacom_sys.c
2324
static void wacom_release_resources(struct wacom *wacom)
drivers/hid/wacom_sys.c
2326
struct hid_device *hdev = wacom->hdev;
drivers/hid/wacom_sys.c
2328
if (!wacom->resources)
drivers/hid/wacom_sys.c
2331
devres_release_group(&hdev->dev, wacom);
drivers/hid/wacom_sys.c
2333
wacom->resources = false;
drivers/hid/wacom_sys.c
2335
wacom->wacom_wac.pen_input = NULL;
drivers/hid/wacom_sys.c
2336
wacom->wacom_wac.touch_input = NULL;
drivers/hid/wacom_sys.c
2337
wacom->wacom_wac.pad_input = NULL;
drivers/hid/wacom_sys.c
2366
static int wacom_parse_and_register(struct wacom *wacom, bool wireless)
drivers/hid/wacom_sys.c
2368
struct wacom_wac *wacom_wac = &wacom->wacom_wac;
drivers/hid/wacom_sys.c
2370
struct hid_device *hdev = wacom->hdev;
drivers/hid/wacom_sys.c
2378
if (!devres_open_group(&hdev->dev, wacom, GFP_KERNEL))
drivers/hid/wacom_sys.c
238
wacom->wacom_wac.mode_report = field->report->id;
drivers/hid/wacom_sys.c
2381
error = wacom_devm_kfifo_alloc(wacom);
drivers/hid/wacom_sys.c
2385
wacom->resources = true;
drivers/hid/wacom_sys.c
2387
error = wacom_allocate_inputs(wacom);
drivers/hid/wacom_sys.c
239
wacom->wacom_wac.mode_value = 2;
drivers/hid/wacom_sys.c
2411
wacom_setup_device_quirks(wacom);
drivers/hid/wacom_sys.c
2429
wacom_update_name(wacom, wireless ? " (WL)" : "");
drivers/hid/wacom_sys.c
2443
error = wacom_setup_inputs(wacom);
drivers/hid/wacom_sys.c
2457
error = wacom_register_inputs(wacom);
drivers/hid/wacom_sys.c
2461
if (wacom->wacom_wac.features.device_type & WACOM_DEVICETYPE_PAD) {
drivers/hid/wacom_sys.c
2462
error = wacom_initialize_leds(wacom);
drivers/hid/wacom_sys.c
2466
error = wacom_initialize_remotes(wacom);
drivers/hid/wacom_sys.c
2473
wacom_query_tablet_data(wacom);
drivers/hid/wacom_sys.c
2479
cancel_delayed_work_sync(&wacom->init_work);
drivers/hid/wacom_sys.c
2480
_wacom_query_tablet_data(wacom);
drivers/hid/wacom_sys.c
2494
devres_close_group(&hdev->dev, wacom);
drivers/hid/wacom_sys.c
2501
wacom_release_resources(wacom);
drivers/hid/wacom_sys.c
2507
struct wacom *wacom = container_of(work, struct wacom, wireless_work);
drivers/hid/wacom_sys.c
2508
struct usb_device *usbdev = wacom->usbdev;
drivers/hid/wacom_sys.c
2509
struct wacom_wac *wacom_wac = &wacom->wacom_wac;
drivers/hid/wacom_sys.c
2511
struct wacom *wacom1, *wacom2;
drivers/hid/wacom_sys.c
2520
wacom_destroy_battery(wacom);
drivers/hid/wacom_sys.c
2538
hid_info(wacom->hdev, "wireless tablet disconnected\n");
drivers/hid/wacom_sys.c
2542
hid_info(wacom->hdev, "wireless tablet connected with PID %x\n",
drivers/hid/wacom_sys.c
2553
hid_info(wacom->hdev, "ignoring unknown PID.\n");
drivers/hid/wacom_sys.c
2582
hid_warn(wacom->hdev, "String overflow while assembling device name");
drivers/hid/wacom_sys.c
2594
static void wacom_remote_destroy_battery(struct wacom *wacom, int index)
drivers/hid/wacom_sys.c
2596
struct wacom_remote *remote = wacom->remote;
drivers/hid/wacom_sys.c
2599
devres_release_group(&wacom->hdev->dev,
drivers/hid/wacom_sys.c
2606
static void wacom_remote_destroy_one(struct wacom *wacom, unsigned int index)
drivers/hid/wacom_sys.c
2608
struct wacom_remote *remote = wacom->remote;
drivers/hid/wacom_sys.c
2620
wacom_remote_destroy_battery(wacom, i);
drivers/hid/wacom_sys.c
2623
devres_release_group(&wacom->hdev->dev,
drivers/hid/wacom_sys.c
2628
wacom->led.groups[i].select = WACOM_STATUS_UNKNOWN;
drivers/hid/wacom_sys.c
2633
static int wacom_remote_create_one(struct wacom *wacom, u32 serial,
drivers/hid/wacom_sys.c
2636
struct wacom_remote *remote = wacom->remote;
drivers/hid/wacom_sys.c
2637
struct device *dev = &wacom->hdev->dev;
drivers/hid/wacom_sys.c
2656
error = wacom_remote_create_attr_group(wacom, serial, index);
drivers/hid/wacom_sys.c
2660
remote->remotes[index].input = wacom_allocate_input(wacom);
drivers/hid/wacom_sys.c
2666
remote->remotes[index].input->name = wacom->wacom_wac.pad_name;
drivers/hid/wacom_sys.c
2674
&wacom->wacom_wac);
drivers/hid/wacom_sys.c
2686
wacom, index, 3, true);
drivers/hid/wacom_sys.c
2701
static int wacom_remote_attach_battery(struct wacom *wacom, int index)
drivers/hid/wacom_sys.c
2703
struct wacom_remote *remote = wacom->remote;
drivers/hid/wacom_sys.c
2715
if (wacom->led.groups[index].select == WACOM_STATUS_UNKNOWN)
drivers/hid/wacom_sys.c
2718
error = __wacom_initialize_battery(wacom,
drivers/hid/wacom_sys.c
2719
&wacom->remote->remotes[index].battery);
drivers/hid/wacom_sys.c
2728
struct wacom *wacom = container_of(work, struct wacom, remote_work);
drivers/hid/wacom_sys.c
2729
struct wacom_remote *remote = wacom->remote;
drivers/hid/wacom_sys.c
2743
hid_err(wacom->hdev,
drivers/hid/wacom_sys.c
2750
wacom_schedule_work(&wacom->wacom_wac, WACOM_WORKER_REMOTE);
drivers/hid/wacom_sys.c
2760
wacom_remote_destroy_battery(wacom, i);
drivers/hid/wacom_sys.c
2763
wacom_remote_attach_battery(wacom, i);
drivers/hid/wacom_sys.c
2768
wacom_remote_destroy_one(wacom, i);
drivers/hid/wacom_sys.c
2770
wacom_remote_create_one(wacom, work_serial, i);
drivers/hid/wacom_sys.c
2773
wacom_remote_destroy_one(wacom, i);
drivers/hid/wacom_sys.c
2780
struct wacom *wacom = container_of(work, struct wacom, mode_change_work);
drivers/hid/wacom_sys.c
2781
struct wacom_shared *shared = wacom->wacom_wac.shared;
drivers/hid/wacom_sys.c
2782
struct wacom *wacom1 = NULL;
drivers/hid/wacom_sys.c
2783
struct wacom *wacom2 = NULL;
drivers/hid/wacom_sys.c
2784
bool is_direct = wacom->wacom_wac.is_direct_mode;
drivers/hid/wacom_sys.c
2821
struct wacom *wacom;
drivers/hid/wacom_sys.c
2834
wacom = devm_kzalloc(&hdev->dev, sizeof(struct wacom), GFP_KERNEL);
drivers/hid/wacom_sys.c
2835
if (!wacom)
drivers/hid/wacom_sys.c
2838
hid_set_drvdata(hdev, wacom);
drivers/hid/wacom_sys.c
2839
wacom->hdev = hdev;
drivers/hid/wacom_sys.c
2841
wacom_wac = &wacom->wacom_wac;
drivers/hid/wacom_sys.c
2855
wacom->usbdev = dev;
drivers/hid/wacom_sys.c
2856
wacom->intf = intf;
drivers/hid/wacom_sys.c
2859
mutex_init(&wacom->lock);
drivers/hid/wacom_sys.c
2860
INIT_DELAYED_WORK(&wacom->init_work, wacom_init_work);
drivers/hid/wacom_sys.c
2861
INIT_DELAYED_WORK(&wacom->aes_battery_work, wacom_aes_battery_handler);
drivers/hid/wacom_sys.c
2862
INIT_WORK(&wacom->wireless_work, wacom_wireless_work);
drivers/hid/wacom_sys.c
2863
INIT_WORK(&wacom->battery_work, wacom_battery_work);
drivers/hid/wacom_sys.c
2864
INIT_WORK(&wacom->remote_work, wacom_remote_work);
drivers/hid/wacom_sys.c
2865
INIT_WORK(&wacom->mode_change_work, wacom_mode_change_work);
drivers/hid/wacom_sys.c
2866
timer_setup(&wacom->idleprox_timer, &wacom_idleprox_timeout, TIMER_DEFERRABLE);
drivers/hid/wacom_sys.c
2880
error = wacom_parse_and_register(wacom, false);
drivers/hid/wacom_sys.c
2898
struct wacom *wacom = hid_get_drvdata(hdev);
drivers/hid/wacom_sys.c
2899
struct wacom_wac *wacom_wac = &wacom->wacom_wac;
drivers/hid/wacom_sys.c
2907
cancel_delayed_work_sync(&wacom->init_work);
drivers/hid/wacom_sys.c
2908
cancel_delayed_work_sync(&wacom->aes_battery_work);
drivers/hid/wacom_sys.c
2909
cancel_work_sync(&wacom->wireless_work);
drivers/hid/wacom_sys.c
2910
cancel_work_sync(&wacom->battery_work);
drivers/hid/wacom_sys.c
2911
cancel_work_sync(&wacom->remote_work);
drivers/hid/wacom_sys.c
2912
cancel_work_sync(&wacom->mode_change_work);
drivers/hid/wacom_sys.c
2913
timer_delete_sync(&wacom->idleprox_timer);
drivers/hid/wacom_sys.c
2918
wacom_led_groups_release(wacom);
drivers/hid/wacom_sys.c
2920
if (wacom->wacom_wac.features.type != REMOTE)
drivers/hid/wacom_sys.c
2921
wacom_release_resources(wacom);
drivers/hid/wacom_sys.c
2926
struct wacom *wacom = hid_get_drvdata(hdev);
drivers/hid/wacom_sys.c
2928
mutex_lock(&wacom->lock);
drivers/hid/wacom_sys.c
2931
_wacom_query_tablet_data(wacom);
drivers/hid/wacom_sys.c
2932
wacom_led_control(wacom);
drivers/hid/wacom_sys.c
2934
mutex_unlock(&wacom->lock);
drivers/hid/wacom_sys.c
310
struct wacom *wacom = hid_get_drvdata(hdev);
drivers/hid/wacom_sys.c
311
struct wacom_features *features = &wacom->wacom_wac.features;
drivers/hid/wacom_sys.c
312
struct hid_data *hid_data = &wacom->wacom_wac.hid_data;
drivers/hid/wacom_sys.c
322
wacom->generic_has_leds = true;
drivers/hid/wacom_sys.c
365
wacom->wacom_wac.mode_report = field->report->id;
drivers/hid/wacom_sys.c
366
wacom->wacom_wac.mode_value = 0;
drivers/hid/wacom_sys.c
371
wacom->wacom_wac.mode_report = field->report->id;
drivers/hid/wacom_sys.c
372
wacom->wacom_wac.mode_value = 2;
drivers/hid/wacom_sys.c
380
wacom->wacom_wac.mode_report = field->report->id;
drivers/hid/wacom_sys.c
381
wacom->wacom_wac.mode_value = 0;
drivers/hid/wacom_sys.c
443
struct wacom *wacom = hid_get_drvdata(hdev);
drivers/hid/wacom_sys.c
444
struct wacom_features *features = &wacom->wacom_wac.features;
drivers/hid/wacom_sys.c
499
struct wacom *wacom = hid_get_drvdata(hdev);
drivers/hid/wacom_sys.c
500
struct wacom_wac *wacom_wac = &wacom->wacom_wac;
drivers/hid/wacom_sys.c
564
struct wacom *wacom = hid_get_drvdata(hdev);
drivers/hid/wacom_sys.c
565
struct hid_data *hid_data = &wacom->wacom_wac.hid_data;
drivers/hid/wacom_sys.c
625
struct wacom *wacom = hid_get_drvdata(hdev);
drivers/hid/wacom_sys.c
644
wacom->wacom_wac.bt_high_speed = speed;
drivers/hid/wacom_sys.c
658
wacom->wacom_wac.bt_features &= ~0x20;
drivers/hid/wacom_sys.c
660
wacom->wacom_wac.bt_features |= 0x20;
drivers/hid/wacom_sys.c
663
rep_data[1] = wacom->wacom_wac.bt_features;
drivers/hid/wacom_sys.c
668
wacom->wacom_wac.bt_high_speed = speed;
drivers/hid/wacom_sys.c
682
static int _wacom_query_tablet_data(struct wacom *wacom)
drivers/hid/wacom_sys.c
684
struct hid_device *hdev = wacom->hdev;
drivers/hid/wacom_sys.c
685
struct wacom_wac *wacom_wac = &wacom->wacom_wac;
drivers/hid/wacom_sys.c
726
struct wacom *wacom = hid_get_drvdata(hdev);
drivers/hid/wacom_sys.c
727
struct usb_interface *intf = wacom->intf;
drivers/hid/wacom_sys.c
766
struct wacom *wacom = hid_get_drvdata(hdev);
drivers/hid/wacom_sys.c
767
struct wacom_features *features = &wacom->wacom_wac.features;
drivers/hid/wacom_sys.c
768
struct wacom *sibling_wacom = hid_get_drvdata(sibling);
drivers/hid/wacom_sys.c
866
struct wacom *wacom = res;
drivers/hid/wacom_sys.c
868
struct wacom_wac *wacom_wac = &wacom->wacom_wac;
drivers/hid/wacom_sys.c
874
if (wacom_wac->shared->touch == wacom->hdev)
drivers/hid/wacom_sys.c
876
else if (wacom_wac->shared->pen == wacom->hdev)
drivers/hid/wacom_sys.c
886
struct wacom *wacom = hid_get_drvdata(hdev);
drivers/hid/wacom_sys.c
887
struct wacom_wac *wacom_wac = &wacom->wacom_wac;
drivers/hid/wacom_sys.c
910
retval = devm_add_action_or_reset(&hdev->dev, wacom_remove_shared_data, wacom);
drivers/hid/wacom_sys.c
922
static int wacom_led_control(struct wacom *wacom)
drivers/hid/wacom_sys.c
929
if (!wacom->led.groups)
drivers/hid/wacom_sys.c
932
if (wacom->wacom_wac.features.type == REMOTE)
drivers/hid/wacom_sys.c
935
if (wacom->wacom_wac.pid) { /* wireless connected */
drivers/hid/wacom_sys.c
939
else if (wacom->wacom_wac.features.type == INTUOSP2_BT) {
drivers/hid/wacom_sys.c
947
if (wacom->wacom_wac.features.type == HID_GENERIC) {
drivers/hid/wacom_sys.c
949
buf[1] = wacom->led.llv;
drivers/hid/wacom_sys.c
950
buf[2] = wacom->led.groups[0].select & 0x03;
drivers/hid/wacom_sys.c
952
} else if ((wacom->wacom_wac.features.type >= INTUOS5S &&
drivers/hid/wacom_sys.c
953
wacom->wacom_wac.features.type <= INTUOSPL)) {
drivers/hid/wacom_sys.c
959
int ring_led = wacom->led.groups[0].select & 0x03;
drivers/hid/wacom_sys.c
960
int ring_lum = (((wacom->led.llv & 0x60) >> 5) - 1) & 0x03;
drivers/hid/wacom_sys.c
965
if (wacom->wacom_wac.pid) {
drivers/hid/wacom_sys.c
966
wacom_get_report(wacom->hdev, HID_FEATURE_REPORT,
drivers/hid/wacom_sys.c
973
else if (wacom->wacom_wac.features.type == INTUOSP2_BT) {
drivers/hid/wacom_sys.c
980
buf[9] = wacom->led.llv;
drivers/hid/wacom_sys.c
981
buf[10] = wacom->led.groups[0].select & 0x03;
drivers/hid/wacom_sys.c
984
int led = wacom->led.groups[0].select | 0x4;
drivers/hid/wacom_sys.c
986
if (wacom->wacom_wac.features.type == WACOM_21UX2 ||
drivers/hid/wacom_sys.c
987
wacom->wacom_wac.features.type == WACOM_24HD)
drivers/hid/wacom_sys.c
988
led |= (wacom->led.groups[1].select << 4) | 0x40;
drivers/hid/wacom_sys.c
992
buf[2] = wacom->led.llv;
drivers/hid/wacom_sys.c
993
buf[3] = wacom->led.hlv;
drivers/hid/wacom_sys.c
994
buf[4] = wacom->led.img_lum;
drivers/hid/wacom_sys.c
997
retval = wacom_set_report(wacom->hdev, HID_FEATURE_REPORT, buf, buf_size,
drivers/hid/wacom_wac.c
1015
wacom_intuos_id_mangle(wacom->id[idx])); /* report tool id */
drivers/hid/wacom_wac.c
1016
input_report_key(input, wacom->tool[idx], 1);
drivers/hid/wacom_wac.c
1017
input_event(input, EV_MSC, MSC_SERIAL, wacom->serial[idx]);
drivers/hid/wacom_wac.c
1018
wacom->reporting_data = true;
drivers/hid/wacom_wac.c
1022
static int wacom_intuos_irq(struct wacom_wac *wacom)
drivers/hid/wacom_wac.c
1024
unsigned char *data = wacom->data;
drivers/hid/wacom_wac.c
1025
struct input_dev *input = wacom->pen_input;
drivers/hid/wacom_wac.c
1042
result = wacom_intuos_pad(wacom);
drivers/hid/wacom_wac.c
1047
result = wacom_intuos_inout(wacom);
drivers/hid/wacom_wac.c
1052
result = wacom_intuos_general(wacom);
drivers/hid/wacom_wac.c
1063
struct wacom *wacom = container_of(wacom_wac, struct wacom, wacom_wac);
drivers/hid/wacom_wac.c
1064
struct wacom_remote *remote = wacom->remote;
drivers/hid/wacom_wac.c
1071
hid_dbg(wacom->hdev, "%s: received unknown report #%d",
drivers/hid/wacom_wac.c
1137
wacom->led.groups[i].select = touch_ring_mode;
drivers/hid/wacom_wac.c
115
struct wacom *wacom = container_of(wacom_wac, struct wacom, wacom_wac);
drivers/hid/wacom_wac.c
1151
struct wacom *wacom = container_of(wacom_wac, struct wacom, wacom_wac);
drivers/hid/wacom_wac.c
1153
struct wacom_remote *remote = wacom->remote;
drivers/hid/wacom_wac.c
116
bool bat_initialized = wacom->battery.battery;
drivers/hid/wacom_wac.c
1175
hid_err(wacom->hdev, "Can't queue Remote status event.\n");
drivers/hid/wacom_wac.c
1192
static void wacom_intuos_bt_process_data(struct wacom_wac *wacom,
drivers/hid/wacom_wac.c
1195
memcpy(wacom->data, data, 10);
drivers/hid/wacom_wac.c
1196
wacom_intuos_irq(wacom);
drivers/hid/wacom_wac.c
1198
input_sync(wacom->pen_input);
drivers/hid/wacom_wac.c
1199
if (wacom->pad_input)
drivers/hid/wacom_wac.c
1200
input_sync(wacom->pad_input);
drivers/hid/wacom_wac.c
1203
static int wacom_intuos_bt_irq(struct wacom_wac *wacom, size_t len)
drivers/hid/wacom_wac.c
1205
u8 *data = kmemdup(wacom->data, len, GFP_KERNEL);
drivers/hid/wacom_wac.c
1212
dev_warn(wacom->pen_input->dev.parent,
drivers/hid/wacom_wac.c
1216
wacom_intuos_bt_process_data(wacom, data + i);
drivers/hid/wacom_wac.c
122
__wacom_notify_battery(&wacom->battery, bat_status, bat_capacity,
drivers/hid/wacom_wac.c
1221
dev_warn(wacom->pen_input->dev.parent,
drivers/hid/wacom_wac.c
1225
wacom_intuos_bt_process_data(wacom, data + i);
drivers/hid/wacom_wac.c
1227
wacom_intuos_bt_process_data(wacom, data + i);
drivers/hid/wacom_wac.c
1233
wacom_notify_battery(wacom, WACOM_POWER_SUPPLY_STATUS_AUTO,
drivers/hid/wacom_wac.c
1239
dev_dbg(wacom->pen_input->dev.parent,
drivers/hid/wacom_wac.c
1249
static int wacom_wac_finger_count_touches(struct wacom_wac *wacom)
drivers/hid/wacom_wac.c
1251
struct input_dev *input = wacom->touch_input;
drivers/hid/wacom_wac.c
1252
unsigned touch_max = wacom->features.touch_max;
drivers/hid/wacom_wac.c
126
static int wacom_penpartner_irq(struct wacom_wac *wacom)
drivers/hid/wacom_wac.c
1261
report_touch_events(wacom);
drivers/hid/wacom_wac.c
1273
static void wacom_intuos_pro2_bt_pen(struct wacom_wac *wacom)
drivers/hid/wacom_wac.c
1277
struct input_dev *pen_input = wacom->pen_input;
drivers/hid/wacom_wac.c
1278
unsigned char *data = wacom->data;
drivers/hid/wacom_wac.c
128
unsigned char *data = wacom->data;
drivers/hid/wacom_wac.c
1284
if (wacom->features.type == INTUOSP2_BT ||
drivers/hid/wacom_wac.c
1285
wacom->features.type == INTUOSP2S_BT) {
drivers/hid/wacom_wac.c
1286
wacom->serial[0] = get_unaligned_le64(&data[99]);
drivers/hid/wacom_wac.c
1287
wacom->id[0] = get_unaligned_le16(&data[107]);
drivers/hid/wacom_wac.c
129
struct input_dev *input = wacom->pen_input;
drivers/hid/wacom_wac.c
1291
wacom->serial[0] = get_unaligned_le64(&data[33]);
drivers/hid/wacom_wac.c
1292
wacom->id[0] = get_unaligned_le16(&data[41]);
drivers/hid/wacom_wac.c
1297
if (wacom->serial[0] >> 52 == 1) {
drivers/hid/wacom_wac.c
1299
wacom->id[0] |= (wacom->serial[0] >> 32) & 0xFFFFF;
drivers/hid/wacom_wac.c
1312
if (wacom->hid_data.time_delayed)
drivers/hid/wacom_wac.c
1313
time_interval = ktime_get() - wacom->hid_data.time_delayed;
drivers/hid/wacom_wac.c
1315
wacom->hid_data.time_delayed = time_packet_received;
drivers/hid/wacom_wac.c
1331
wacom->shared->stylus_in_proximity = false;
drivers/hid/wacom_wac.c
1332
wacom_exit_report(wacom);
drivers/hid/wacom_wac.c
1335
wacom->tool[0] = 0;
drivers/hid/wacom_wac.c
1336
wacom->id[0] = 0;
drivers/hid/wacom_wac.c
1337
wacom->serial[0] = 0;
drivers/hid/wacom_wac.c
1338
wacom->hid_data.time_delayed = 0;
drivers/hid/wacom_wac.c
134
wacom->tool[0] = (data[5] & 0x20) ? BTN_TOOL_RUBBER : BTN_TOOL_PEN;
drivers/hid/wacom_wac.c
1343
if (!wacom->tool[0]) { /* first in range */
drivers/hid/wacom_wac.c
1346
wacom->tool[0] = BTN_TOOL_RUBBER;
drivers/hid/wacom_wac.c
1347
else if (wacom->id[0])
drivers/hid/wacom_wac.c
1348
wacom->tool[0] = wacom_intuos_get_tool_type(wacom->id[0]);
drivers/hid/wacom_wac.c
135
wacom->id[0] = (data[5] & 0x20) ? ERASER_DEVICE_ID : STYLUS_DEVICE_ID;
drivers/hid/wacom_wac.c
1350
wacom->tool[0] = BTN_TOOL_PEN;
drivers/hid/wacom_wac.c
1356
if (wacom->features.type == INTUOSP2_BT ||
drivers/hid/wacom_wac.c
1357
wacom->features.type == INTUOSP2S_BT) {
drivers/hid/wacom_wac.c
136
input_report_key(input, wacom->tool[0], 1);
drivers/hid/wacom_wac.c
137
input_report_abs(input, ABS_MISC, wacom->id[0]); /* report tool id */
drivers/hid/wacom_wac.c
1376
if (wacom->tool[0]) {
drivers/hid/wacom_wac.c
1378
if (wacom->features.type == INTUOSP2_BT ||
drivers/hid/wacom_wac.c
1379
wacom->features.type == INTUOSP2S_BT) {
drivers/hid/wacom_wac.c
1381
range ? frame[13] : wacom->features.distance_max);
drivers/hid/wacom_wac.c
1384
range ? frame[7] : wacom->features.distance_max);
drivers/hid/wacom_wac.c
1391
input_report_key(pen_input, wacom->tool[0], prox);
drivers/hid/wacom_wac.c
1392
input_event(pen_input, EV_MSC, MSC_SERIAL, wacom->serial[0]);
drivers/hid/wacom_wac.c
1394
wacom_intuos_id_mangle(wacom->id[0])); /* report tool id */
drivers/hid/wacom_wac.c
1397
wacom->shared->stylus_in_proximity = prox;
drivers/hid/wacom_wac.c
1406
static void wacom_intuos_pro2_bt_touch(struct wacom_wac *wacom)
drivers/hid/wacom_wac.c
1412
struct input_dev *touch_input = wacom->touch_input;
drivers/hid/wacom_wac.c
1413
unsigned char *data = wacom->data;
drivers/hid/wacom_wac.c
1430
wacom->num_contacts_left = current_num_contacts;
drivers/hid/wacom_wac.c
1432
contacts_to_send = min(num_contacts_left, wacom->num_contacts_left);
drivers/hid/wacom_wac.c
144
input_report_key(input, wacom->tool[0], 0);
drivers/hid/wacom_wac.c
1456
wacom->num_contacts_left -= contacts_to_send;
drivers/hid/wacom_wac.c
1457
if (wacom->num_contacts_left <= 0) {
drivers/hid/wacom_wac.c
1458
wacom->num_contacts_left = 0;
drivers/hid/wacom_wac.c
1459
wacom->shared->touch_down = wacom_wac_finger_count_touches(wacom);
drivers/hid/wacom_wac.c
1464
if (wacom->num_contacts_left == 0) {
drivers/hid/wacom_wac.c
1473
static void wacom_intuos_pro2_bt_pad(struct wacom_wac *wacom)
drivers/hid/wacom_wac.c
1475
struct input_dev *pad_input = wacom->pad_input;
drivers/hid/wacom_wac.c
1476
unsigned char *data = wacom->data;
drivers/hid/wacom_wac.c
1477
int nbuttons = wacom->features.numbered_buttons;
drivers/hid/wacom_wac.c
1496
input_report_key(pad_input, wacom->tool[1], prox ? 1 : 0);
drivers/hid/wacom_wac.c
1503
static void wacom_intuos_pro2_bt_battery(struct wacom_wac *wacom)
drivers/hid/wacom_wac.c
1505
unsigned char *data = wacom->data;
drivers/hid/wacom_wac.c
1510
wacom_notify_battery(wacom, WACOM_POWER_SUPPLY_STATUS_AUTO,
drivers/hid/wacom_wac.c
1514
static void wacom_intuos_gen3_bt_pad(struct wacom_wac *wacom)
drivers/hid/wacom_wac.c
1516
struct input_dev *pad_input = wacom->pad_input;
drivers/hid/wacom_wac.c
1517
unsigned char *data = wacom->data;
drivers/hid/wacom_wac.c
1523
input_report_key(pad_input, wacom->tool[1], buttons ? 1 : 0);
drivers/hid/wacom_wac.c
1530
static void wacom_intuos_gen3_bt_battery(struct wacom_wac *wacom)
drivers/hid/wacom_wac.c
1532
unsigned char *data = wacom->data;
drivers/hid/wacom_wac.c
1537
wacom_notify_battery(wacom, WACOM_POWER_SUPPLY_STATUS_AUTO,
drivers/hid/wacom_wac.c
1541
static int wacom_intuos_pro2_bt_irq(struct wacom_wac *wacom, size_t len)
drivers/hid/wacom_wac.c
1543
unsigned char *data = wacom->data;
drivers/hid/wacom_wac.c
1546
dev_dbg(wacom->pen_input->dev.parent,
drivers/hid/wacom_wac.c
1551
wacom_intuos_pro2_bt_pen(wacom);
drivers/hid/wacom_wac.c
1552
if (wacom->features.type == INTUOSP2_BT ||
drivers/hid/wacom_wac.c
1553
wacom->features.type == INTUOSP2S_BT) {
drivers/hid/wacom_wac.c
1554
wacom_intuos_pro2_bt_touch(wacom);
drivers/hid/wacom_wac.c
1555
wacom_intuos_pro2_bt_pad(wacom);
drivers/hid/wacom_wac.c
1556
wacom_intuos_pro2_bt_battery(wacom);
drivers/hid/wacom_wac.c
1558
wacom_intuos_gen3_bt_pad(wacom);
drivers/hid/wacom_wac.c
1559
wacom_intuos_gen3_bt_battery(wacom);
drivers/hid/wacom_wac.c
1564
static int wacom_24hdt_irq(struct wacom_wac *wacom)
drivers/hid/wacom_wac.c
1566
struct input_dev *input = wacom->touch_input;
drivers/hid/wacom_wac.c
1567
unsigned char *data = wacom->data;
drivers/hid/wacom_wac.c
1575
if (touch_is_muted(wacom) && !wacom->shared->touch_down)
drivers/hid/wacom_wac.c
1578
if (wacom->features.type == WACOM_27QHDT) {
drivers/hid/wacom_wac.c
1590
wacom->num_contacts_left = current_num_contacts;
drivers/hid/wacom_wac.c
1592
contacts_to_send = min(num_contacts_left, wacom->num_contacts_left);
drivers/hid/wacom_wac.c
1596
bool touch = (data[offset] & 0x1) && report_touch_events(wacom);
drivers/hid/wacom_wac.c
1611
if (wacom->features.type != WACOM_27QHDT) {
drivers/hid/wacom_wac.c
1627
wacom->num_contacts_left -= contacts_to_send;
drivers/hid/wacom_wac.c
1628
if (wacom->num_contacts_left <= 0) {
drivers/hid/wacom_wac.c
1629
wacom->num_contacts_left = 0;
drivers/hid/wacom_wac.c
1630
wacom->shared->touch_down = wacom_wac_finger_count_touches(wacom);
drivers/hid/wacom_wac.c
1635
static int wacom_mt_touch(struct wacom_wac *wacom)
drivers/hid/wacom_wac.c
1637
struct input_dev *input = wacom->touch_input;
drivers/hid/wacom_wac.c
1638
unsigned char *data = wacom->data;
drivers/hid/wacom_wac.c
1645
if (wacom->features.type == MTTPC || wacom->features.type == MTTPC_B)
drivers/hid/wacom_wac.c
1653
wacom->num_contacts_left = current_num_contacts;
drivers/hid/wacom_wac.c
1656
contacts_to_send = min(5, wacom->num_contacts_left);
drivers/hid/wacom_wac.c
1660
bool touch = (data[offset] & 0x1) && report_touch_events(wacom);
drivers/hid/wacom_wac.c
1678
wacom->num_contacts_left -= contacts_to_send;
drivers/hid/wacom_wac.c
1679
if (wacom->num_contacts_left <= 0) {
drivers/hid/wacom_wac.c
1680
wacom->num_contacts_left = 0;
drivers/hid/wacom_wac.c
1681
wacom->shared->touch_down = wacom_wac_finger_count_touches(wacom);
drivers/hid/wacom_wac.c
1686
static int wacom_tpc_mt_touch(struct wacom_wac *wacom)
drivers/hid/wacom_wac.c
1688
struct input_dev *input = wacom->touch_input;
drivers/hid/wacom_wac.c
1689
unsigned char *data = wacom->data;
drivers/hid/wacom_wac.c
1694
bool touch = p && report_touch_events(wacom);
drivers/hid/wacom_wac.c
170
static int wacom_pl_irq(struct wacom_wac *wacom)
drivers/hid/wacom_wac.c
1709
wacom->shared->touch_down = wacom_wac_finger_count_touches(wacom);
drivers/hid/wacom_wac.c
1714
static int wacom_tpc_single_touch(struct wacom_wac *wacom, size_t len)
drivers/hid/wacom_wac.c
1716
unsigned char *data = wacom->data;
drivers/hid/wacom_wac.c
1717
struct input_dev *input = wacom->touch_input;
drivers/hid/wacom_wac.c
1718
bool prox = report_touch_events(wacom);
drivers/hid/wacom_wac.c
172
struct wacom_features *features = &wacom->features;
drivers/hid/wacom_wac.c
1721
if (wacom->features.touch_max > 1 || len > WACOM_PKGLEN_TPC2FG)
drivers/hid/wacom_wac.c
173
unsigned char *data = wacom->data;
drivers/hid/wacom_wac.c
174
struct input_dev *input = wacom->pen_input;
drivers/hid/wacom_wac.c
1745
wacom->shared->touch_down = prox;
drivers/hid/wacom_wac.c
1750
static int wacom_tpc_pen(struct wacom_wac *wacom)
drivers/hid/wacom_wac.c
1752
unsigned char *data = wacom->data;
drivers/hid/wacom_wac.c
1753
struct input_dev *input = wacom->pen_input;
drivers/hid/wacom_wac.c
1756
if (!wacom->shared->stylus_in_proximity) /* first in prox */
drivers/hid/wacom_wac.c
1758
wacom->tool[0] = (data[1] & 0x0c) ? BTN_TOOL_RUBBER : BTN_TOOL_PEN;
drivers/hid/wacom_wac.c
1761
wacom->shared->stylus_in_proximity = prox;
drivers/hid/wacom_wac.c
1766
if (!delay_pen_events(wacom)) {
drivers/hid/wacom_wac.c
1773
input_report_key(input, wacom->tool[0], prox);
drivers/hid/wacom_wac.c
1780
static int wacom_tpc_irq(struct wacom_wac *wacom, size_t len)
drivers/hid/wacom_wac.c
1782
unsigned char *data = wacom->data;
drivers/hid/wacom_wac.c
1784
if (wacom->pen_input) {
drivers/hid/wacom_wac.c
1785
dev_dbg(wacom->pen_input->dev.parent,
drivers/hid/wacom_wac.c
1790
return wacom_tpc_pen(wacom);
drivers/hid/wacom_wac.c
1792
else if (wacom->touch_input) {
drivers/hid/wacom_wac.c
1793
dev_dbg(wacom->touch_input->dev.parent,
drivers/hid/wacom_wac.c
1798
return wacom_tpc_single_touch(wacom, len);
drivers/hid/wacom_wac.c
1801
return wacom_tpc_mt_touch(wacom);
drivers/hid/wacom_wac.c
1809
return wacom_tpc_single_touch(wacom, len);
drivers/hid/wacom_wac.c
1813
return wacom_mt_touch(wacom);
drivers/hid/wacom_wac.c
185
if (!wacom->id[0]) {
drivers/hid/wacom_wac.c
187
wacom->tool[0] = BTN_TOOL_RUBBER;
drivers/hid/wacom_wac.c
188
wacom->id[0] = ERASER_DEVICE_ID;
drivers/hid/wacom_wac.c
1885
struct wacom *wacom = input_get_drvdata(input);
drivers/hid/wacom_wac.c
1886
struct wacom_wac *wacom_wac = &wacom->wacom_wac;
drivers/hid/wacom_wac.c
191
wacom->tool[0] = BTN_TOOL_PEN;
drivers/hid/wacom_wac.c
192
wacom->id[0] = STYLUS_DEVICE_ID;
drivers/hid/wacom_wac.c
1943
struct wacom *wacom = hid_get_drvdata(hdev);
drivers/hid/wacom_wac.c
1944
struct wacom_wac *wacom_wac = &wacom->wacom_wac;
drivers/hid/wacom_wac.c
1986
struct wacom *wacom = hid_get_drvdata(hdev);
drivers/hid/wacom_wac.c
1987
struct wacom_wac *wacom_wac = &wacom->wacom_wac;
drivers/hid/wacom_wac.c
200
if (wacom->tool[0] == BTN_TOOL_RUBBER && !(data[4] & 0x20)) {
drivers/hid/wacom_wac.c
2002
struct wacom *wacom = hid_get_drvdata(hdev);
drivers/hid/wacom_wac.c
2003
struct wacom_wac *wacom_wac = &wacom->wacom_wac;
drivers/hid/wacom_wac.c
204
wacom->tool[0] = BTN_TOOL_PEN;
drivers/hid/wacom_wac.c
205
wacom->id[0] = STYLUS_DEVICE_ID;
drivers/hid/wacom_wac.c
2127
struct wacom *wacom = hid_get_drvdata(hdev);
drivers/hid/wacom_wac.c
2128
struct wacom_wac *wacom_wac = &wacom->wacom_wac;
drivers/hid/wacom_wac.c
221
input_report_key(input, BTN_STYLUS2, (wacom->tool[0] == BTN_TOOL_PEN) && (data[4] & 0x20));
drivers/hid/wacom_wac.c
2227
hid_err(wacom->hdev, "unrecognized relative wheel with code %d\n",
drivers/hid/wacom_wac.c
225
wacom->id[0] = 0;
drivers/hid/wacom_wac.c
2258
wacom_schedule_work(&wacom->wacom_wac, WACOM_WORKER_MODE_CHANGE);
drivers/hid/wacom_wac.c
226
input_report_key(input, wacom->tool[0], prox);
drivers/hid/wacom_wac.c
2263
for (i = 0; i < wacom->led.count; i++)
drivers/hid/wacom_wac.c
2264
wacom_update_led(wacom, features->numbered_buttons,
drivers/hid/wacom_wac.c
227
input_report_abs(input, ABS_MISC, wacom->id[0]);
drivers/hid/wacom_wac.c
2282
struct wacom *wacom = hid_get_drvdata(hdev);
drivers/hid/wacom_wac.c
2283
struct wacom_wac *wacom_wac = &wacom->wacom_wac;
drivers/hid/wacom_wac.c
2291
struct wacom *wacom = hid_get_drvdata(hdev);
drivers/hid/wacom_wac.c
2292
struct wacom_wac *wacom_wac = &wacom->wacom_wac;
drivers/hid/wacom_wac.c
231
static int wacom_ptu_irq(struct wacom_wac *wacom)
drivers/hid/wacom_wac.c
2323
struct wacom *wacom = hid_get_drvdata(hdev);
drivers/hid/wacom_wac.c
2324
struct wacom_wac *wacom_wac = &wacom->wacom_wac;
drivers/hid/wacom_wac.c
233
unsigned char *data = wacom->data;
drivers/hid/wacom_wac.c
234
struct input_dev *input = wacom->pen_input;
drivers/hid/wacom_wac.c
2411
struct wacom *wacom = hid_get_drvdata(hdev);
drivers/hid/wacom_wac.c
2412
struct wacom_wac *wacom_wac = &wacom->wacom_wac;
drivers/hid/wacom_wac.c
2430
mod_timer(&wacom->idleprox_timer, jiffies + msecs_to_jiffies(100));
drivers/hid/wacom_wac.c
245
wacom->id[0] = ERASER_DEVICE_ID;
drivers/hid/wacom_wac.c
249
wacom->id[0] = STYLUS_DEVICE_ID;
drivers/hid/wacom_wac.c
251
input_report_abs(input, ABS_MISC, wacom->id[0]); /* report tool id */
drivers/hid/wacom_wac.c
2559
struct wacom *wacom = hid_get_drvdata(hdev);
drivers/hid/wacom_wac.c
2560
struct wacom_wac *wacom_wac = &wacom->wacom_wac;
drivers/hid/wacom_wac.c
2569
struct wacom *wacom = hid_get_drvdata(hdev);
drivers/hid/wacom_wac.c
2570
struct wacom_wac *wacom_wac = &wacom->wacom_wac;
drivers/hid/wacom_wac.c
260
static int wacom_dtu_irq(struct wacom_wac *wacom)
drivers/hid/wacom_wac.c
262
unsigned char *data = wacom->data;
drivers/hid/wacom_wac.c
263
struct input_dev *input = wacom->pen_input;
drivers/hid/wacom_wac.c
2643
cancel_delayed_work(&wacom->aes_battery_work);
drivers/hid/wacom_wac.c
2645
schedule_delayed_work(&wacom->aes_battery_work,
drivers/hid/wacom_wac.c
2659
struct wacom *wacom = hid_get_drvdata(hdev);
drivers/hid/wacom_wac.c
2660
struct wacom_wac *wacom_wac = &wacom->wacom_wac;
drivers/hid/wacom_wac.c
271
wacom->tool[0] = (data[1] & 0x0c) ? BTN_TOOL_RUBBER : BTN_TOOL_PEN;
drivers/hid/wacom_wac.c
272
if (wacom->tool[0] == BTN_TOOL_PEN)
drivers/hid/wacom_wac.c
273
wacom->id[0] = STYLUS_DEVICE_ID;
drivers/hid/wacom_wac.c
275
wacom->id[0] = ERASER_DEVICE_ID;
drivers/hid/wacom_wac.c
2769
struct wacom *wacom = hid_get_drvdata(hdev);
drivers/hid/wacom_wac.c
2770
struct wacom_wac *wacom_wac = &wacom->wacom_wac;
drivers/hid/wacom_wac.c
2772
struct wacom_features *features = &wacom->wacom_wac.features;
drivers/hid/wacom_wac.c
2824
struct wacom *wacom = hid_get_drvdata(hdev);
drivers/hid/wacom_wac.c
2825
struct wacom_wac *wacom_wac = &wacom->wacom_wac;
drivers/hid/wacom_wac.c
284
wacom->id[0] = 0;
drivers/hid/wacom_wac.c
285
input_report_key(input, wacom->tool[0], prox);
drivers/hid/wacom_wac.c
286
input_report_abs(input, ABS_MISC, wacom->id[0]);
drivers/hid/wacom_wac.c
2887
struct wacom *wacom = hid_get_drvdata(hdev);
drivers/hid/wacom_wac.c
2888
struct wacom_wac *wacom_wac = &wacom->wacom_wac;
drivers/hid/wacom_wac.c
290
static int wacom_dtus_irq(struct wacom_wac *wacom)
drivers/hid/wacom_wac.c
2917
struct wacom *wacom = hid_get_drvdata(hdev);
drivers/hid/wacom_wac.c
2918
struct wacom_wac *wacom_wac = &wacom->wacom_wac;
drivers/hid/wacom_wac.c
292
unsigned char *data = wacom->data;
drivers/hid/wacom_wac.c
293
struct input_dev *input = wacom->pen_input;
drivers/hid/wacom_wac.c
2938
struct wacom *wacom = hid_get_drvdata(hdev);
drivers/hid/wacom_wac.c
2940
if (wacom->wacom_wac.features.type != HID_GENERIC)
drivers/hid/wacom_wac.c
2951
else if (WACOM_PEN_FIELD(field) && wacom->wacom_wac.pen_input)
drivers/hid/wacom_wac.c
2953
else if (WACOM_FINGER_FIELD(field) && wacom->wacom_wac.touch_input)
drivers/hid/wacom_wac.c
2987
struct wacom *wacom = hid_get_drvdata(hdev);
drivers/hid/wacom_wac.c
3003
else if (WACOM_PEN_FIELD(field) && wacom->wacom_wac.pen_input)
drivers/hid/wacom_wac.c
3005
else if (WACOM_FINGER_FIELD(field) && wacom->wacom_wac.touch_input)
drivers/hid/wacom_wac.c
301
input = wacom->pad_input;
drivers/hid/wacom_wac.c
3013
struct wacom *wacom = hid_get_drvdata(hdev);
drivers/hid/wacom_wac.c
3014
struct wacom_wac *wacom_wac = &wacom->wacom_wac;
drivers/hid/wacom_wac.c
3063
static int wacom_bpt_touch(struct wacom_wac *wacom)
drivers/hid/wacom_wac.c
3065
struct wacom_features *features = &wacom->features;
drivers/hid/wacom_wac.c
3066
struct input_dev *input = wacom->touch_input;
drivers/hid/wacom_wac.c
3067
struct input_dev *pad_input = wacom->pad_input;
drivers/hid/wacom_wac.c
3068
unsigned char *data = wacom->data;
drivers/hid/wacom_wac.c
3076
bool touch = report_touch_events(wacom)
drivers/hid/wacom_wac.c
3099
wacom->shared->touch_down = wacom_wac_finger_count_touches(wacom);
drivers/hid/wacom_wac.c
3104
static void wacom_bpt3_touch_msg(struct wacom_wac *wacom, unsigned char *data)
drivers/hid/wacom_wac.c
3106
struct wacom_features *features = &wacom->features;
drivers/hid/wacom_wac.c
3107
struct input_dev *input = wacom->touch_input;
drivers/hid/wacom_wac.c
3114
touch = touch && report_touch_events(wacom);
drivers/hid/wacom_wac.c
314
wacom->tool[0] = BTN_TOOL_RUBBER;
drivers/hid/wacom_wac.c
3147
static void wacom_bpt3_button_msg(struct wacom_wac *wacom, unsigned char *data)
drivers/hid/wacom_wac.c
3149
struct input_dev *input = wacom->pad_input;
drivers/hid/wacom_wac.c
315
wacom->id[0] = ERASER_DEVICE_ID;
drivers/hid/wacom_wac.c
3150
struct wacom_features *features = &wacom->features;
drivers/hid/wacom_wac.c
3163
static int wacom_bpt3_touch(struct wacom_wac *wacom)
drivers/hid/wacom_wac.c
3165
unsigned char *data = wacom->data;
drivers/hid/wacom_wac.c
3178
wacom_bpt3_touch_msg(wacom, data + offset);
drivers/hid/wacom_wac.c
3181
wacom_bpt3_button_msg(wacom, data + offset);
drivers/hid/wacom_wac.c
3186
if (wacom->touch_input && touch_changed) {
drivers/hid/wacom_wac.c
3187
input_mt_sync_frame(wacom->touch_input);
drivers/hid/wacom_wac.c
3188
wacom->shared->touch_down = wacom_wac_finger_count_touches(wacom);
drivers/hid/wacom_wac.c
319
wacom->tool[0] = BTN_TOOL_PEN;
drivers/hid/wacom_wac.c
3194
static int wacom_bpt_pen(struct wacom_wac *wacom)
drivers/hid/wacom_wac.c
3196
struct wacom_features *features = &wacom->features;
drivers/hid/wacom_wac.c
3197
struct input_dev *input = wacom->pen_input;
drivers/hid/wacom_wac.c
3198
unsigned char *data = wacom->data;
drivers/hid/wacom_wac.c
320
wacom->id[0] = STYLUS_DEVICE_ID;
drivers/hid/wacom_wac.c
3210
wacom->shared->stylus_in_proximity = range;
drivers/hid/wacom_wac.c
3211
if (delay_pen_events(wacom))
drivers/hid/wacom_wac.c
3225
wacom->tool[0] = BTN_TOOL_RUBBER;
drivers/hid/wacom_wac.c
3226
wacom->id[0] = ERASER_DEVICE_ID;
drivers/hid/wacom_wac.c
3228
wacom->tool[0] = BTN_TOOL_PEN;
drivers/hid/wacom_wac.c
3229
wacom->id[0] = STYLUS_DEVICE_ID;
drivers/hid/wacom_wac.c
3231
wacom->reporting_data = true;
drivers/hid/wacom_wac.c
3243
wacom->id[0] = 0;
drivers/hid/wacom_wac.c
3246
if (wacom->reporting_data) {
drivers/hid/wacom_wac.c
3258
input_report_key(input, wacom->tool[0], range); /* PEN or RUBBER */
drivers/hid/wacom_wac.c
3259
input_report_abs(input, ABS_MISC, wacom->id[0]); /* TOOL ID */
drivers/hid/wacom_wac.c
3263
wacom->reporting_data = false;
drivers/hid/wacom_wac.c
3269
static int wacom_bpt_irq(struct wacom_wac *wacom, size_t len)
drivers/hid/wacom_wac.c
3271
struct wacom_features *features = &wacom->features;
drivers/hid/wacom_wac.c
3275
return wacom_intuos_irq(wacom);
drivers/hid/wacom_wac.c
3277
return wacom_bpt_touch(wacom);
drivers/hid/wacom_wac.c
3279
return wacom_bpt3_touch(wacom);
drivers/hid/wacom_wac.c
3281
return wacom_bpt_pen(wacom);
drivers/hid/wacom_wac.c
3286
static void wacom_bamboo_pad_pen_event(struct wacom_wac *wacom,
drivers/hid/wacom_wac.c
3306
hid_input_report(wacom->shared->pen, HID_INPUT_REPORT, data,
drivers/hid/wacom_wac.c
3312
static int wacom_bamboo_pad_touch_event(struct wacom_wac *wacom,
drivers/hid/wacom_wac.c
3315
struct input_dev *input = wacom->touch_input;
drivers/hid/wacom_wac.c
3323
for (id = 0; id < wacom->features.touch_max; id++) {
drivers/hid/wacom_wac.c
3325
report_touch_events(wacom);
drivers/hid/wacom_wac.c
334
wacom->id[0] = 0;
drivers/hid/wacom_wac.c
3347
wacom->shared->touch_down = !!prefix && report_touch_events(wacom);
drivers/hid/wacom_wac.c
335
input_report_key(input, wacom->tool[0], prox);
drivers/hid/wacom_wac.c
3352
static int wacom_bamboo_pad_irq(struct wacom_wac *wacom, size_t len)
drivers/hid/wacom_wac.c
3354
unsigned char *data = wacom->data;
drivers/hid/wacom_wac.c
336
input_report_abs(input, ABS_MISC, wacom->id[0]);
drivers/hid/wacom_wac.c
3362
wacom_bamboo_pad_pen_event(wacom, &data[1]);
drivers/hid/wacom_wac.c
3365
return wacom_bamboo_pad_touch_event(wacom, &data[9]);
drivers/hid/wacom_wac.c
3370
static int wacom_wireless_irq(struct wacom_wac *wacom, size_t len)
drivers/hid/wacom_wac.c
3372
unsigned char *data = wacom->data;
drivers/hid/wacom_wac.c
3382
if ((wacom->shared->type == INTUOSHT ||
drivers/hid/wacom_wac.c
3383
wacom->shared->type == INTUOSHT2) &&
drivers/hid/wacom_wac.c
3384
wacom->shared->touch_input &&
drivers/hid/wacom_wac.c
3385
wacom->shared->touch_max) {
drivers/hid/wacom_wac.c
3386
input_report_switch(wacom->shared->touch_input,
drivers/hid/wacom_wac.c
3388
input_sync(wacom->shared->touch_input);
drivers/hid/wacom_wac.c
3394
if (wacom->pid != pid) {
drivers/hid/wacom_wac.c
3395
wacom->pid = pid;
drivers/hid/wacom_wac.c
3396
wacom_schedule_work(wacom, WACOM_WORKER_WIRELESS);
drivers/hid/wacom_wac.c
3399
wacom_notify_battery(wacom, WACOM_POWER_SUPPLY_STATUS_AUTO,
drivers/hid/wacom_wac.c
3402
} else if (wacom->pid != 0) {
drivers/hid/wacom_wac.c
3404
wacom->pid = 0;
drivers/hid/wacom_wac.c
3405
wacom_schedule_work(wacom, WACOM_WORKER_WIRELESS);
drivers/hid/wacom_wac.c
3406
wacom_notify_battery(wacom, POWER_SUPPLY_STATUS_UNKNOWN, 0, 0, 0, 0);
drivers/hid/wacom_wac.c
341
static int wacom_graphire_irq(struct wacom_wac *wacom)
drivers/hid/wacom_wac.c
3414
struct wacom *wacom = container_of(wacom_wac, struct wacom, wacom_wac);
drivers/hid/wacom_wac.c
343
struct wacom_features *features = &wacom->features;
drivers/hid/wacom_wac.c
3439
wacom->battery.battery) {
drivers/hid/wacom_wac.c
344
unsigned char *data = wacom->data;
drivers/hid/wacom_wac.c
345
struct input_dev *input = wacom->pen_input;
drivers/hid/wacom_wac.c
346
struct input_dev *pad_input = wacom->pad_input;
drivers/hid/wacom_wac.c
3633
void wacom_setup_device_quirks(struct wacom *wacom)
drivers/hid/wacom_wac.c
3635
struct wacom_wac *wacom_wac = &wacom->wacom_wac;
drivers/hid/wacom_wac.c
3636
struct wacom_features *features = &wacom->wacom_wac.features;
drivers/hid/wacom_wac.c
366
if (prox || wacom->id[0]) {
drivers/hid/wacom_wac.c
371
wacom->tool[0] = BTN_TOOL_PEN;
drivers/hid/wacom_wac.c
372
wacom->id[0] = STYLUS_DEVICE_ID;
drivers/hid/wacom_wac.c
3745
if (wacom->hdev->bus == BUS_BLUETOOTH)
drivers/hid/wacom_wac.c
376
wacom->tool[0] = BTN_TOOL_RUBBER;
drivers/hid/wacom_wac.c
377
wacom->id[0] = ERASER_DEVICE_ID;
drivers/hid/wacom_wac.c
3770
if (wacom->hdev->product == 0x382 || wacom->hdev->product == 0x37d) {
drivers/hid/wacom_wac.c
38
static void wacom_update_led(struct wacom *wacom, int button_count, int mask,
drivers/hid/wacom_wac.c
385
wacom->tool[0] = BTN_TOOL_MOUSE;
drivers/hid/wacom_wac.c
386
wacom->id[0] = CURSOR_DEVICE_ID;
drivers/hid/wacom_wac.c
392
if (wacom->tool[0] != BTN_TOOL_MOUSE) {
drivers/hid/wacom_wac.c
4114
static void wacom_24hd_update_leds(struct wacom *wacom, int mask, int group)
drivers/hid/wacom_wac.c
4129
led = wacom_led_find(wacom, group, i);
drivers/hid/wacom_wac.c
4131
hid_err(wacom->hdev, "can't find LED %d in group %d\n",
drivers/hid/wacom_wac.c
4144
static bool wacom_is_led_toggled(struct wacom *wacom, int button_count,
drivers/hid/wacom_wac.c
4154
if (wacom->wacom_wac.features.type == WACOM_21UX2)
drivers/hid/wacom_wac.c
4157
group_button = group * (button_count/wacom->led.count);
drivers/hid/wacom_wac.c
4159
if (wacom->wacom_wac.features.type == INTUOSP2_BT)
drivers/hid/wacom_wac.c
4165
static void wacom_update_led(struct wacom *wacom, int button_count, int mask,
drivers/hid/wacom_wac.c
4172
if (wacom->wacom_wac.features.type == WACOM_24HD)
drivers/hid/wacom_wac.c
4173
return wacom_24hd_update_leds(wacom, mask, group);
drivers/hid/wacom_wac.c
4175
pressed = wacom_is_led_toggled(wacom, button_count, mask, group);
drivers/hid/wacom_wac.c
4176
cur = wacom->led.groups[group].select;
drivers/hid/wacom_wac.c
4178
led = wacom_led_find(wacom, group, cur);
drivers/hid/wacom_wac.c
4180
hid_err(wacom->hdev, "can't find current LED %d in group %d\n",
drivers/hid/wacom_wac.c
4193
next_led = wacom_led_next(wacom, led);
drivers/hid/wacom_wac.c
4195
hid_err(wacom->hdev, "can't find next LED in group %d\n",
drivers/hid/wacom_wac.c
4210
struct wacom *wacom = input_get_drvdata(input_dev);
drivers/hid/wacom_wac.c
4213
for (i = 0; i < wacom->led.count; i++)
drivers/hid/wacom_wac.c
4214
wacom_update_led(wacom, button_count, mask, i);
drivers/hid/wacom_wac.c
431
wacom->id[0] = 0;
drivers/hid/wacom_wac.c
432
input_report_abs(input, ABS_MISC, wacom->id[0]); /* report tool id */
drivers/hid/wacom_wac.c
433
input_report_key(input, wacom->tool[0], prox);
drivers/hid/wacom_wac.c
441
if (prox || wacom->id[1]) {
drivers/hid/wacom_wac.c
442
wacom->id[1] = PAD_DEVICE_ID;
drivers/hid/wacom_wac.c
448
wacom->id[1] = 0;
drivers/hid/wacom_wac.c
449
input_report_abs(pad_input, ABS_MISC, wacom->id[1]);
drivers/hid/wacom_wac.c
456
if (prox || wacom->id[1]) {
drivers/hid/wacom_wac.c
457
wacom->id[1] = PAD_DEVICE_ID;
drivers/hid/wacom_wac.c
464
wacom->id[1] = 0;
drivers/hid/wacom_wac.c
465
input_report_abs(pad_input, ABS_MISC, wacom->id[1]);
drivers/hid/wacom_wac.c
471
if (prox || wacom->id[1]) {
drivers/hid/wacom_wac.c
472
wacom->id[1] = PAD_DEVICE_ID;
drivers/hid/wacom_wac.c
476
wacom->id[1] = 0;
drivers/hid/wacom_wac.c
477
input_report_abs(pad_input, ABS_MISC, wacom->id[1]);
drivers/hid/wacom_wac.c
488
wacom_notify_battery(wacom, WACOM_POWER_SUPPLY_STATUS_AUTO,
drivers/hid/wacom_wac.c
498
struct wacom *wacom = container_of(wacom_wac, struct wacom, wacom_wac);
drivers/hid/wacom_wac.c
503
re = &(wacom->hdev->report_enum[HID_FEATURE_REPORT]);
drivers/hid/wacom_wac.c
509
hid_hw_request(wacom->hdev, r, HID_REQ_GET_REPORT);
drivers/hid/wacom_wac.c
513
static int wacom_intuos_pad(struct wacom_wac *wacom)
drivers/hid/wacom_wac.c
515
struct wacom_features *features = &wacom->features;
drivers/hid/wacom_wac.c
516
unsigned char *data = wacom->data;
drivers/hid/wacom_wac.c
517
struct input_dev *input = wacom->pad_input;
drivers/hid/wacom_wac.c
561
wacom->shared->is_touch_on =
drivers/hid/wacom_wac.c
562
!wacom->shared->is_touch_on;
drivers/hid/wacom_wac.c
576
wacom->shared->is_touch_on =
drivers/hid/wacom_wac.c
577
!wacom->shared->is_touch_on;
drivers/hid/wacom_wac.c
653
if (wacom->shared && wacom->shared->touch_input) {
drivers/hid/wacom_wac.c
654
input_report_switch(wacom->shared->touch_input,
drivers/hid/wacom_wac.c
656
!wacom->shared->is_touch_on);
drivers/hid/wacom_wac.c
657
input_sync(wacom->shared->touch_input);
drivers/hid/wacom_wac.c
66
struct wacom *wacom = timer_container_of(wacom, list, idleprox_timer);
drivers/hid/wacom_wac.c
666
input_report_key(input, wacom->tool[1], prox ? 1 : 0);
drivers/hid/wacom_wac.c
67
struct wacom_wac *wacom_wac = &wacom->wacom_wac;
drivers/hid/wacom_wac.c
73
hid_warn(wacom->hdev, "%s: tool appears to be hung in-prox. forcing it out.\n", __func__);
drivers/hid/wacom_wac.c
734
static void wacom_exit_report(struct wacom_wac *wacom)
drivers/hid/wacom_wac.c
736
struct input_dev *input = wacom->pen_input;
drivers/hid/wacom_wac.c
737
struct wacom_features *features = &wacom->features;
drivers/hid/wacom_wac.c
738
unsigned char *data = wacom->data;
drivers/hid/wacom_wac.c
750
if (wacom->tool[idx] >= BTN_TOOL_MOUSE) {
drivers/hid/wacom_wac.c
767
input_report_key(input, wacom->tool[idx], 0);
drivers/hid/wacom_wac.c
769
input_event(input, EV_MSC, MSC_SERIAL, wacom->serial[idx]);
drivers/hid/wacom_wac.c
770
wacom->id[idx] = 0;
drivers/hid/wacom_wac.c
773
static int wacom_intuos_inout(struct wacom_wac *wacom)
drivers/hid/wacom_wac.c
775
struct wacom_features *features = &wacom->features;
drivers/hid/wacom_wac.c
776
unsigned char *data = wacom->data;
drivers/hid/wacom_wac.c
777
struct input_dev *input = wacom->pen_input;
drivers/hid/wacom_wac.c
788
wacom->serial[idx] = ((__u64)(data[3] & 0x0f) << 28) +
drivers/hid/wacom_wac.c
792
wacom->id[idx] = (data[2] << 4) | (data[3] >> 4) |
drivers/hid/wacom_wac.c
795
wacom->tool[idx] = wacom_intuos_get_tool_type(wacom->id[idx]);
drivers/hid/wacom_wac.c
797
wacom->shared->stylus_in_proximity = true;
drivers/hid/wacom_wac.c
804
wacom->shared->stylus_in_proximity = true;
drivers/hid/wacom_wac.c
807
if (wacom->reporting_data) {
drivers/hid/wacom_wac.c
810
input_report_abs(input, ABS_DISTANCE, wacom->features.distance_max);
drivers/hid/wacom_wac.c
818
wacom->shared->stylus_in_proximity = false;
drivers/hid/wacom_wac.c
819
wacom->reporting_data = false;
drivers/hid/wacom_wac.c
822
if (!wacom->id[idx])
drivers/hid/wacom_wac.c
825
wacom_exit_report(wacom);
drivers/hid/wacom_wac.c
839
static inline bool report_touch_events(struct wacom_wac *wacom)
drivers/hid/wacom_wac.c
841
return (touch_arbitration ? !wacom->shared->stylus_in_proximity : 1);
drivers/hid/wacom_wac.c
844
static inline bool delay_pen_events(struct wacom_wac *wacom)
drivers/hid/wacom_wac.c
846
return (wacom->shared->touch_down && touch_arbitration);
drivers/hid/wacom_wac.c
849
static int wacom_intuos_general(struct wacom_wac *wacom)
drivers/hid/wacom_wac.c
851
struct wacom_features *features = &wacom->features;
drivers/hid/wacom_wac.c
852
unsigned char *data = wacom->data;
drivers/hid/wacom_wac.c
853
struct input_dev *input = wacom->pen_input;
drivers/hid/wacom_wac.c
862
if (delay_pen_events(wacom))
drivers/hid/wacom_wac.c
866
if (!wacom->id[idx]) {
drivers/hid/wacom_wac.c
868
wacom_intuos_schedule_prox_event(wacom);
drivers/hid/wacom_wac.c
876
if ((!((wacom->id[idx] >> 16) & 0x01) &&
drivers/hid/wacom_wac.c
879
(wacom->tool[idx] == BTN_TOOL_LENS &&
drivers/hid/wacom_wac.c
979
if (wacom->tool[idx] == BTN_TOOL_MOUSE) {
drivers/hid/wacom_wac.c
993
else if (wacom->tool[idx] == BTN_TOOL_LENS) {
drivers/input/tablet/wacom_serial4.c
188
static void wacom_handle_model_response(struct wacom *wacom)
drivers/input/tablet/wacom_serial4.c
193
p = strrchr(wacom->data, 'V');
drivers/input/tablet/wacom_serial4.c
199
switch (wacom->data[2] << 8 | wacom->data[3]) {
drivers/input/tablet/wacom_serial4.c
202
if ((wacom->data[2] << 8 | wacom->data[3]) == MODEL_CINTIQ) {
drivers/input/tablet/wacom_serial4.c
203
wacom->dev->name = "Wacom Cintiq";
drivers/input/tablet/wacom_serial4.c
204
wacom->dev->id.version = MODEL_CINTIQ;
drivers/input/tablet/wacom_serial4.c
206
wacom->dev->name = "Wacom Cintiq II";
drivers/input/tablet/wacom_serial4.c
207
wacom->dev->id.version = MODEL_CINTIQ2;
drivers/input/tablet/wacom_serial4.c
209
wacom->res_x = 508;
drivers/input/tablet/wacom_serial4.c
210
wacom->res_y = 508;
drivers/input/tablet/wacom_serial4.c
212
switch (wacom->data[5] << 8 | wacom->data[6]) {
drivers/input/tablet/wacom_serial4.c
214
wacom->res_x = 2540;
drivers/input/tablet/wacom_serial4.c
215
wacom->res_y = 2540;
drivers/input/tablet/wacom_serial4.c
219
wacom->extra_z_bits = 2;
drivers/input/tablet/wacom_serial4.c
222
wacom->flags = F_COVERS_SCREEN;
drivers/input/tablet/wacom_serial4.c
226
wacom->dev->name = "Wacom Penpartner";
drivers/input/tablet/wacom_serial4.c
227
wacom->dev->id.version = MODEL_PENPARTNER;
drivers/input/tablet/wacom_serial4.c
228
wacom->res_x = 1000;
drivers/input/tablet/wacom_serial4.c
229
wacom->res_y = 1000;
drivers/input/tablet/wacom_serial4.c
233
wacom->dev->name = "Wacom Graphire";
drivers/input/tablet/wacom_serial4.c
234
wacom->dev->id.version = MODEL_GRAPHIRE;
drivers/input/tablet/wacom_serial4.c
235
wacom->res_x = 1016;
drivers/input/tablet/wacom_serial4.c
236
wacom->res_y = 1016;
drivers/input/tablet/wacom_serial4.c
237
wacom->max_x = 5103;
drivers/input/tablet/wacom_serial4.c
238
wacom->max_y = 3711;
drivers/input/tablet/wacom_serial4.c
239
wacom->extra_z_bits = 2;
drivers/input/tablet/wacom_serial4.c
240
wacom->eraser_mask = 0x08;
drivers/input/tablet/wacom_serial4.c
241
wacom->flags = F_HAS_STYLUS2 | F_HAS_SCROLLWHEEL;
drivers/input/tablet/wacom_serial4.c
246
wacom->dev->name = "Wacom Digitizer II";
drivers/input/tablet/wacom_serial4.c
247
wacom->dev->id.version = MODEL_DIGITIZER_II;
drivers/input/tablet/wacom_serial4.c
249
wacom->extra_z_bits = 0; /* UNTESTED */
drivers/input/tablet/wacom_serial4.c
253
dev_err(&wacom->dev->dev, "Unsupported Wacom model %s\n",
drivers/input/tablet/wacom_serial4.c
254
wacom->data);
drivers/input/tablet/wacom_serial4.c
255
wacom->result = -ENODEV;
drivers/input/tablet/wacom_serial4.c
259
dev_info(&wacom->dev->dev, "%s tablet, version %u.%u\n",
drivers/input/tablet/wacom_serial4.c
260
wacom->dev->name, major_v, minor_v);
drivers/input/tablet/wacom_serial4.c
263
static void wacom_handle_configuration_response(struct wacom *wacom)
drivers/input/tablet/wacom_serial4.c
267
dev_dbg(&wacom->dev->dev, "Configuration string: %s\n", wacom->data);
drivers/input/tablet/wacom_serial4.c
268
r = sscanf(wacom->data, "~R%x,%u,%u,%u,%u", &skip, &skip, &skip,
drivers/input/tablet/wacom_serial4.c
269
&wacom->res_x, &wacom->res_y);
drivers/input/tablet/wacom_serial4.c
271
dev_warn(&wacom->dev->dev, "could not get resolution\n");
drivers/input/tablet/wacom_serial4.c
274
static void wacom_handle_coordinates_response(struct wacom *wacom)
drivers/input/tablet/wacom_serial4.c
278
dev_dbg(&wacom->dev->dev, "Coordinates string: %s\n", wacom->data);
drivers/input/tablet/wacom_serial4.c
279
r = sscanf(wacom->data, "~C%u,%u", &wacom->max_x, &wacom->max_y);
drivers/input/tablet/wacom_serial4.c
281
dev_warn(&wacom->dev->dev, "could not get max coordinates\n");
drivers/input/tablet/wacom_serial4.c
284
static void wacom_handle_response(struct wacom *wacom)
drivers/input/tablet/wacom_serial4.c
286
if (wacom->data[0] != '~' || wacom->data[1] != wacom->expect) {
drivers/input/tablet/wacom_serial4.c
287
dev_err(&wacom->dev->dev,
drivers/input/tablet/wacom_serial4.c
288
"Wacom got an unexpected response: %s\n", wacom->data);
drivers/input/tablet/wacom_serial4.c
289
wacom->result = -EIO;
drivers/input/tablet/wacom_serial4.c
291
wacom->result = 0;
drivers/input/tablet/wacom_serial4.c
293
switch (wacom->data[1]) {
drivers/input/tablet/wacom_serial4.c
295
wacom_handle_model_response(wacom);
drivers/input/tablet/wacom_serial4.c
298
wacom_handle_configuration_response(wacom);
drivers/input/tablet/wacom_serial4.c
301
wacom_handle_coordinates_response(wacom);
drivers/input/tablet/wacom_serial4.c
306
complete(&wacom->cmd_done);
drivers/input/tablet/wacom_serial4.c
309
static void wacom_handle_packet(struct wacom *wacom)
drivers/input/tablet/wacom_serial4.c
315
in_proximity_p = wacom->data[0] & 0x40;
drivers/input/tablet/wacom_serial4.c
316
stylus_p = wacom->data[0] & 0x20;
drivers/input/tablet/wacom_serial4.c
317
button = (wacom->data[3] & 0x78) >> 3;
drivers/input/tablet/wacom_serial4.c
318
x = (wacom->data[0] & 3) << 14 | wacom->data[1]<<7 | wacom->data[2];
drivers/input/tablet/wacom_serial4.c
319
y = (wacom->data[3] & 3) << 14 | wacom->data[4]<<7 | wacom->data[5];
drivers/input/tablet/wacom_serial4.c
322
z = wacom->data[6] & 0x7f;
drivers/input/tablet/wacom_serial4.c
323
if (wacom->extra_z_bits >= 1)
drivers/input/tablet/wacom_serial4.c
324
z = z << 1 | (wacom->data[3] & 0x4) >> 2;
drivers/input/tablet/wacom_serial4.c
325
if (wacom->extra_z_bits > 1)
drivers/input/tablet/wacom_serial4.c
326
z = z << 1 | (wacom->data[0] & 0x4) >> 2;
drivers/input/tablet/wacom_serial4.c
327
z = z ^ (0x40 << wacom->extra_z_bits);
drivers/input/tablet/wacom_serial4.c
333
tool = (button & wacom->eraser_mask) ? ERASER : STYLUS;
drivers/input/tablet/wacom_serial4.c
337
if (tool != wacom->tool && wacom->tool != 0) {
drivers/input/tablet/wacom_serial4.c
338
input_report_key(wacom->dev, tools[wacom->tool].input_id, 0);
drivers/input/tablet/wacom_serial4.c
339
input_sync(wacom->dev);
drivers/input/tablet/wacom_serial4.c
341
wacom->tool = tool;
drivers/input/tablet/wacom_serial4.c
343
input_report_key(wacom->dev, tools[tool].input_id, in_proximity_p);
drivers/input/tablet/wacom_serial4.c
344
input_report_abs(wacom->dev, ABS_MISC,
drivers/input/tablet/wacom_serial4.c
346
input_report_abs(wacom->dev, ABS_X, x);
drivers/input/tablet/wacom_serial4.c
347
input_report_abs(wacom->dev, ABS_Y, y);
drivers/input/tablet/wacom_serial4.c
348
input_report_abs(wacom->dev, ABS_PRESSURE, z);
drivers/input/tablet/wacom_serial4.c
350
input_report_key(wacom->dev, BTN_TOUCH, button & 1);
drivers/input/tablet/wacom_serial4.c
351
input_report_key(wacom->dev, BTN_STYLUS, button & 2);
drivers/input/tablet/wacom_serial4.c
352
input_report_key(wacom->dev, BTN_STYLUS2, button & 4);
drivers/input/tablet/wacom_serial4.c
354
input_report_key(wacom->dev, BTN_LEFT, button & 1);
drivers/input/tablet/wacom_serial4.c
355
input_report_key(wacom->dev, BTN_RIGHT, button & 2);
drivers/input/tablet/wacom_serial4.c
356
input_report_key(wacom->dev, BTN_MIDDLE, button & 4);
drivers/input/tablet/wacom_serial4.c
358
z = (wacom->data[6] & 0x30) >> 4;
drivers/input/tablet/wacom_serial4.c
359
if (wacom->data[6] & 0x40)
drivers/input/tablet/wacom_serial4.c
361
input_report_rel(wacom->dev, REL_WHEEL, z);
drivers/input/tablet/wacom_serial4.c
363
input_sync(wacom->dev);
drivers/input/tablet/wacom_serial4.c
366
static void wacom_clear_data_buf(struct wacom *wacom)
drivers/input/tablet/wacom_serial4.c
368
memset(wacom->data, 0, DATA_SIZE);
drivers/input/tablet/wacom_serial4.c
369
wacom->idx = 0;
drivers/input/tablet/wacom_serial4.c
375
struct wacom *wacom = serio_get_drvdata(serio);
drivers/input/tablet/wacom_serial4.c
378
wacom->idx = 0;
drivers/input/tablet/wacom_serial4.c
389
if (data == '\r' && !(wacom->data[0] & 0x80)) {
drivers/input/tablet/wacom_serial4.c
390
wacom_handle_response(wacom);
drivers/input/tablet/wacom_serial4.c
391
wacom_clear_data_buf(wacom);
drivers/input/tablet/wacom_serial4.c
396
if (wacom->idx > (DATA_SIZE - 2)) {
drivers/input/tablet/wacom_serial4.c
397
dev_dbg(&wacom->dev->dev,
drivers/input/tablet/wacom_serial4.c
398
"throwing away %d bytes of garbage\n", wacom->idx);
drivers/input/tablet/wacom_serial4.c
399
wacom_clear_data_buf(wacom);
drivers/input/tablet/wacom_serial4.c
401
wacom->data[wacom->idx++] = data;
drivers/input/tablet/wacom_serial4.c
403
if (wacom->idx == PACKET_LENGTH && (wacom->data[0] & 0x80)) {
drivers/input/tablet/wacom_serial4.c
404
wacom_handle_packet(wacom);
drivers/input/tablet/wacom_serial4.c
405
wacom_clear_data_buf(wacom);
drivers/input/tablet/wacom_serial4.c
413
struct wacom *wacom = serio_get_drvdata(serio);
drivers/input/tablet/wacom_serial4.c
417
input_unregister_device(wacom->dev);
drivers/input/tablet/wacom_serial4.c
418
kfree(wacom);
drivers/input/tablet/wacom_serial4.c
431
static int wacom_send_setup_string(struct wacom *wacom, struct serio *serio)
drivers/input/tablet/wacom_serial4.c
435
switch (wacom->dev->id.version) {
drivers/input/tablet/wacom_serial4.c
464
static int wacom_send_and_wait(struct wacom *wacom, struct serio *serio,
drivers/input/tablet/wacom_serial4.c
470
wacom->expect = cmd[1];
drivers/input/tablet/wacom_serial4.c
471
init_completion(&wacom->cmd_done);
drivers/input/tablet/wacom_serial4.c
477
u = wait_for_completion_timeout(&wacom->cmd_done, HZ);
drivers/input/tablet/wacom_serial4.c
480
wacom_handle_response(wacom);
drivers/input/tablet/wacom_serial4.c
483
wacom->expect = 0;
drivers/input/tablet/wacom_serial4.c
484
return wacom->result;
drivers/input/tablet/wacom_serial4.c
487
static int wacom_setup(struct wacom *wacom, struct serio *serio)
drivers/input/tablet/wacom_serial4.c
494
err = wacom_send_and_wait(wacom, serio, REQUEST_MODEL_AND_ROM_VERSION,
drivers/input/tablet/wacom_serial4.c
499
if (!(wacom->res_x && wacom->res_y)) {
drivers/input/tablet/wacom_serial4.c
500
err = wacom_send_and_wait(wacom, serio,
drivers/input/tablet/wacom_serial4.c
507
if (!(wacom->max_x && wacom->max_y)) {
drivers/input/tablet/wacom_serial4.c
508
err = wacom_send_and_wait(wacom, serio,
drivers/input/tablet/wacom_serial4.c
515
return wacom_send_setup_string(wacom, serio);
drivers/input/tablet/wacom_serial4.c
520
struct wacom *wacom;
drivers/input/tablet/wacom_serial4.c
524
wacom = kzalloc_obj(*wacom);
drivers/input/tablet/wacom_serial4.c
526
if (!wacom || !input_dev)
drivers/input/tablet/wacom_serial4.c
529
wacom->dev = input_dev;
drivers/input/tablet/wacom_serial4.c
530
wacom->extra_z_bits = 1;
drivers/input/tablet/wacom_serial4.c
531
wacom->eraser_mask = 0x04;
drivers/input/tablet/wacom_serial4.c
532
wacom->tool = wacom->idx = 0;
drivers/input/tablet/wacom_serial4.c
533
snprintf(wacom->phys, sizeof(wacom->phys), "%s/input0", serio->phys);
drivers/input/tablet/wacom_serial4.c
534
input_dev->phys = wacom->phys;
drivers/input/tablet/wacom_serial4.c
552
serio_set_drvdata(serio, wacom);
drivers/input/tablet/wacom_serial4.c
558
err = wacom_setup(wacom, serio);
drivers/input/tablet/wacom_serial4.c
563
if (!(wacom->flags & F_COVERS_SCREEN))
drivers/input/tablet/wacom_serial4.c
566
if (wacom->flags & F_HAS_STYLUS2)
drivers/input/tablet/wacom_serial4.c
569
if (wacom->flags & F_HAS_SCROLLWHEEL)
drivers/input/tablet/wacom_serial4.c
572
input_abs_set_res(wacom->dev, ABS_X, wacom->res_x);
drivers/input/tablet/wacom_serial4.c
573
input_abs_set_res(wacom->dev, ABS_Y, wacom->res_y);
drivers/input/tablet/wacom_serial4.c
574
input_set_abs_params(wacom->dev, ABS_X, 0, wacom->max_x, 0, 0);
drivers/input/tablet/wacom_serial4.c
575
input_set_abs_params(wacom->dev, ABS_Y, 0, wacom->max_y, 0, 0);
drivers/input/tablet/wacom_serial4.c
576
input_set_abs_params(wacom->dev, ABS_PRESSURE, -1,
drivers/input/tablet/wacom_serial4.c
577
(1 << (7 + wacom->extra_z_bits)) - 1, 0, 0);
drivers/input/tablet/wacom_serial4.c
579
err = input_register_device(wacom->dev);
drivers/input/tablet/wacom_serial4.c
590
kfree(wacom);