2002-10-25 06:58:24

by Josh Myer

[permalink] [raw]
Subject: [PATCH] KB Gear JamStudio USB Tablet

Attached is a patch against 2.4.19 for basic support of the KB Gear
JamStudio USB tablet (it's a decent enough 30$ tablet--not quite wacom
quality, but definitely not wacom pricing).

Comments highly encouraged, thanks. I'd like to get this driver cleaned up
a little before submitting, but I'm not quite certain where to start.

The code is based heavily on the wacom driver, and a big "You Rule!" to
Pavel and anyone else involved with the Input layer. It may be a little
convoluted, and slightly non-intuitive, but it's a hell of a lot better
than the USB HID spec!
--
/jbm, but you can call me Josh. Really, you can!
this signature brought to you by the phrase,
"this signature brought to you by the phrase,
'...' and contributions by viewers like you"
7958 1C1C 306A CDF8 4468 3EDE 1F93 F49D 5FA1 49C4


Attachments:
kbgear.diff (6.68 kB)

2002-10-25 07:27:28

by Brad Hards

[permalink] [raw]
Subject: Re: [PATCH] KB Gear JamStudio USB Tablet

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Fri, 25 Oct 2002 17:04, Josh Myer wrote:
> Comments highly encouraged, thanks. I'd like to get this driver cleaned up
> a little before submitting, but I'm not quite certain where to start.
My initial thought is you are missing an input_sync() call in your irq()
function.
When you go to 2.5, you also need the new input_init_dev() call.
Maybe a physical path? [ might need 2.5 for that too ]

> The code is based heavily on the wacom driver, and a big "You Rule!" to
> Pavel and anyone else involved with the Input layer. It may be a little
Vojtech is the man.

> convoluted, and slightly non-intuitive, but it's a hell of a lot better
> than the USB HID spec!
Anything looks good if you compare it to a low enough standard :)

- --
http://linux.conf.au. 22-25Jan2003. Perth, Aust. I'm registered. Are you?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE9uPHQW6pHgIdAuOMRAhSxAJ94t+o/pc+XulH6ExISIpqN0lW+rQCgh8l1
kSFzdywZDVJpBN5+EcBUvPw=
=NuuF
-----END PGP SIGNATURE-----

2002-10-25 16:34:16

by Stephen Wille Padnos

[permalink] [raw]
Subject: Re: [PATCH] KB Gear JamStudio USB Tablet

It might not hurt to change the configure help text so that the correct
module name is displayed :)

- The module will be called wacom.o. If you want to compile it as a
+ The module will be called kbpad.o. If you want to compile it as a




2002-10-25 16:38:19

by Josh Myer

[permalink] [raw]
Subject: Re: [PATCH] KB Gear JamStudio USB Tablet

You know, that might not hurt. Applied.

I didn't just cut and paste that bit. Really... *innocent whistling*
--
/jbm, but you can call me Josh. Really, you can!
this signature brought to you by the phrase,
"this signature brought to you by the phrase,
'...' and contributions by viewers like you"
7958 1C1C 306A CDF8 4468 3EDE 1F93 F49D 5FA1 49C4

On Fri, 25 Oct 2002, Stephen Wille Padnos wrote:

> It might not hurt to change the configure help text so that the correct
> module name is displayed :)
>
> - The module will be called wacom.o. If you want to compile it as a
> + The module will be called kbpad.o. If you want to compile it as a
>
>
>
>
>

2002-10-25 17:13:33

by Greg KH

[permalink] [raw]
Subject: Re: [linux-usb-devel] [PATCH] KB Gear JamStudio USB Tablet

On Fri, Oct 25, 2002 at 02:04:25AM -0500, Josh Myer wrote:
> +static void kbtab_irq(struct urb *urb)
> +{
> +
> + struct kbtab *tab = urb->context;
> + unsigned char *data = tab->data;
> + struct input_dev *dev = &tab->dev;
> +
> + if(urb->status)
> + return;

Please use tabs instead of spaces. Documentation/CodingStyle has these
rules if you haven't read it yet.

> + FILL_INT_URB(&kbtab->irq, dev, usb_rcvintpipe(dev, endpoint->bEndpointAddress),
> + kbtab->data, 8, kbtab_irq, kbtab, endpoint->bInterval);

Please use usb_fill_int_urb() for all new code, and don't use the
"old-style" macros.

> +static struct usb_driver kbtab_driver = {
> + name: "kbtab",
> + probe: kbtab_probe,
> + disconnect: kbtab_disconnect,
> + id_table: kbtab_ids,
> +};

C99 style initializers are a good idea:

> +static struct usb_driver kbtab_driver = {
> + .name = "kbtab",
> + .probe = kbtab_probe,
> + .disconnect = kbtab_disconnect,
> + .id_table = kbtab_ids,
> +};

Other than those minor things, looks good.

thanks,

greg k-h