diff mbox

[1/2] Input - Wacom: Fix transfer header problem

Message ID 1406375969-4453-1-git-send-email-przemo@firszt.eu (mailing list archive)
State New, archived
Headers show

Commit Message

Przemysław Firszt July 26, 2014, 11:59 a.m. UTC
Header of transfer of image is different depending on connection type.
That patch should be probably merged with 462c52a8cbcc62c
Input - wacom: Check for bluetooth protocol while setting OLEDs

Signed-off-by: Przemo Firszt <przemo@firszt.eu>
---
 drivers/hid/wacom_sys.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Benjamin Tissoires July 29, 2014, 6:14 p.m. UTC | #1
On Sat, Jul 26, 2014 at 7:59 AM, Przemo Firszt <przemo@firszt.eu> wrote:
> Header of transfer of image is different depending on connection type.
> That patch should be probably merged with 462c52a8cbcc62c
> Input - wacom: Check for bluetooth protocol while setting OLEDs
>
> Signed-off-by: Przemo Firszt <przemo@firszt.eu>
> ---

Thanks Przemo. I'll merge this one in the v3 of the wacom/BT/USB merge.
I'll let you add your s-o-b line once the patches will be on the list (soonish).

Cheers,
Benjamin

>  drivers/hid/wacom_sys.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/hid/wacom_sys.c b/drivers/hid/wacom_sys.c
> index 42f139f..51437e2 100644
> --- a/drivers/hid/wacom_sys.c
> +++ b/drivers/hid/wacom_sys.c
> @@ -19,6 +19,7 @@
>
>  #define WAC_CMD_LED_CONTROL    0x20
>  #define WAC_CMD_ICON_START     0x21
> +#define WAC_CMD_ICON_BT_XFER   0x26
>  #define WAC_CMD_ICON_XFER      0x23
>  #define WAC_CMD_RETRIES                10
>
> @@ -550,7 +551,7 @@ static int wacom_led_putimage(struct wacom *wacom, int button_id,
>         if (retval < 0)
>                 goto out;
>
> -       buf[0] = WAC_CMD_ICON_XFER;
> +       buf[0] = len == 256 ? WAC_CMD_ICON_BT_XFER : WAC_CMD_ICON_XFER;
>         buf[1] = button_id & 0x07;
>         for (i = 0; i < 4; i++) {
>                 buf[2] = i;
> --
> 1.9.3
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
--
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
diff mbox

Patch

diff --git a/drivers/hid/wacom_sys.c b/drivers/hid/wacom_sys.c
index 42f139f..51437e2 100644
--- a/drivers/hid/wacom_sys.c
+++ b/drivers/hid/wacom_sys.c
@@ -19,6 +19,7 @@ 
 
 #define WAC_CMD_LED_CONTROL	0x20
 #define WAC_CMD_ICON_START	0x21
+#define WAC_CMD_ICON_BT_XFER	0x26
 #define WAC_CMD_ICON_XFER	0x23
 #define WAC_CMD_RETRIES		10
 
@@ -550,7 +551,7 @@  static int wacom_led_putimage(struct wacom *wacom, int button_id,
 	if (retval < 0)
 		goto out;
 
-	buf[0] = WAC_CMD_ICON_XFER;
+	buf[0] = len == 256 ? WAC_CMD_ICON_BT_XFER : WAC_CMD_ICON_XFER;
 	buf[1] = button_id & 0x07;
 	for (i = 0; i < 4; i++) {
 		buf[2] = i;