Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 305074
b: refs/heads/master
c: b73b2da
h: refs/heads/master
v: v3
  • Loading branch information
Nikolai Kondrashov authored and Jiri Kosina committed Mar 28, 2012
1 parent 11ab006 commit 9976139
Show file tree
Hide file tree
Showing 5 changed files with 117 additions and 230 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4e52b538e31d8eca2dde1f01e0685977c19d006e
refs/heads/master: b73b2da0353d15b712b27b1aed3c50856bdfc341
8 changes: 0 additions & 8 deletions trunk/Documentation/ABI/testing/sysfs-driver-wacom
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,6 @@ Description:
or 0 otherwise. Writing to this file one of these values
switches reporting speed.

What: /sys/class/leds/0005\:056A\:00BD.0001\:selector\:*/
Date: May 2012
Kernel Version: 3.5
Contact: linux-bluetooth@vger.kernel.org
Description:
LED selector for Intuos4 WL. There are 4 leds, but only one LED
can be lit at a time. Max brightness is 127.

What: /sys/bus/usb/devices/<busnum>-<devnum>:<cfg>.<intf>/wacom_led/led
Date: August 2011
Contact: linux-input@vger.kernel.org
Expand Down
10 changes: 8 additions & 2 deletions trunk/drivers/hid/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -595,10 +595,16 @@ config THRUSTMASTER_FF
config HID_WACOM
tristate "Wacom Bluetooth devices support"
depends on BT_HIDP
depends on LEDS_CLASS
---help---
Support for Wacom Graphire Bluetooth tablet.

config HID_WACOM_POWER_SUPPLY
bool "Wacom Bluetooth devices power supply status support"
depends on HID_WACOM
select POWER_SUPPLY
---help---
Support for Wacom Graphire Bluetooth and Intuos4 WL tablets.
Say Y here if you want to enable power supply status monitoring for
Wacom Bluetooth devices.

config HID_WIIMOTE
tristate "Nintendo Wii Remote support"
Expand Down
25 changes: 22 additions & 3 deletions trunk/drivers/hid/hid-input.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,10 @@ static __s32 hidinput_calc_abs_res(const struct hid_field *field, __u16 code)
* Verify and convert units.
* See HID specification v1.11 6.2.2.7 Global Items for unit decoding
*/
if (code == ABS_X || code == ABS_Y || code == ABS_Z) {
switch (code) {
case ABS_X:
case ABS_Y:
case ABS_Z:
if (field->unit == 0x11) { /* If centimeters */
/* Convert to millimeters */
unit_exponent += 1;
Expand All @@ -239,7 +242,13 @@ static __s32 hidinput_calc_abs_res(const struct hid_field *field, __u16 code)
} else {
return 0;
}
} else if (code == ABS_RX || code == ABS_RY || code == ABS_RZ) {
break;

case ABS_RX:
case ABS_RY:
case ABS_RZ:
case ABS_TILT_X:
case ABS_TILT_Y:
if (field->unit == 0x14) { /* If degrees */
/* Convert to radians */
prev = logical_extents;
Expand All @@ -250,7 +259,9 @@ static __s32 hidinput_calc_abs_res(const struct hid_field *field, __u16 code)
} else if (field->unit != 0x12) { /* If not radians */
return 0;
}
} else {
break;

default:
return 0;
}

Expand Down Expand Up @@ -623,6 +634,14 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
map_key_clear(BTN_TOOL_RUBBER);
break;

case 0x3d: /* X Tilt */
map_abs_clear(ABS_TILT_X);
break;

case 0x3e: /* Y Tilt */
map_abs_clear(ABS_TILT_Y);
break;

case 0x33: /* Touch */
case 0x42: /* TipSwitch */
case 0x43: /* TipSwitch2 */
Expand Down
Loading

0 comments on commit 9976139

Please sign in to comment.