Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 39851
b: refs/heads/master
c: 3bbe486
h: refs/heads/master
i:
  39849: d340c4d
  39847: f66d53f
v: v3
  • Loading branch information
Tony Luck committed Oct 17, 2006
1 parent f77f9a3 commit 9637e55
Show file tree
Hide file tree
Showing 93 changed files with 757 additions and 4,152 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 73ed9a86cd77b6a3b46beec8d353ac3b0d4f50c1
refs/heads/master: 3bbe486b361b317ac7103378ed3d1aab4779715e
115 changes: 24 additions & 91 deletions trunk/Documentation/input/xpad.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,37 +3,20 @@ xpad - Linux USB driver for X-Box gamepads
This is the very first release of a driver for X-Box gamepads.
Basically, this was hacked away in just a few hours, so don't expect
miracles.

In particular, there is currently NO support for the rumble pack.
You won't find many ff-aware linux applications anyway.


0. Notes
--------

Driver updated for kernel 2.6.17.11. (Based on a patch for 2.6.11.4.)

The number of buttons/axes reported varies based on 3 things:
- if you are using a known controller
- if you are using a known dance pad
- if using an unknown device (one not listed below), what you set in the
module configuration for "Map D-PAD to buttons rather than axes for unknown
pads" (module option dpad_to_buttons)

If you set dpad_to_buttons to 0 and you are using an unknown device (one
not listed below), the driver will map the directional pad to axes (X/Y),
if you said N it will map the d-pad to buttons, which is needed for dance
style games to function correctly. The default is Y.
0. Status
---------

dpad_to_buttons has no effect for known pads.
For now, this driver has only been tested on just one Linux-Box.
This one is running a 2.4.18 kernel with usb-uhci on an amd athlon 600.

0.1 Normal Controllers
----------------------
With a normal controller, the directional pad is mapped to its own X/Y axes.
The jstest-program from joystick-1.2.15 (jstest-version 2.1.0) will report 8
axes and 10 buttons.
The jstest-program from joystick-1.2.15 (jstest-version 2.1.0) reports
8 axes and 10 buttons.

All 8 axes work, though they all have the same range (-32768..32767)
Alls 8 axes work, though they all have the same range (-32768..32767)
and the zero-setting is not correct for the triggers (I don't know if that
is some limitation of jstest, since the input device setup should be fine. I
didn't have a look at jstest itself yet).
Expand All @@ -47,50 +30,16 @@ in game functionality were OK. However, I find it rather difficult to
play first person shooters with a pad. Your mileage may vary.


0.2 Xbox Dance Pads
-------------------
When using a known dance pad, jstest will report 6 axes and 14 buttons.

For dance style pads (like the redoctane pad) several changes
have been made. The old driver would map the d-pad to axes, resulting
in the driver being unable to report when the user was pressing both
left+right or up+down, making DDR style games unplayable.

Known dance pads automatically map the d-pad to buttons and will work
correctly out of the box.

If your dance pad is recognized by the driver but is using axes instead
of buttons, see section 0.3 - Unknown Controllers

I've tested this with Stepmania, and it works quite well.


0.3 Unkown Controllers
----------------------
If you have an unkown xbox controller, it should work just fine with
the default settings.

HOWEVER if you have an unknown dance pad not listed below, it will not
work UNLESS you set "dpad_to_buttons" to 1 in the module configuration.

PLEASE if you have an unkown controller, email Dom <binary1230@yahoo.com> with
a dump from /proc/bus/usb and a description of the pad (manufacturer, country,
whether it is a dance pad or normal controller) so that we can add your pad
to the list of supported devices, ensuring that it will work out of the
box in the future.


1. USB adapter
--------------

Before you can actually use the driver, you need to get yourself an
adapter cable to connect the X-Box controller to your Linux-Box. You
can buy these online fairly cheap, or build your own.
adapter cable to connect the X-Box controller to your Linux-Box.

Such a cable is pretty easy to build. The Controller itself is a USB
compound device (a hub with three ports for two expansion slots and
the controller device) with the only difference in a nonstandard connector
(5 pins vs. 4 on standard USB connector).
Such a cable is pretty easy to build. The Controller itself is a USB compound
device (a hub with three ports for two expansion slots and the controller
device) with the only difference in a nonstandard connector (5 pins vs. 4 on
standard USB connector).

You just need to solder a USB connector onto the cable and keep the
yellow wire unconnected. The other pins have the same order on both
Expand All @@ -102,36 +51,36 @@ original one. You can buy an extension cable and cut that instead. That way,
you can still use the controller with your X-Box, if you have one ;)


