From patchwork Tue Aug 24 18:05:38 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: simon@mungewell.org X-Patchwork-Id: 127391 X-Patchwork-Delegate: jikos@jikos.cz Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o7OI5i2t022858 for ; Tue, 24 Aug 2010 18:05:44 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755075Ab0HXSFo (ORCPT ); Tue, 24 Aug 2010 14:05:44 -0400 Received: from host171.canaca.com ([67.55.55.225]:40376 "EHLO host171.canaca.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752058Ab0HXSFn (ORCPT ); Tue, 24 Aug 2010 14:05:43 -0400 Received: from localhost ([127.0.0.1] helo=host171.canaca.com) by host171.canaca.com with esmtpa (Exim 4.69) (envelope-from ) id 1OnxsQ-0004iz-Uc; Tue, 24 Aug 2010 14:05:39 -0400 Received: from 68.147.1.71 ([68.147.1.71]) (SquirrelMail authenticated user simon@mungewell.org) by host171.canaca.com with HTTP; Tue, 24 Aug 2010 14:05:38 -0400 Message-ID: Date: Tue, 24 Aug 2010 14:05:38 -0400 Subject: [PATCH RESEND] HID USB: Add IDs for Logitech Wii Speed Force Wireless Wheel From: simon@mungewell.org To: linux-input@vger.kernel.org Cc: "Jiri Kosina" User-Agent: SquirrelMail/1.4.20 MIME-Version: 1.0 X-Priority: 3 (Normal) Importance: Normal X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - host171.canaca.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - mungewell.org X-Source: X-Source-Args: X-Source-Dir: Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Tue, 24 Aug 2010 18:05:44 +0000 (UTC) diff -ur linux-source-2.6.32/drivers/hid/hid-core.c linux-2.6.32-sdw/drivers/hid/hid-core.c --- linux-source-2.6.32/drivers/hid/hid-core.c 2010-07-28 00:06:55.000000000 -0600 +++ linux-2.6.32-sdw/drivers/hid/hid-core.c 2010-07-06 18:56:15.000000000 -0600 @@ -1329,6 +1329,7 @@ { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_MOMO_WHEEL) }, { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_MOMO_WHEEL2) }, { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_G25_WHEEL) }, + { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_WII_WHEEL) }, { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_RUMBLEPAD2) }, { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_SIDEWINDER_GV) }, { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_NE4K) }, diff -ur linux-source-2.6.32/drivers/hid/hid-ids.h linux-2.6.32-sdw/drivers/hid/hid-ids.h --- linux-source-2.6.32/drivers/hid/hid-ids.h 2010-07-28 00:06:55.000000000 -0600 +++ linux-2.6.32-sdw/drivers/hid/hid-ids.h 2010-07-06 18:55:19.000000000 -0600 @@ -308,6 +308,7 @@ #define USB_DEVICE_ID_LOGITECH_WINGMAN_FFG 0xc293 #define USB_DEVICE_ID_LOGITECH_MOMO_WHEEL 0xc295 #define USB_DEVICE_ID_LOGITECH_G25_WHEEL 0xc299 +#define USB_DEVICE_ID_LOGITECH_WII_WHEEL 0xc29c #define USB_DEVICE_ID_LOGITECH_ELITE_KBD 0xc30a #define USB_DEVICE_ID_S510_RECEIVER 0xc50c #define USB_DEVICE_ID_S510_RECEIVER_2 0xc517 diff -ur linux-source-2.6.32/drivers/hid/hid-lg.c linux-2.6.32-sdw/drivers/hid/hid-lg.c --- linux-source-2.6.32/drivers/hid/hid-lg.c 2009-12-02 20:51:21.000000000 -0700 +++ linux-2.6.32-sdw/drivers/hid/hid-lg.c 2010-07-12 21:18:31.222442036 -0600 @@ -33,6 +33,7 @@ #define LG_NOGET 0x100 #define LG_FF 0x200 #define LG_FF2 0x400 +#define LG_WIIWHEEL 0x2000 /* * Certain Logitech keyboards send in report #3 keys which are far @@ -51,6 +52,18 @@ rdesc[84] = rdesc[89] = 0x4d; rdesc[85] = rdesc[90] = 0x10; } + + if ((quirks & LG_WIIWHEEL) && rsize >= 101 && + rdesc[41] == 0x95 && rdesc[42] == 0x0B && + rdesc[47] == 0x05 && rdesc[48] == 0x09) { + dev_info(&hdev->dev, "fixing up Logitech WiiWheel button " + "descriptor\n"); + rdesc[41] = 0x05; + rdesc[42] = 0x09; + rdesc[47] = 0x95; + rdesc[48] = 0x0B; + } + } #define lg_map_key_clear(c) hid_map_usage_clear(hi, usage, bit, max, \ @@ -299,6 +312,8 @@ .driver_data = LG_FF }, { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_G25_WHEEL), .driver_data = LG_FF }, + { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_WII_WHEEL), + .driver_data = LG_FF | LG_WIIWHEEL }, { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_WINGMAN_FFG ), .driver_data = LG_FF }, { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_RUMBLEPAD2), diff -ur linux-source-2.6.32/drivers/hid/hid-lgff.c linux-2.6.32-sdw/drivers/hid/hid-lgff.c --- linux-source-2.6.32/drivers/hid/hid-lgff.c 2009-12-02 20:51:21.000000000 -0700 +++ linux-2.6.32-sdw/drivers/hid/hid-lgff.c 2010-07-12 21:16:40.890453659 -0600 @@ -70,6 +70,7 @@ { 0x046d, 0xc293, ff_joystick }, { 0x046d, 0xc294, ff_wheel }, { 0x046d, 0xc295, ff_joystick }, + { 0x046d, 0xc29c, ff_wheel }, { 0x046d, 0xca03, ff_wheel }, };