Skip to content

Commit 5f008c9

Browse files
author
Jiri Kosina
committed
Revert "INPUT: xpad: switch Logitech G920 Wheel into HID mode"
This reverts commit 27b9d5a. I am reverting this one, while keeping the rest of the G920 support in, so that it immediately starts working once proper HID-mode switching is implemented. Quoting Dmitry Torokhov for rationale: == It is wrong. Aside form the fact that IMO xpad.c is the wrong place for this code to be in, why are we waiting for the input device to be opened by userspace before we do the switch instead of doing it immediately? == Several people (Simon Wood and Michal Maly) expressed the intent to work on proper HID switching in a short term. Signed-off-by: Jiri Kosina <[email protected]>
1 parent 0b1804e commit 5f008c9

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

drivers/input/joystick/xpad.c

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@
9393
#define MAP_STICKS_TO_NULL (1 << 2)
9494
#define DANCEPAD_MAP_CONFIG (MAP_DPAD_TO_BUTTONS | \
9595
MAP_TRIGGERS_TO_BUTTONS | MAP_STICKS_TO_NULL)
96-
#define SWITCH_G920_TO_HID_MODE (1 << 3)
9796

9897
#define XTYPE_XBOX 0
9998
#define XTYPE_XBOX360 1
@@ -135,7 +134,6 @@ static const struct xpad_device {
135134
{ 0x046d, 0xc21e, "Logitech Gamepad F510", 0, XTYPE_XBOX360 },
136135
{ 0x046d, 0xc21f, "Logitech Gamepad F710", 0, XTYPE_XBOX360 },
137136
{ 0x046d, 0xc242, "Logitech Chillstream Controller", 0, XTYPE_XBOX360 },
138-
{ 0x046d, 0xc261, "Logitech G920 Driving Force Racing Wheel", SWITCH_G920_TO_HID_MODE, XTYPE_XBOXONE },
139137
{ 0x046d, 0xca84, "Logitech Xbox Cordless Controller", 0, XTYPE_XBOX },
140138
{ 0x046d, 0xca88, "Logitech Compact Controller for Xbox", 0, XTYPE_XBOX },
141139
{ 0x05fd, 0x1007, "Mad Catz Controller (unverified)", 0, XTYPE_XBOX },
@@ -301,7 +299,6 @@ static struct usb_device_id xpad_table[] = {
301299
XPAD_XBOX360_VENDOR(0x045e), /* Microsoft X-Box 360 controllers */
302300
XPAD_XBOXONE_VENDOR(0x045e), /* Microsoft X-Box One controllers */
303301
XPAD_XBOX360_VENDOR(0x046d), /* Logitech X-Box 360 style controllers */
304-
XPAD_XBOXONE_VENDOR(0x046d), /* Logitech X-Box One style controllers */
305302
XPAD_XBOX360_VENDOR(0x0738), /* Mad Catz X-Box 360 controllers */
306303
{ USB_DEVICE(0x0738, 0x4540) }, /* Mad Catz Beat Pad */
307304
XPAD_XBOX360_VENDOR(0x0e6f), /* 0x0e6f X-Box 360 controllers */
@@ -1051,19 +1048,6 @@ static int xpad_open(struct input_dev *dev)
10511048
if (usb_submit_urb(xpad->irq_in, GFP_KERNEL))
10521049
return -EIO;
10531050

1054-
/* Logitect G920 wheel starts in XBOX mode, but is reconfigured to be HID */
1055-
/* device with USBID of 046D:C262. Wheel will detach when 'magic' is sent. */
1056-
if (xpad->mapping & SWITCH_G920_TO_HID_MODE) {
1057-
xpad->odata[0] = 0x0F;
1058-
xpad->odata[1] = 0x00;
1059-
xpad->odata[2] = 0x01;
1060-
xpad->odata[3] = 0x01;
1061-
xpad->odata[4] = 0x42;
1062-
xpad->irq_out->transfer_buffer_length = 5;
1063-
1064-
return usb_submit_urb(xpad->irq_out, GFP_KERNEL);
1065-
}
1066-
10671051
if (xpad->xtype == XTYPE_XBOXONE) {
10681052
/* Xbox one controller needs to be initialized. */
10691053
xpad->odata[0] = 0x05;

0 commit comments

Comments
 (0)