From: "Rick L. Vinyard, Jr." <rvinyard@cs.nmsu.edu>
To: Pavel Machek <pavel@ucw.cz>
Cc: linux-kernel@vger.kernel.org, felipe.balbi@nokia.com,
jayakumar.lkml@gmail.com, linux-fbdev@vger.kernel.org,
krzysztof.h1@wp.pl, akpm@linux-foundation.org,
linux-usb@vger.kernel.org, oliver@neukum.org,
linux-input@vger.kernel.org, jkosina@suse.cz
Subject: Re: [PATCH] hid: Logitech G13 driver 0.0.3
Date: Thu, 07 Jan 2010 21:20:45 +0000 [thread overview]
Message-ID: <60d33f2f434689d056f668281abfb5b6.squirrel@intranet.cs.nmsu.edu> (raw)
In-Reply-To: <20100107193520.GA21695@elf.ucw.cz>
Pavel Machek wrote:
> On Thu 2010-01-07 09:23:24, Rick L. Vinyard Jr. wrote:
>>
>> This is a driver for the Logitech G13 gamepad, and contains three key
>> parts. Through the USB reports the device identifies itself as a HID,
>> and as
>> a result this driver is under the HID framework.
> ...
>> Although identified as a HID, the device does not support standard HID
>> input messages. As a result, a sub-input device is allocated and
>> registered separately in g13_probe(). The raw events are monitored
>
> Ok, so the device pretends to be a HID device, but it is not. that
> seems like rather poor reason...
>
>> --- /dev/null
>> +++ b/drivers/hid/hid-g13.c
>> @@ -0,0 +1,1598 @@
>
> ...to put it into hid directory.
>
From what I can tell it is compliant with the USB HID 1.11 standard.
However, it doesn't support standard HID input messages like a typical
mouse or keyboard device. Thus, there isn't anything for the generic
parser to parse. That's why everything (related to input interrupts) has
to be handled in the raw events.
While many aspects of the device, such as the M1-MR LED's don't provide an
LED (or similar) HID usage, they can be controlled with the generalized
get/set reports. For these I've used usbhid_submit_report() where
possible, so the driver itself relies most heavily on the usbhid framework
first and framebuffer second.
>> +#define G13_G1 0
>> +#define G13_G2 1
>> +#define G13_G3 2
>> +#define G13_G4 3
>> +#define G13_G5 4
>> +#define G13_G6 5
>> +#define G13_G7 6
>> +#define G13_G8 7
>> +#define G13_G9 8
>> +#define G13_G10 9
>> +#define G13_G11 10
>> +#define G13_G12 11
>> +#define G13_G13 12
>> +#define G13_G14 13
>> +#define G13_G15 14
>> +#define G13_G16 15
>> +#define G13_G17 16
>> +#define G13_G18 17
>> +#define G13_G19 18
>> +#define G13_G20 19
>> +#define G13_G21 20
>> +#define G13_G22 21
>
> This looks like waste of space.
>
You're right. Those were used in an early version and are no longer needed
and can be replaced with a bit of documentation indicating which key maps
to which location in the keymap array. Especially for the ones that follow
such as:
#define G13_G19 18
#define G13_G20 19
#define G13_G21 20
#define G13_G22 21
#define G13_FUNC 22
#define G13_LCD1 23
#define G13_LCD2 24
#define G13_LCD3 25
#define G13_LCD4 26
#define G13_M1 27
#define G13_M2 28
#define G13_M3 29
#define G13_MR 30
#define G13_BTN_LEFT 31
#define G13_BTN_DOWN 32
#define G13_BTN_STICK 33
#define G13_LIGHT 34
next prev parent reply other threads:[~2010-01-07 21:20 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-07 16:23 [PATCH] hid: Logitech G13 driver 0.0.3 Rick L. Vinyard Jr.
2010-01-07 19:35 ` Pavel Machek
2010-01-07 21:20 ` Rick L. Vinyard, Jr. [this message]
2010-01-08 2:32 ` Jaya Kumar
2010-01-08 5:26 ` Rick L. Vinyard, Jr.
2010-01-09 13:43 ` Jiri Kosina
2010-01-14 18:24 ` Rick L. Vinyard, Jr.
2010-01-14 20:50 ` Best way to post Logitech G13 driver 0.0.4? Rick L. Vinyard, Jr.
2010-01-14 21:03 ` Pavel Machek
2010-01-14 22:05 ` Jiri Kosina
2010-01-08 8:30 ` [PATCH] hid: Logitech G13 driver 0.0.3 Dmitry Torokhov
2010-01-08 16:36 ` Pavel Machek
2010-01-08 16:50 ` Rick L. Vinyard, Jr.
2010-01-08 17:04 ` Pavel Machek
2010-01-08 17:13 ` Greg KH
2010-01-08 17:20 ` Dmitry Torokhov
[not found] ` <201001080920.51979.dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2010-01-08 17:43 ` Rick L. Vinyard, Jr.
2010-01-08 18:32 ` Rick L. Vinyard, Jr.
2010-01-08 20:49 ` Dmitry Torokhov
[not found] ` <20100108204946.GA22950-WlK9ik9hQGAhIp7JRqBPierSzoNAToWh@public.gmane.org>
2010-01-08 22:27 ` Rick L. Vinyard, Jr.
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=60d33f2f434689d056f668281abfb5b6.squirrel@intranet.cs.nmsu.edu \
--to=rvinyard@cs.nmsu.edu \
--cc=akpm@linux-foundation.org \
--cc=felipe.balbi@nokia.com \
--cc=jayakumar.lkml@gmail.com \
--cc=jkosina@suse.cz \
--cc=krzysztof.h1@wp.pl \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=oliver@neukum.org \
--cc=pavel@ucw.cz \
/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).