aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/tablet/wacom.h
diff options
context:
space:
mode:
authorChris Bagwell <chris@cnpbagwell.com>2012-03-26 02:26:20 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2012-03-26 02:32:59 -0400
commit16bf288c4be67b68c3fcb6561ff145702cb7bd22 (patch)
tree9ae5f770afa5812ebdb2f2b381cb1477a59f4f85 /drivers/input/tablet/wacom.h
parentd3825d51c3eddb8a3c7d1281f27181aff6db19b8 (diff)
Input: wacom - create inputs when wireless connect
When a tablet connect or disconnect is detected, schedule work queue to register or unregister related input devices. When a wireless tablet connects, it reports same USB PID used if tablet is connected with USB cable. Use this to update features values, set input capabilities, and then register device. From there, the Pen and Touch interfaces will reuse the existing tablet's IRQ routines. Its possible that 1 receiver is shared with 2 tablets with different PID (small and medium Bamboo for example) so the input is unregister at disconnect to better support this case. Signed-off-by: Chris Bagwell <chris@cnpbagwell.com> Tested-by: Jason Gerecke <killertofu@gmail.com> Acked-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/tablet/wacom.h')
-rw-r--r--drivers/input/tablet/wacom.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/input/tablet/wacom.h b/drivers/input/tablet/wacom.h
index 0783864a7dc2..febbfd9f3a84 100644
--- a/drivers/input/tablet/wacom.h
+++ b/drivers/input/tablet/wacom.h
@@ -112,6 +112,7 @@ struct wacom {
112 struct urb *irq; 112 struct urb *irq;
113 struct wacom_wac wacom_wac; 113 struct wacom_wac wacom_wac;
114 struct mutex lock; 114 struct mutex lock;
115 struct work_struct work;
115 bool open; 116 bool open;
116 char phys[32]; 117 char phys[32];
117 struct wacom_led { 118 struct wacom_led {
@@ -122,6 +123,12 @@ struct wacom {
122 } led; 123 } led;
123}; 124};
124 125
126static inline void wacom_schedule_work(struct wacom_wac *wacom_wac)
127{
128 struct wacom *wacom = container_of(wacom_wac, struct wacom, wacom_wac);
129 schedule_work(&wacom->work);
130}
131
125extern const struct usb_device_id wacom_ids[]; 132extern const struct usb_device_id wacom_ids[];
126 133
127void wacom_wac_irq(struct wacom_wac *wacom_wac, size_t len); 134void wacom_wac_irq(struct wacom_wac *wacom_wac, size_t len);