stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alex Manoussakis <amanou@gnu.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: stable@vger.kernel.org, Jiri Kosina <jikos@kernel.org>,
	Diego Elio Petteo <flameeyes@flameeyes.eu>
Subject: Re: [PATCH v1] HID: hid-elecom: extend to fix descriptor for HUGE trackball
Date: Tue, 17 Oct 2017 04:25:59 -0400	[thread overview]
Message-ID: <20171017082559.GA19402@gnu.org> (raw)
In-Reply-To: <20171017065856.GB24637@kroah.com>

> >   *  Copyright (c) 2010 Richard Nauber <Richard.Nauber@gmail.com>
> >   *  Copyright (c) 2016 Yuxuan Shui <yshuiv7@gmail.com>
> >   *  Copyright (c) 2017 Diego Elio Petten� <flameeyes@flameeyes.eu>
> > + *  Copyright (c) 2017 Alex Manoussakis <amanou@gnu.org>
> 
> Note, I'm not the maintainer, but you should be aware that adding a line
> like this, with only the changes as expressed in this patch, is very
> dubious according to every lawyer that I know.  Please be careful about
> stuff like this, and only add such a line if you really know what you
> are doing[1]
> 
> If you have done other changes to this file, my appologies...

Hi Greg, thanks for the note. The changes I have done is add new USB IDs and
change the text in a couple of places (both comments and messages) to include
the new model "HUGE" where it only said "DEFT".

We could remove the copyright line I added if it's a problem. I didn't give it
much thought. I copied the linux-input maintainer Jiri, and Diego who added the
code for the DEFT trackballs, in my mainline submission and both were ok
(Diego wrote me "The patch looks good to me", and Jiri submitted it) and now
it's in mainline. Copying Diego in this thread now too.

My goal is simply to make the trackball I purchased work in my favorite OS,
and benefit other users who have found or will find themselves with a semi-
working device otherwise. And push as far back as 4.4 since some very popular
long-term-support distros use this kernel, I use it too, and it works.

Can you commit the patch upstream ? Below is the patch that will apply clean
to 4.4 and 4.9, without the extra copyright line if you prefer to use that.
Note 4.4 and 4.9 need to cherry pick 0bb7a37f8d15e5fb5d21776875f9fbc74e10753a
as a prerequisite which adds support for the DEFT trackballs.

Should I submit a mainline patch that removes the Copyright line I added ?
Let me know what I should do and I'll be happy to do it.

Thanks!
Alex

Cc: Diego Elio Petten� <flameeyes@flameeyes.eu>

diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
index c376394a..d6e01a1 100644
--- a/drivers/hid/Kconfig
+++ b/drivers/hid/Kconfig
@@ -264,6 +264,7 @@ config HID_ELECOM
 	Support for ELECOM devices:
 	  - BM084 Bluetooth Mouse
 	  - DEFT Trackball (Wired and wireless)
+	  - HUGE Trackball (Wired and wireless)
 
 config HID_ELO
 	tristate "ELO USB 4000/4500 touchscreen"
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index 456fcf0..fbd5e66 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -1887,6 +1887,8 @@ static const struct hid_device_id hid_have_special_driver[] = {
 	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_BM084) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_DEFT_WIRED) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_DEFT_WIRELESS) },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_HUGE_WIRED) },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_HUGE_WIRELESS) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_ELO, 0x0009) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_ELO, 0x0030) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_EMS, USB_DEVICE_ID_EMS_TRIO_LINKER_PLUS_II) },
diff --git a/drivers/hid/hid-elecom.c b/drivers/hid/hid-elecom.c
index e2c7465..54aeea5 100644
--- a/drivers/hid/hid-elecom.c
+++ b/drivers/hid/hid-elecom.c
@@ -32,9 +33,11 @@ static __u8 *elecom_report_fixup(struct hid_device *hdev, __u8 *rdesc,
 		break;
 	case USB_DEVICE_ID_ELECOM_DEFT_WIRED:
 	case USB_DEVICE_ID_ELECOM_DEFT_WIRELESS:
-		/* The DEFT trackball has eight buttons, but its descriptor only
-		 * reports five, disabling the three Fn buttons on the top of
-		 * the mouse.
+	case USB_DEVICE_ID_ELECOM_HUGE_WIRED:
+	case USB_DEVICE_ID_ELECOM_HUGE_WIRELESS:
+		/* The DEFT/HUGE trackball has eight buttons, but its descriptor
+		 * only reports five, disabling the three Fn buttons on the top
+		 * of the mouse.
 		 *
 		 * Apply the following diff to the descriptor:
 		 *
@@ -62,7 +65,7 @@ static __u8 *elecom_report_fixup(struct hid_device *hdev, __u8 *rdesc,
 		 * End Collection,                     End Collection,
 		 */
 		if (*rsize == 213 && rdesc[13] == 5 && rdesc[21] == 5) {
-			hid_info(hdev, "Fixing up Elecom DEFT Fn buttons\n");
+			hid_info(hdev, "Fixing up Elecom DEFT/HUGE Fn buttons\n");
 			rdesc[13] = 8; /* Button/Variable Report Count */
 			rdesc[21] = 8; /* Button/Variable Usage Maximum */
 			rdesc[29] = 0; /* Button/Constant Report Count */
@@ -76,6 +79,8 @@ static const struct hid_device_id elecom_devices[] = {
 	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_BM084) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_DEFT_WIRED) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_DEFT_WIRELESS) },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_HUGE_WIRED) },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_HUGE_WIRELESS) },
 	{ }
 };
 MODULE_DEVICE_TABLE(hid, elecom_devices);
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
index dbf7077..06ce846 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -355,6 +355,8 @@
 #define USB_DEVICE_ID_ELECOM_BM084	0x0061
 #define USB_DEVICE_ID_ELECOM_DEFT_WIRED	0x00fe
 #define USB_DEVICE_ID_ELECOM_DEFT_WIRELESS	0x00ff
+#define USB_DEVICE_ID_ELECOM_HUGE_WIRED	0x010c
+#define USB_DEVICE_ID_ELECOM_HUGE_WIRELESS	0x010d
 
 #define USB_VENDOR_ID_DREAM_CHEEKY	0x1d34
 #define USB_DEVICE_ID_DREAM_CHEEKY_WN	0x0004

  reply	other threads:[~2017-10-17  8:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-14  3:23 [PATCH v1] HID: hid-elecom: extend to fix descriptor for HUGE trackball Alex Manoussakis
2017-10-16 20:20 ` Alex Manoussakis
2017-10-17  6:58   ` Greg Kroah-Hartman
2017-10-17  8:25     ` Alex Manoussakis [this message]
2017-10-17  8:35       ` Greg Kroah-Hartman
2017-10-19  9:35   ` Greg Kroah-Hartman
2017-10-19 11:07     ` Jiri Kosina
2017-10-19 12:53       ` Greg Kroah-Hartman
2017-10-19 13:44     ` Alex Manoussakis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171017082559.GA19402@gnu.org \
    --to=amanou@gnu.org \
    --cc=flameeyes@flameeyes.eu \
    --cc=gregkh@linuxfoundation.org \
    --cc=jikos@kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).