Line
Link Here
|
0 |
-- 1.18/drivers/input/joystick/gamecon.c 2004-06-24 11:55:22 -04:00 |
0 |
++ edited/drivers/input/joystick/gamecon.c 2004-09-20 13:58:40 -04:00 |
Lines 89-95
static struct gc *gc_base[3];
Link Here
|
89 |
"Multisystem 2-button joystick", "N64 controller", "PSX controller" |
89 |
"Multisystem 2-button joystick", "N64 controller", "PSX controller", |
90 |
"PSX DDR controller" }; |
90 |
"PSX DDR controller" }; |
91 |
* N64 support. |
91 |
* N64 support. |
Lines 271-277
static void gc_psx_command(struct gc *gc
Link Here
|
271 |
udelay(gc_psx_delay); |
271 |
udelay(gc_psx_delay); |
272 |
read = parport_read_status(gc->pd->port) ^ 0x80; |
272 |
read = parport_read_status(gc->pd->port) ^ 0x80; |
273 |
for (j = 0; j < 5; j++) |
273 |
for (j = 0; j < 5; j++) |
274 |
data[j] |= (read & gc_status_bit[j] & gc->pads[GC_PSX]) ? (1 << i) : 0; |
274 |
data[j] |= (read & gc_status_bit[j] & (gc->pads[GC_PSX] | gc->pads[GC_DDR])) |
|
|
275 |
? (1 << i) : 0; |
275 |
parport_write_data(gc->pd->port, cmd | GC_PSX_CLOCK | GC_PSX_POWER); |
276 |
parport_write_data(gc->pd->port, cmd | GC_PSX_CLOCK | GC_PSX_POWER); |
276 |
udelay(gc_psx_delay); |
277 |
udelay(gc_psx_delay); |
277 |
} |
278 |
} |
Lines 300-306
static void gc_psx_read_packet(struct gc
Link Here
|
300 |
gc_psx_command(gc, 0, data2); /* Dump status */ |
301 |
gc_psx_command(gc, 0, data2); /* Dump status */ |
301 |
for (i =0; i < 5; i++) /* Find the longest pad */ |
302 |
for (i =0; i < 5; i++) /* Find the longest pad */ |
302 |
if((gc_status_bit[i] & gc->pads[GC_PSX]) && (GC_PSX_LEN(id[i]) > max_len)) |
303 |
if((gc_status_bit[i] & (gc->pads[GC_PSX] | gc->pads[GC_DDR])) |
|
|
304 |
&& (GC_PSX_LEN(id[i]) > max_len)) |
303 |
max_len = GC_PSX_LEN(id[i]); |
305 |
max_len = GC_PSX_LEN(id[i]); |
304 |
for (i = 0; i < max_len * 2; i++) { /* Read in all the data */ |
306 |
for (i = 0; i < max_len * 2; i++) { /* Read in all the data */ |