* Re: [PATCH] HID: add driver for Roccat Kone gaming mouse 2nd Attempt
[not found] <1268926981.11269.3.camel@localhost>
@ 2010-03-22 8:41 ` Jiri Kosina
2010-03-22 14:48 ` [PATCH 2/2] Updated hid_blacklist, reformatted code and removed unused variable Stefan Achatz
0 siblings, 1 reply; 5+ messages in thread
From: Jiri Kosina @ 2010-03-22 8:41 UTC (permalink / raw)
To: Stefan Achatz
Cc: Randy Dunlap, Stephane Chatty, Jussi Kivilinna, wylda,
Michael Poole, simon.windows, Sean Hildebrand, Sid Boyce,
linux-kernel, linux-doc, linux-input
On Thu, 18 Mar 2010, Stefan Achatz wrote:
> --- a/drivers/hid/hid-ids.h
> +++ b/drivers/hid/hid-ids.h
> @@ -399,6 +399,9 @@
> #define USB_VENDOR_ID_PRODIGE 0x05af
> #define USB_DEVICE_ID_PRODIGE_CORDLESS 0x3062
>
> +#define USB_VENDOR_ID_ROCCAT 0x1e7d
> +#define USB_DEVICE_ID_ROCCAT_KONE 0x2ced
> +
Hi Stefan,
I guess you also need hid_blacklist[] entry for these device IDs, so that
generic HID driver doesn't grab the device before your driver gets to it,
right?
> +static struct hid_driver kone_driver = { .name = "kone",
> + .id_table = kone_devices, .probe = kone_probe,
> + .remove = kone_remove, .raw_event = kone_raw_event, };
Could you please put each filed that is being initialized on a separate
line?
Other than that, the patch looks quite fine to me.
Thanks,
--
Jiri Kosina
SUSE Labs, Novell Inc.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/2] Updated hid_blacklist, reformatted code and removed unused variable
2010-03-22 8:41 ` [PATCH] HID: add driver for Roccat Kone gaming mouse 2nd Attempt Jiri Kosina
@ 2010-03-22 14:48 ` Stefan Achatz
2010-03-22 14:53 ` Jiri Kosina
0 siblings, 1 reply; 5+ messages in thread
From: Stefan Achatz @ 2010-03-22 14:48 UTC (permalink / raw)
To: Jiri Kosina
Cc: Randy Dunlap, Stephane Chatty, Jussi Kivilinna, wylda,
Michael Poole, simon.windows, Sean Hildebrand, Sid Boyce,
linux-kernel, linux-doc, linux-input
Updated hid_blacklist[] so that generic driver keeps his hands off.
Reformatted code so that definition of kone_driver and kone_devices[]
have one initialization per line and closing brace is on extra line.
Removed an unused variable declaration.
Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net>
---
drivers/hid/hid-core.c | 1 +
drivers/hid/hid-roccat-kone.c | 15 ++++++++++-----
2 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index 368fbb0..dbd6fb8 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -1346,6 +1346,7 @@ static const struct hid_device_id hid_blacklist[] = {
{ HID_USB_DEVICE(USB_VENDOR_ID_PETALYNX, USB_DEVICE_ID_PETALYNX_MAXTER_REMOTE) },
{ HID_USB_DEVICE(USB_VENDOR_ID_QUANTA, USB_DEVICE_ID_QUANTA_OPTICAL_TOUCH) },
{ HID_USB_DEVICE(USB_VENDOR_ID_QUANTA, USB_DEVICE_ID_PIXART_IMAGING_INC_OPTICAL_TOUCH_SCREEN) },
+ { HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_KONE) },
{ HID_USB_DEVICE(USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_IR_REMOTE) },
{ HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS3_CONTROLLER) },
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS3_CONTROLLER) },
diff --git a/drivers/hid/hid-roccat-kone.c b/drivers/hid/hid-roccat-kone.c
index 1a5e993..2b1412e 100644
--- a/drivers/hid/hid-roccat-kone.c
+++ b/drivers/hid/hid-roccat-kone.c
@@ -509,7 +509,7 @@ static ssize_t kone_sysfs_set_tcu(struct device *dev,
{
struct kone_device *kone = hid_get_drvdata(dev_get_drvdata(dev));
struct usb_device *usb_dev = interface_to_usbdev(to_usb_interface(dev));
- int retval, checksum;
+ int retval;
unsigned long state;
retval = strict_strtoul(buf, 10, &state);
@@ -975,13 +975,18 @@ static int kone_raw_event(struct hid_device *hdev, struct hid_report *report,
static const struct hid_device_id kone_devices[] = {
{ HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_KONE) },
- { } };
+ { }
+};
MODULE_DEVICE_TABLE(hid, kone_devices);
-static struct hid_driver kone_driver = { .name = "kone",
- .id_table = kone_devices, .probe = kone_probe,
- .remove = kone_remove, .raw_event = kone_raw_event, };
+static struct hid_driver kone_driver = {
+ .name = "kone",
+ .id_table = kone_devices,
+ .probe = kone_probe,
+ .remove = kone_remove,
+ .raw_event = kone_raw_event
+};
static int kone_init(void)
{
--
1.6.6.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] Updated hid_blacklist, reformatted code and removed unused variable
2010-03-22 14:48 ` [PATCH 2/2] Updated hid_blacklist, reformatted code and removed unused variable Stefan Achatz
@ 2010-03-22 14:53 ` Jiri Kosina
2010-03-22 15:14 ` Stefan Achatz
0 siblings, 1 reply; 5+ messages in thread
From: Jiri Kosina @ 2010-03-22 14:53 UTC (permalink / raw)
To: Stefan Achatz
Cc: Randy Dunlap, Stephane Chatty, Jussi Kivilinna, wylda,
Michael Poole, simon.windows, Sean Hildebrand, Sid Boyce,
linux-kernel, linux-doc, linux-input
On Mon, 22 Mar 2010, Stefan Achatz wrote:
> Updated hid_blacklist[] so that generic driver keeps his hands off.
> Reformatted code so that definition of kone_driver and kone_devices[]
> have one initialization per line and closing brace is on extra line.
> Removed an unused variable declaration.
>
> Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net>
> ---
> drivers/hid/hid-core.c | 1 +
> drivers/hid/hid-roccat-kone.c | 15 ++++++++++-----
> 2 files changed, 11 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
> index 368fbb0..dbd6fb8 100644
> --- a/drivers/hid/hid-core.c
> +++ b/drivers/hid/hid-core.c
> @@ -1346,6 +1346,7 @@ static const struct hid_device_id hid_blacklist[] = {
> { HID_USB_DEVICE(USB_VENDOR_ID_PETALYNX, USB_DEVICE_ID_PETALYNX_MAXTER_REMOTE) },
> { HID_USB_DEVICE(USB_VENDOR_ID_QUANTA, USB_DEVICE_ID_QUANTA_OPTICAL_TOUCH) },
> { HID_USB_DEVICE(USB_VENDOR_ID_QUANTA, USB_DEVICE_ID_PIXART_IMAGING_INC_OPTICAL_TOUCH_SCREEN) },
> + { HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_KONE) },
> { HID_USB_DEVICE(USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_IR_REMOTE) },
> { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS3_CONTROLLER) },
> { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS3_CONTROLLER) },
Thanks for the fix. I only wonder how well has the driver been tested, as
without this change it couldn't get to operate the device at all ... ?
Thanks,
--
Jiri Kosina
SUSE Labs, Novell Inc.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] Updated hid_blacklist, reformatted code and removed unused variable
2010-03-22 14:53 ` Jiri Kosina
@ 2010-03-22 15:14 ` Stefan Achatz
2010-03-22 15:27 ` Jiri Kosina
0 siblings, 1 reply; 5+ messages in thread
From: Stefan Achatz @ 2010-03-22 15:14 UTC (permalink / raw)
To: Jiri Kosina
Cc: Randy Dunlap, Stephane Chatty, Jussi Kivilinna, wylda,
Michael Poole, simon.windows, Sean Hildebrand, Sid Boyce,
linux-kernel, linux-doc, linux-input
Am Montag, 22. März 2010 schrieb Jiri Kosina:
> On Mon, 22 Mar 2010, Stefan Achatz wrote:
> > Updated hid_blacklist[] so that generic driver keeps his hands off.
> > Reformatted code so that definition of kone_driver and kone_devices[]
> > have one initialization per line and closing brace is on extra line.
> > Removed an unused variable declaration.
> >
> > Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net>
> > ---
> > drivers/hid/hid-core.c | 1 +
> > drivers/hid/hid-roccat-kone.c | 15 ++++++++++-----
> > 2 files changed, 11 insertions(+), 5 deletions(-)
> >
> > diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
> > index 368fbb0..dbd6fb8 100644
> > --- a/drivers/hid/hid-core.c
> > +++ b/drivers/hid/hid-core.c
> > @@ -1346,6 +1346,7 @@ static const struct hid_device_id hid_blacklist[] =
> > { { HID_USB_DEVICE(USB_VENDOR_ID_PETALYNX,
> > USB_DEVICE_ID_PETALYNX_MAXTER_REMOTE) }, {
> > HID_USB_DEVICE(USB_VENDOR_ID_QUANTA, USB_DEVICE_ID_QUANTA_OPTICAL_TOUCH)
> > }, { HID_USB_DEVICE(USB_VENDOR_ID_QUANTA,
> > USB_DEVICE_ID_PIXART_IMAGING_INC_OPTICAL_TOUCH_SCREEN) }, + {
> > HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_KONE) }, {
> > HID_USB_DEVICE(USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_IR_REMOTE) },
> > { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS3_CONTROLLER)
> > }, { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY,
> > USB_DEVICE_ID_SONY_PS3_CONTROLLER) },
>
> Thanks for the fix. I only wonder how well has the driver been tested, as
> without this change it couldn't get to operate the device at all ... ?
>
> Thanks,
Hi,
As most testing was done with external module compilation on different kernel
versions with generic hid compiled as internal or as module I have a script
that uses the drivers sysfs bind/unbind funtionality to switch from generic
hid to kone driver. Thats issued via udev and was active all the time.
Have a nice day,
Stefan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] Updated hid_blacklist, reformatted code and removed unused variable
2010-03-22 15:14 ` Stefan Achatz
@ 2010-03-22 15:27 ` Jiri Kosina
0 siblings, 0 replies; 5+ messages in thread
From: Jiri Kosina @ 2010-03-22 15:27 UTC (permalink / raw)
To: Stefan Achatz
Cc: Randy Dunlap, Stephane Chatty, Jussi Kivilinna, wylda,
Michael Poole, simon.windows, Sean Hildebrand, Sid Boyce,
linux-kernel, linux-doc, linux-input
On Mon, 22 Mar 2010, Stefan Achatz wrote:
> > > diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
> > > index 368fbb0..dbd6fb8 100644
> > > --- a/drivers/hid/hid-core.c
> > > +++ b/drivers/hid/hid-core.c
> > > @@ -1346,6 +1346,7 @@ static const struct hid_device_id hid_blacklist[] =
> > > { { HID_USB_DEVICE(USB_VENDOR_ID_PETALYNX,
> > > USB_DEVICE_ID_PETALYNX_MAXTER_REMOTE) }, {
> > > HID_USB_DEVICE(USB_VENDOR_ID_QUANTA, USB_DEVICE_ID_QUANTA_OPTICAL_TOUCH)
> > > }, { HID_USB_DEVICE(USB_VENDOR_ID_QUANTA,
> > > USB_DEVICE_ID_PIXART_IMAGING_INC_OPTICAL_TOUCH_SCREEN) }, + {
> > > HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_KONE) }, {
> > > HID_USB_DEVICE(USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_IR_REMOTE) },
> > > { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS3_CONTROLLER)
> > > }, { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY,
> > > USB_DEVICE_ID_SONY_PS3_CONTROLLER) },
> >
> > Thanks for the fix. I only wonder how well has the driver been tested, as
> > without this change it couldn't get to operate the device at all ... ?
> >
> > Thanks,
>
> Hi,
>
> As most testing was done with external module compilation on different kernel
> versions with generic hid compiled as internal or as module I have a script
> that uses the drivers sysfs bind/unbind funtionality to switch from generic
> hid to kone driver. Thats issued via udev and was active all the time.
OK, thanks.
I will fold the patches into one, and I will also make the driver
independent on CONFIG_EMBEDDED, to be comopatible with other HID drivers
which are not simple quirks, but rather full, stand-alone HID device
drivers.
Thanks,
--
Jiri Kosina
SUSE Labs, Novell Inc.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-03-22 15:27 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1268926981.11269.3.camel@localhost>
2010-03-22 8:41 ` [PATCH] HID: add driver for Roccat Kone gaming mouse 2nd Attempt Jiri Kosina
2010-03-22 14:48 ` [PATCH 2/2] Updated hid_blacklist, reformatted code and removed unused variable Stefan Achatz
2010-03-22 14:53 ` Jiri Kosina
2010-03-22 15:14 ` Stefan Achatz
2010-03-22 15:27 ` Jiri Kosina
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox