Skip to content

Commit

Permalink
HID: wacom: Use half of brightness for low state
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Przemo Firszt authored and Jiri Kosina committed Aug 15, 2012
1 parent e8ff13b commit 530a76c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/hid/hid-wacom.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 530a76c

Please sign in to comment.