Commit 530a76c1 authored by Przemo Firszt's avatar Przemo Firszt Committed by Jiri Kosina

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: default avatarPrzemo Firszt <przemo@firszt.eu>
Acked-by: default avatarPing Cheng <pingc@wacom.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent e8ff13b0
...@@ -91,7 +91,8 @@ static void wacom_leds_set_brightness(struct led_classdev *led_dev, ...@@ -91,7 +91,8 @@ static void wacom_leds_set_brightness(struct led_classdev *led_dev,
if (buf) { if (buf) {
buf[0] = WAC_CMD_LED_CONTROL; buf[0] = WAC_CMD_LED_CONTROL;
buf[1] = led; buf[1] = led;
buf[2] = value; buf[2] = value >> 2;
buf[3] = value;
hdev->hid_output_raw_report(hdev, buf, 9, HID_FEATURE_REPORT); hdev->hid_output_raw_report(hdev, buf, 9, HID_FEATURE_REPORT);
kfree(buf); kfree(buf);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment