Skip to content

Commit 5d7e7d4

Browse files
seesturmdtor
authored andcommitted
Input: wacom - add Intuos4 LED and OLED control
This commit enables control of the LEDs and OLED displays found on the Wacom Intuos4 M, L, and XL. For this purpose, a new "wacom_led" attribute group is added to the sysfs entry of the USB device. This "wacom_led" group only shows up when the correct device (M, L, or XL) is detected. The attributes are described in Documentation/ABI/testing/sysfs-wacom Signed-off-by: Eduard Hasenleithner <eduard@hasenleithner.at> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
1 parent 7e66eaf commit 5d7e7d4

4 files changed

Lines changed: 341 additions & 40 deletions

File tree

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
What: /sys/class/hidraw/hidraw*/device/speed
2+
Date: April 2010
3+
Kernel Version: 2.6.35
4+
Contact: linux-bluetooth@vger.kernel.org
5+
Description:
6+
The /sys/class/hidraw/hidraw*/device/speed file controls
7+
reporting speed of Wacom bluetooth tablet. Reading from
8+
this file returns 1 if tablet reports in high speed mode
9+
or 0 otherwise. Writing to this file one of these values
10+
switches reporting speed.
11+
12+
What: /sys/bus/usb/devices/<busnum>-<devnum>:<cfg>.<intf>/wacom_led/led
13+
Date: August 2011
14+
Contact: linux-input@vger.kernel.org
15+
Description:
16+
Attribute group for control of the status LEDs and the OLED
17+
displays found on the Wacom Intuos 4 M, L, and XL tablets. This
18+
attribute group is not available for other Wacom tablets.
19+
Therefore its presence implicitly signifies the presence of
20+
said LEDs and OLED displays on the tablet device.
21+
22+
What: /sys/bus/usb/devices/<busnum>-<devnum>:<cfg>.<intf>/wacom_led/status0_luminance
23+
Date: August 2011
24+
Contact: linux-input@vger.kernel.org
25+
Description:
26+
Writing to this file sets the status LED luminance (0..127)
27+
when the stylus does not touch the tablet surface, and no
28+
button is pressed on the stylus.
29+
30+
What: /sys/bus/usb/devices/<busnum>-<devnum>:<cfg>.<intf>/wacom_led/status1_luminance
31+
Date: August 2011
32+
Contact: linux-input@vger.kernel.org
33+
Description:
34+
Writing to this file sets the status LED luminance (0..127)
35+
when the stylus touches the tablet surface, or any button is
36+
pressed on the stylus.
37+
38+
What: /sys/bus/usb/devices/<busnum>-<devnum>:<cfg>.<intf>/wacom_led/status_led_select
39+
Date: August 2011
40+
Contact: linux-input@vger.kernel.org
41+
Description:
42+
Writing to this file sets which one of the four status LEDs is
43+
active (0..3). The other three LEDs are always inactive. By
44+
means of specifying "-1" it is possible to set all status LEDs
45+
to inactive.
46+
47+
What: /sys/bus/usb/devices/<busnum>-<devnum>:<cfg>.<intf>/wacom_led/buttons_luminance
48+
Date: August 2011
49+
Contact: linux-input@vger.kernel.org
50+
Description:
51+
Writing to this file sets the overall luminance level (0..15)
52+
of all eight button OLED displays.
53+
54+
What: /sys/bus/usb/devices/<busnum>-<devnum>:<cfg>.<intf>/wacom_led/button<n>_rawimg
55+
Date: August 2011
56+
Contact: linux-input@vger.kernel.org
57+
Description:
58+
When writing a 1024 byte raw image in Wacom Intuos 4
59+
interleaving format to the file, the image shows up on Button N
60+
of the device. The image is a 64x32 pixel 4-bit gray image. The
61+
1024 byte binary is split up into 16x 64 byte chunks. Each 64
62+
byte chunk encodes the image data for two consecutive lines on
63+
the display. The low nibble of each byte contains the first
64+
line, and the high nibble contains the second line.

‎Documentation/ABI/testing/sysfs-wacom‎

Lines changed: 0 additions & 10 deletions
This file was deleted.

‎drivers/input/tablet/wacom.h‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,12 @@ struct wacom {
114114
struct mutex lock;
115115
bool open;
116116
char phys[32];
117+
struct wacom_led {
118+
u8 select; /* status led selector (0..3, -1=none) */
119+
u8 llv; /* status led brightness no button */
120+
u8 hlv; /* status led brightness button pressed */
121+
u8 img_lum; /* OLED matrix display brightness */
122+
} led;
117123
};
118124

119125
extern const struct usb_device_id wacom_ids[];

0 commit comments

Comments
 (0)