Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Fri, 25 Oct 2002 02:58:24 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Fri, 25 Oct 2002 02:58:23 -0400 Received: from 208-135-136-018.customer.apci.net ([208.135.136.18]:45841 "EHLO blessed") by vger.kernel.org with ESMTP id ; Fri, 25 Oct 2002 02:58:21 -0400 Date: Fri, 25 Oct 2002 02:04:25 -0500 (CDT) From: Josh Myer X-X-Sender: jbm@blessed To: linux-usb-devel@lists.sourceforge.net, Subject: [PATCH] KB Gear JamStudio USB Tablet Message-ID: MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="8323328-435837720-1035529465=:25878" Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 10928 Lines: 190 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. Send mail to mime@docserver.cac.washington.edu for more info. --8323328-435837720-1035529465=:25878 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 --8323328-435837720-1035529465=:25878 Content-Type: TEXT/plain; name="kbgear.diff" Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename="kbgear.diff" ZGlmZiAtdXJOIGxpbnV4LTIuNC4xOS9Eb2N1bWVudGF0aW9uL0NvbmZpZ3Vy ZS5oZWxwIGxpbn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X2lkcywNCit9Ow0KKw0KK3N0YXRpYyBpbnQgX19pbml0IGtidGFiX2lu aXQodm9pZCkNCit7DQorCXVzYl9yZWdpc3Rlcigma2J0YWJfZHJpdmVyKTsN CisJaW5mbyhEUklWRVJfVkVSU0lPTiAiICIgRFJJVkVSX0FVVEhPUik7DQor CWluZm8oRFJJVkVSX0RFU0MpOw0KKwlyZXR1cm4gMDsNCit9DQorDQorc3Rh dGljIHZvaWQgX19leGl0IGtidGFiX2V4aXQodm9pZCkNCit7DQorCXVzYl9k ZXJlZ2lzdGVyKCZrYnRhYl9kcml2ZXIpOw0KK30NCisNCittb2R1bGVfaW5p dChrYnRhYl9pbml0KTsNCittb2R1bGVfZXhpdChrYnRhYl9leGl0KTsNCg== --8323328-435837720-1035529465=:25878-- - 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/