[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <5aa163d00902142008g138826br80d3ea989e7af691@mail.gmail.com>
Date: Sat, 14 Feb 2009 23:08:46 -0500
From: Mike Murphy <mamurph@...clemson.edu>
To: linux-kernel@...r.kernel.org
Subject: [PATCH] input: xpad.c - Xbox 360 wireless and sysfs support
Greetings,
The attached patch is a result of a few days of hacking to get better
Linux support for Xbox 360 wireless controllers. Major functional
improvements include support for the LEDs on the wireless controllers
(which are auto-set to the controller number as they are on the
official console), added support for rumble effects on wireless
controllers, added support for dead zones on all supported
controllers, and added support for a square axis mapping for the left
stick on all supported controllers. A large amount of the bulk in this
patch is from the addition of a sysfs interface to retrieve
information and adjust the dead zone/square axis settings.
I also fixed a few bugs:
- Removed the bulk urb altogether for setting the LED display. This
operation is now done using the irq_out urb in xpad_send_led_command
(via a shared work queue task to get out of the interrupt handler when
processing the presence change packet).
- Submission of urbs while holding a mutex is now GFP_ATOMIC
- The odata_mutex is now locked when changing the odata for sending a
force feedback effect.
There is still a bug somewhere in the force feedback code, I believe
in either ff-memless or lower, that causes a "warn_on_slowpath"
message in the log and an occasional "scheduling while atomic" BUG. I
have thus far been unable to isolate it.
This code has been tested only with a wireless 360 receiver, 4
controllers (individually and concurrently), and a RedOctane wireless
guitar. It needs more testing with a broader range of devices,
especially wired devices.
Patch generated against 2.6.28.2 (no changes in relevant in-kernel
driver from 2.6.28.2 to 2.6.28.5, so should apply against latest
stable).
Comments are appreciated. I am _NOT_ subscribed to the LKML, so please
CC me directly.
Thanks,
Mike
--
Mike Murphy
Ph.D. Candidate and NSF Graduate Research Fellow
Clemson University School of Computing
120 McAdams Hall
Clemson, SC 29634-0974 USA
Tel: +1 864.656.2838 Fax: +1 864.656.0145
http://cirg.cs.clemson.edu/~mamurph
View attachment "xpad.patch" of type "text/x-patch" (36410 bytes)
Powered by blists - more mailing lists