All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] HID: wacom: leds: Don't try to control the EKR's read-only LEDs
@ 2017-08-28 21:15 Aaron Armstrong Skomra
  2017-08-29 16:24 ` Jason Gerecke
  2017-09-06  8:48 ` Jiri Kosina
  0 siblings, 2 replies; 3+ messages in thread
From: Aaron Armstrong Skomra @ 2017-08-28 21:15 UTC (permalink / raw)
  To: linux-input, pinglinux, killertofu, jkosina, benjamin.tissoires
  Cc: Aaron Armstrong Skomra, stable # 4 . 9, Aaron Armstrong Skomra

Commit a50aac7193f1 introduces 'led.groups' and adds EKR support
for these groups. However, unlike the other devices with LEDs,
the EKR's LEDs are read-only and we shouldn't attempt to control
them in wacom_led_control().

See bug: https://sourceforge.net/p/linuxwacom/bugs/342/

Fixes: a50aac7193f1 ("HID: wacom: leds: dynamically allocate LED groups")
Cc: stable <stable@vger.kernel.org>     # 4.9
Signed-off-by: Aaron Armstrong Skomra <aaron.skomra@wacom.com>
---
 drivers/hid/wacom_sys.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/hid/wacom_sys.c b/drivers/hid/wacom_sys.c
index 838c1ebfffa9..db1f64dcb9ba 100644
--- a/drivers/hid/wacom_sys.c
+++ b/drivers/hid/wacom_sys.c
@@ -766,6 +766,9 @@ static int wacom_led_control(struct wacom *wacom)
 	if (!wacom->led.groups)
 		return -ENOTSUPP;
 
+	if (wacom->wacom_wac.features.type == REMOTE)
+		return -ENOTSUPP;
+
 	if (wacom->wacom_wac.pid) { /* wireless connected */
 		report_id = WAC_CMD_WL_LED_CONTROL;
 		buf_size = 13;
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] HID: wacom: leds: Don't try to control the EKR's read-only LEDs
  2017-08-28 21:15 [PATCH] HID: wacom: leds: Don't try to control the EKR's read-only LEDs Aaron Armstrong Skomra
@ 2017-08-29 16:24 ` Jason Gerecke
  2017-09-06  8:48 ` Jiri Kosina
  1 sibling, 0 replies; 3+ messages in thread
From: Jason Gerecke @ 2017-08-29 16:24 UTC (permalink / raw)
  To: Aaron Armstrong Skomra
  Cc: Linux Input, Ping Cheng, Jiri Kosina, Benjamin Tissoires,
	stable # 4 . 9, Aaron Armstrong Skomra

On Mon, Aug 28, 2017 at 2:15 PM, Aaron Armstrong Skomra
<skomra@gmail.com> wrote:
>
> Commit a50aac7193f1 introduces 'led.groups' and adds EKR support
> for these groups. However, unlike the other devices with LEDs,
> the EKR's LEDs are read-only and we shouldn't attempt to control
> them in wacom_led_control().
>
> See bug: https://sourceforge.net/p/linuxwacom/bugs/342/
>
> Fixes: a50aac7193f1 ("HID: wacom: leds: dynamically allocate LED groups")
> Cc: stable <stable@vger.kernel.org>     # 4.9
> Signed-off-by: Aaron Armstrong Skomra <aaron.skomra@wacom.com>

Looks good to me:
Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com>

Jason
---
Now instead of four in the eights place /
you’ve got three, ‘Cause you added one  /
(That is to say, eight) to the two,     /
But you can’t take seven from three,    /
So you look at the sixty-fours....

>
> ---
>  drivers/hid/wacom_sys.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/hid/wacom_sys.c b/drivers/hid/wacom_sys.c
> index 838c1ebfffa9..db1f64dcb9ba 100644
> --- a/drivers/hid/wacom_sys.c
> +++ b/drivers/hid/wacom_sys.c
> @@ -766,6 +766,9 @@ static int wacom_led_control(struct wacom *wacom)
>         if (!wacom->led.groups)
>                 return -ENOTSUPP;
>
> +       if (wacom->wacom_wac.features.type == REMOTE)
> +               return -ENOTSUPP;
> +
>         if (wacom->wacom_wac.pid) { /* wireless connected */
>                 report_id = WAC_CMD_WL_LED_CONTROL;
>                 buf_size = 13;
> --
> 2.7.4
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] HID: wacom: leds: Don't try to control the EKR's read-only LEDs
  2017-08-28 21:15 [PATCH] HID: wacom: leds: Don't try to control the EKR's read-only LEDs Aaron Armstrong Skomra
  2017-08-29 16:24 ` Jason Gerecke
@ 2017-09-06  8:48 ` Jiri Kosina
  1 sibling, 0 replies; 3+ messages in thread
From: Jiri Kosina @ 2017-09-06  8:48 UTC (permalink / raw)
  To: Aaron Armstrong Skomra
  Cc: linux-input, pinglinux, killertofu, benjamin.tissoires, stable,
	Aaron Armstrong Skomra

On Mon, 28 Aug 2017, Aaron Armstrong Skomra wrote:

> Commit a50aac7193f1 introduces 'led.groups' and adds EKR support
> for these groups. However, unlike the other devices with LEDs,
> the EKR's LEDs are read-only and we shouldn't attempt to control
> them in wacom_led_control().
> 
> See bug: https://sourceforge.net/p/linuxwacom/bugs/342/
> 
> Fixes: a50aac7193f1 ("HID: wacom: leds: dynamically allocate LED groups")
> Cc: stable <stable@vger.kernel.org>     # 4.9
> Signed-off-by: Aaron Armstrong Skomra <aaron.skomra@wacom.com>

Applied to for-4.14/upstream-fixes.

-- 
Jiri Kosina
SUSE Labs

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-09-06  8:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-28 21:15 [PATCH] HID: wacom: leds: Don't try to control the EKR's read-only LEDs Aaron Armstrong Skomra
2017-08-29 16:24 ` Jason Gerecke
2017-09-06  8:48 ` Jiri Kosina

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.