2. Driver Installation
2. driver installation
----------------------

Once you have the adapter cable and the controller is connected, you need
to load your USB subsystem and should cat /proc/bus/usb/devices.
There should be an entry like the one at the end [4].

Currently (as of version 0.0.6), the following devices are included:
Currently (as of version 0.0.4), the following three devices are included:
original Microsoft XBOX controller (US), vendor=0x045e, product=0x0202
smaller Microsoft XBOX controller (US), vendor=0x045e, product=0x0289
original Microsoft XBOX controller (Japan), vendor=0x045e, product=0x0285
InterAct PowerPad Pro (Germany), vendor=0x05fd, product=0x107a
RedOctane Xbox Dance Pad (US), vendor=0x0c12, product=0x8809

The driver should work with xbox pads not listed above as well, however
you will need to do something extra for dance pads to work.
If you have another controller that is not listed above and is not recognized
by the driver, please drop me a line with the appropriate info (that is, include
the name, vendor and product ID, as well as the country where you bought it;
sending the whole dump out of /proc/bus/usb/devices along would be even better).

If you have a controller not listed above, see 0.3 - Unknown Controllers
In theory, the driver should work with other controllers than mine
(InterAct PowerPad pro, bought in Germany) just fine, but I cannot test this
for I only have this one controller.

If you compiled and installed the driver, test the functionality:
> modprobe xpad
> modprobe joydev
> jstest /dev/js0

If you're using a normal controller, there should be a single line showing
18 inputs (8 axes, 10 buttons), and its values should change if you move
the sticks and push the buttons. If you're using a dance pad, it should
show 20 inputs (6 axes, 14 buttons).
There should be a single line showing 18 inputs (8 axes, 10 buttons), and
it's values should change if you move the sticks and push the buttons.

It works? Voila, you're done ;)
It works? Voila, your done ;)


3. Thanks
Expand Down Expand Up @@ -162,22 +111,6 @@ I: If#= 0 Alt= 0 #EPs= 2 Cls=58(unk. ) Sub=42 Prot=00 Driver=(none)
E: Ad=81(I) Atr=03(Int.) MxPS= 32 Ivl= 10ms
E: Ad=02(O) Atr=03(Int.) MxPS= 32 Ivl= 10ms

5. /proc/bus/usb/devices - dump from Redoctane Xbox Dance Pad (US):

T: Bus=01 Lev=02 Prnt=09 Port=00 Cnt=01 Dev#= 10 Spd=12 MxCh= 0
D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=0c12 ProdID=8809 Rev= 0.01
S: Product=XBOX DDR
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA
I: If#= 0 Alt= 0 #EPs= 2 Cls=58(unk. ) Sub=42 Prot=00 Driver=xpad
E: Ad=82(I) Atr=03(Int.) MxPS= 32 Ivl=4ms
E: Ad=02(O) Atr=03(Int.) MxPS= 32 Ivl=4ms

--
Marko Friedemann <mfr@bmx-chemnitz.de>
2002-07-16
- original doc

Dominic Cerquetti <binary1230@yahoo.com>
2005-03-19
- added stuff for dance pads, new d-pad->axes mappings
1 change: 0 additions & 1 deletion trunk/arch/arm/mach-footbridge/dc21285.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include <linux/slab.h>
#include <linux/init.h>
#include <linux/ioport.h>
#include <linux/irq.h>

#include <asm/io.h>
#include <asm/irq.h>
Expand Down
6 changes: 2 additions & 4 deletions trunk/arch/arm/mach-ixp2000/ixdp2400.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,11 @@ static void ixdp2400_pci_postinit(void)
struct pci_dev *dev;

if (ixdp2x00_master_npu()) {
dev = pci_get_bus_and_slot(1, IXDP2400_SLAVE_ENET_DEVFN);
dev = pci_find_slot(1, IXDP2400_SLAVE_ENET_DEVFN);
pci_remove_bus_device(dev);
pci_dev_put(dev)
} else {
dev = pci_get_bus_and_slot(1, IXDP2400_MASTER_ENET_DEVFN);
dev = pci_find_slot(1, IXDP2400_MASTER_ENET_DEVFN);
pci_remove_bus_device(dev);
pci_dev_put(dev)

ixdp2x00_slave_pci_postinit();
}
Expand Down
6 changes: 2 additions & 4 deletions trunk/arch/arm/mach-ixp2000/ixdp2800.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,16 +261,14 @@ int __init ixdp2800_pci_init(void)

