Support kernel 3.17 and later

wacom.ko is switched from input/tablet to hid in version 3.17. Add
a new branch to support this change.

Signed-off-by: Ping Cheng <pingc@wacom.com>
HID: wacom - Add default permission defines for sysfs attributes

RW : ug=rw,o=r
WO : ug=w

And enabled reading relavent sysfs attributes.

Signed-off-by: Paul A. Tessier <phernost@gmail.com>
Signed-Off-by: Ping Cheng <pingc@wacom.com>
Tested-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
HID: wacom - Clean up of sysfs

changed to scnprintf(buf, PAGE_SIZE, ... ) as suggested in sysfs.txt
for show functions

Signed-off-by: Paul A. Tessier <phernost@gmail.com>
Signed-Off-by: Ping Cheng <pingc@wacom.com>
Tested-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
HID: wacom - remove report_id from wacom_get_report interface

It is assigned in buf[0] anyway.

Signed-off-by: Ping Cheng <pingc@wacom.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
HID: wacom - enable LED support for Wireless Intuos5/Pro

And associate all LED/OLED to PAD device

Signed-off-by: Ping Cheng <pingc@wacom.com>
Tested-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Backport: HID: wacom - Add default permission defines for sysfs attributes

HID: wacom - Add default permission defines for sysfs attributes

RW : ug=rw,o=r
WO : ug=w

And enabled reading relavent sysfs attributes.

Signed-off-by: Paul A. Tessier <phernost@gmail.com>
Signed-Off-by: Ping Cheng <pingc@wacom.com>
Tested-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Backport: HID: wacom - Clean up of sysfs

changed to scnprintf(buf, PAGE_SIZE, ... ) as suggested in sysfs.txt
for show functions

Signed-off-by: Paul A. Tessier <phernost@gmail.com>
Signed-Off-by: Ping Cheng <pingc@wacom.com>
Tested-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
 Backport: HID: wacom - enable LED support for Wireless Intuos5/Pro

For kernels older than 2.6.38, only updated existing LED code since
they do not support wireless (yet).

Signed-off-by: Ping Cheng <pingc@wacom.com>
Fix compile issues with 3.17 backports

Signed-off-by: Jason Gerecke <killertofu@gmail.com>
Fix compile issues with older drivers

* Add missing semicolon to 0x4004 definition (2.6.38)
* Remove duplicate device definition (2.6.30)
* Add missing closing brace (2.6.30)

Signed-off-by: Jason Gerecke <killertofu@gmail.com>
Change 3.17 branch dependency to CONFIG_HID_WACOM

Kernel 3.17 migrates the wacom.ko driver from the USB tree to the HID
tree and now uses the CONFIG_HID_WACOM flag.
Use backwards-compatible battery name only for first tablet

Attaching multiple wireless tablets to a system will cause a kernel
crash when both power supply nodes try to use the same name. The 3.17
kernel adds a unique suffix to the end of every device, but we can't
do that here if we want to be backwards compatible. Instead, we use the
suffix-less name only if it has not already been registered and use the
new behavior otherwise.

Fixes SF bug #248

Signed-off-by: Jason Gerecke <killertofu@gmail.com>
Use input_mt_get_slot_by_key wherever possible

Two-finger touch devices like the 0xd0 Bamboo directly use the finger
index as the slot number. This appears to cause problems in the form of
events randomly being dropped from the stream. After the upstream

 This patch changes the
implementation to match upstream which uses input_mt_get_slot_by_key
always (and seems to

 always use input_mt_get_slot_by_key, even for the
trivial two-finger case where the first and second fingers are always at
the first and second packet index.

Fixes SF bug #252

Signed-off-by: Jason Gerecke <killertofu@gmail.com>