summaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-wacom.c
diff options
context:
space:
mode:
authorPrzemo Firszt <przemo@firszt.eu>2012-07-31 18:27:55 +0100
committerJiri Kosina <jkosina@suse.cz>2012-08-15 10:29:11 +0200
commit530a76c14f40012354074a02254b41cb171e122f (patch)
tree6cfaea8b7afdecf7f5b0f15ef091b67a328733e4 /drivers/hid/hid-wacom.c
parente8ff13b0bf88b5e696323a1eec877783d965b3c6 (diff)
HID: wacom: Use half of brightness for low state
Intuos4 WL leds have 2 states: high and low. With no activity tablet uses low state; using pen triggers high state. Both can be set independently, but it would require setting another led device to control them separately. This patch uses the brightness set through leds subsytem as high and half of that value as low. Signed-off-by: Przemo Firszt <przemo@firszt.eu> Acked-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-wacom.c')
-rw-r--r--drivers/hid/hid-wacom.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/hid/hid-wacom.c b/drivers/hid/hid-wacom.c
index fe23a1eb586..848842e0df1 100644
--- a/drivers/hid/hid-wacom.c
+++ b/drivers/hid/hid-wacom.c
@@ -91,7 +91,8 @@ static void wacom_leds_set_brightness(struct led_classdev *led_dev,
if (buf) {
buf[0] = WAC_CMD_LED_CONTROL;
buf[1] = led;
- buf[2] = value;
+ buf[2] = value >> 2;
+ buf[3] = value;
hdev->hid_output_raw_report(hdev, buf, 9, HID_FEATURE_REPORT);
kfree(buf);
}