pci_common_init(&ixdp2800_pci);
if (ixdp2x00_master_npu()) {
dev = pci_get_bus_and_slot(1, IXDP2800_SLAVE_ENET_DEVFN);
dev = pci_find_slot(1, IXDP2800_SLAVE_ENET_DEVFN);
pci_remove_bus_device(dev);
pci_dev_put(dev);

ixdp2800_master_enable_slave();
ixdp2800_master_wait_for_slave_bus_scan();
} else {
dev = pci_get_bus_and_slot(1, IXDP2800_MASTER_ENET_DEVFN);
dev = pci_find_slot(1, IXDP2800_MASTER_ENET_DEVFN);
pci_remove_bus_device(dev);
pci_dev_put(dev);
}
}

Expand Down
7 changes: 2 additions & 5 deletions trunk/arch/arm/mach-ixp2000/ixdp2x00.c
Original file line number Diff line number Diff line change
Expand Up @@ -241,14 +241,11 @@ void ixdp2x00_slave_pci_postinit(void)
/*
* Remove PMC device is there is one
*/
if((dev = pci_get_bus_and_slot(1, IXDP2X00_PMC_DEVFN))) {
if((dev = pci_find_slot(1, IXDP2X00_PMC_DEVFN)))
pci_remove_bus_device(dev);
pci_dev_put(dev);
}

dev = pci_get_bus_and_slot(0, IXDP2X00_21555_DEVFN);
dev = pci_find_slot(0, IXDP2X00_21555_DEVFN);
pci_remove_bus_device(dev);
pci_dev_put(dev);
}

/**************************************************************************
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-pxa/lubbock.c
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ static void lubbock_mmc_poll(unsigned long data)
if (LUB_IRQ_SET_CLR & (1 << 0))
mod_timer(&mmc_timer, jiffies + MMC_POLL_RATE);
else {
(void) mmc_detect_int(LUBBOCK_SD_IRQ, (void *)data);
(void) mmc_detect_int(LUBBOCK_SD_IRQ, (void *)data, NULL);
enable_irq(LUBBOCK_SD_IRQ);
}
}
Expand Down
10 changes: 0 additions & 10 deletions trunk/arch/arm/mach-sa1100/cpu-sa1110.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,6 @@ static struct sdram_params sdram_tbl[] __initdata = {
.twr = 9,
.refresh = 64000,
.cas_latency = 3,
}, { /* Samsung K4S281632B-1H */
.name = "K4S281632b-1H",
.rows = 12,
.tck = 10,
.trp = 20,
.twr = 10,
.refresh = 64000,
.cas_latency = 3,
}, { /* Samsung KM416S4030CT */
.name = "KM416S4030CT",
.rows = 13,
Expand Down Expand Up @@ -374,8 +366,6 @@ static int __init sa1110_clk_init(void)

if (machine_is_h3100())
name = "KM416S4030CT";
if (machine_is_jornada720())
name = "K4S281632B-1H";
}

sdram = sa1110_find_sdram(name);
Expand Down
3 changes: 1 addition & 2 deletions trunk/arch/arm/oprofile/op_model_xscale.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
#include <linux/sched.h>
#include <linux/oprofile.h>
#include <linux/interrupt.h>
#include <linux/irq.h>

#include <asm/irq.h>
#include <asm/system.h>

