Message ID | 1343755676-2999-1-git-send-email-przemo@firszt.eu (mailing list archive) |
---|---|
State | New, archived |
Delegated to: | Jiri Kosina |
Headers | show |
On Tue, Jul 31, 2012 at 10:27 AM, Przemo Firszt <przemo@firszt.eu> wrote: > 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> for the whole set. Thank you, Przemo, for your effort. Ping > --- > drivers/hid/hid-wacom.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/hid/hid-wacom.c b/drivers/hid/hid-wacom.c > index fe23a1e..848842e 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); > } > -- > 1.7.10.2 > -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Fri, 3 Aug 2012, Ping Cheng wrote: > On Tue, Jul 31, 2012 at 10:27 AM, Przemo Firszt <przemo@firszt.eu> wrote: > > 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> for the whole set. > > Thank you, Przemo, for your effort. I have now applied both patches, thank you guys.
diff --git a/drivers/hid/hid-wacom.c b/drivers/hid/hid-wacom.c index fe23a1e..848842e 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); }
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> --- drivers/hid/hid-wacom.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)