#include "op_counter.h"
Expand Down
18 changes: 2 additions & 16 deletions trunk/arch/arm/tools/mach-types
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
#
# Up to date versions of this file can be obtained from:
#
# http://www.arm.linux.org.uk/developer/machines/download.php
# http://www.arm.linux.org.uk/developer/machines/?action=download
#
# Please do not send patches to this file; it is automatically generated!
# To add an entry into this database, please see Documentation/arm/README,
# or visit:
#
# http://www.arm.linux.org.uk/developer/machines/?action=new
#
# Last update: Mon Oct 16 21:13:36 2006
# Last update: Sat Sep 23 13:20:43 2006
#
# machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number
#
Expand Down Expand Up @@ -1157,17 +1157,3 @@ adsturboxb MACH_ADSTURBOXB ADSTURBOXB 1143
oti4110 MACH_OTI4110 OTI4110 1144
hme_pxa MACH_HME_PXA HME_PXA 1145
deisterdca MACH_DEISTERDCA DEISTERDCA 1146
ces_ssem2 MACH_CES_SSEM2 CES_SSEM2 1147
ces_mtr MACH_CES_MTR CES_MTR 1148
tds_avng_sbc MACH_TDS_AVNG_SBC TDS_AVNG_SBC 1149
everest MACH_EVEREST EVEREST 1150
pnx4010 MACH_PNX4010 PNX4010 1151
oxnas MACH_OXNAS OXNAS 1152
fiori MACH_FIORI FIORI 1153
ml1200 MACH_ML1200 ML1200 1154
cactus MACH_CACTUS CACTUS 1155
nb2xxx MACH_NB2XXX NB2XXX 1156
hw6900 MACH_HW6900 HW6900 1157
cdcs_quoll MACH_CDCS_QUOLL CDCS_QUOLL 1158
quicksilver MACH_QUICKSILVER QUICKSILVER 1159
uplat926 MACH_UPLAT926 UPLAT926 1160
3 changes: 2 additions & 1 deletion trunk/arch/ia64/kernel/perfmon.c
Original file line number Diff line number Diff line change
Expand Up @@ -5558,12 +5558,13 @@ pfm_do_interrupt_handler(int irq, void *arg, struct pt_regs *regs)
}

static irqreturn_t
pfm_interrupt_handler(int irq, void *arg, struct pt_regs *regs)
pfm_interrupt_handler(int irq, void *arg)
{
unsigned long start_cycles, total_cycles;
unsigned long min, max;
int this_cpu;
int ret;
struct pt_regs *regs = get_irq_regs();

this_cpu = get_cpu();
if (likely(!pfm_alt_intr_handler)) {
Expand Down
7 changes: 0 additions & 7 deletions trunk/arch/sparc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -289,13 +289,6 @@ endmenu

source "fs/Kconfig"

menu "Instrumentation Support"
depends on EXPERIMENTAL

source "arch/sparc/oprofile/Kconfig"

endmenu

source "arch/sparc/Kconfig.debug"

source "security/Kconfig"
Expand Down
2 changes: 0 additions & 2 deletions trunk/arch/sparc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ HEAD_Y := $(head-y)
core-y += arch/sparc/kernel/ arch/sparc/mm/ arch/sparc/math-emu/
libs-y += arch/sparc/prom/ arch/sparc/lib/

drivers-$(CONFIG_OPROFILE) += arch/sparc/oprofile/

# Export what is needed by arch/sparc/boot/Makefile
# Renaming is done to avoid confusing pattern matching rules in 2.5.45 (multy-)
INIT_Y := $(patsubst %/, %/built-in.o, $(init-y))
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/sparc/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ void handler_irq(int irq, struct pt_regs * regs)
}

#ifdef CONFIG_BLK_DEV_FD
extern void floppy_interrupt(int irq, void *dev_id);
extern void floppy_interrupt(int irq, void *dev_id)

void sparc_floppy_irq(int irq, void *dev_id, struct pt_regs *regs)
{
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/sparc/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ void prom_sync_me(void)

unsigned int boot_flags __initdata = 0;
#define BOOTME_DEBUG 0x1
#define BOOTME_SINGLE 0x2

/* Exported for mm/init.c:paging_init. */
unsigned long cmdline_memory_size __initdata = 0;
Expand Down Expand Up @@ -131,6 +132,7 @@ static void __init process_switch(char c)
boot_flags |= BOOTME_DEBUG;
break;
case 's':
boot_flags |= BOOTME_SINGLE;
break;
case 'h':
prom_printf("boot_flags_init: Halt!\n");
Expand Down
2 changes: 0 additions & 2 deletions trunk/arch/sparc/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,6 @@ unsigned long profile_pc(struct pt_regs *regs)
return pc;
}

EXPORT_SYMBOL(profile_pc);

__volatile__ unsigned int *master_l10_counter;
__volatile__ unsigned int *master_l10_limit;

Expand Down
Loading

0 comments on commit 9637e55

Please sign in to comment.