PSX support in input/joystick/gamecon.c
Subsystems (2)
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 11 lines · Rusty Russell
In message <[email protected]> you write:
Quoted 3 lines
Hi, this is my first kernel hack but it's fairly straight froward. I did a partial-rewrite of the PSX support in
gamecon.cto make it far more usable. What this patch changes:While you're there, want to change the code over to the new
module_param?
Sure, here's an update patch with the new module_param code. I'll go through and update the rest of the joystick modules if you want, but I can't test them or guarantee they'll work (I have tested these changes though).
-Peter
Documentation/input/joystick-parport.txt +10 -2
@@ -453,8 +453,16 @@ uses the following kernel/module command 6 | N64 pad 7 | Sony PSX controller - The exact type of the PSX controller type is autoprobed, so you must have -your controller plugged in before initializing. + The exact type of the PSX controller type is autoprobed with use so hot +swapping should work. There are two options specifically for PSX controllers: + + gc_psx_delay=usec + The delay time between controller reads, default is 25 usec. Some users have + reported improved responsiveness at 10 usec. + + gc_psx_ddr=1 + Register directions events as buttons instead of axes. Usefull for Dance + Dance Revolution emulators so up and down can be pressed at once. Should you want to use more than one of parallel ports at once, you can use gc_2 and gc_3 as additional command line parameters for two more parallel
drivers/input/joystick/gamecon.c +124 -140
373 lines not on this page · raw message
drivers/input/joystick/gamecon.c static struct gc __init *gc_probe(int *c · line 644
Quoted 5 lines · Peter Nelson
drivers/input/joystick/gamecon.c +5
-0+module_param_array (gc, int, gc_count,0 ); +module_param_array (gc_2, int, gc_2_count,0 ); +module_param_array (gc_3, int, gc_3_count,0 ); +module_param (gc_psx_delay, int,0 ); +module_param (gc_psx_ddr, int,0 );
Nitpick: module_param, if module is compiled in, adds a prefix to parameter names, so the parameters will be:
gamecon.gc
gamecon.gc_2
gamecon.gc_3
gamecon.gc_psx_delay
gamecon.gc_psx_ddr
At least with PSX stuff it would be nice to drop gc_ prefix.
Signature · 1 line
Dmitry
Quoted 12 lines · Dmitry Torokhov
Nitpick:
module_param, if module is compiled in, adds a prefix to parameternames, so the parameters will be:
gamecon.gc
gamecon.gc_2
gamecon.gc_3
gamecon.gc_psx_delay
gamecon.gc_psx_ddrAt least with PSX stuff it would be nice to drop
gc_prefix.
Hopefully my last patch submission related to this file, here's an updated one using module_param_named so the external name is just psx_ (I'm leaving the internal name as gc_psx_ just for consistency with the rest of the file).
Thanks for the feedback,
-Peter
Quoted 11 lines · Peter Nelson
Quoted 9 lines · Dmitry Torokhov
Nitpick:
module_param, if module is compiled in, adds a prefix to parameternames, so the parameters will be:
gamecon.gc
gamecon.gc_2
gamecon.gc_3
gamecon.gc_psx_delay
gamecon.gc_psx_ddr
Quoted 6 lines
Quoted 2 lines
At least with PSX stuff it would be nice to drop
gc_prefix.Hopefully my last patch submission related to this file, here's an updated one using
module_param_namedso the external name is justpsx_(I'm leaving the internal name asgc_psx_just for consistency with the rest of the file).Thanks for the feedback,
-Peter
Helps if I actually attach the patch.
-Peter
Documentation/input/joystick-parport.txt +10 -2
@@ -453,8 +453,16 @@ uses the following kernel/module command 6 | N64 pad 7 | Sony PSX controller - The exact type of the PSX controller type is autoprobed, so you must have -your controller plugged in before initializing. + The exact type of the PSX controller type is autoprobed with use so hot +swapping should work. There are two options specifically for PSX controllers: + + psx_delay=usec + The delay time between controller reads, default is 25 usec. Some users have + reported improved responsiveness at 10 usec. + + psx_ddr=1 + Register directions events as buttons instead of axes. Usefull for Dance + Dance Revolution emulators so up and down can be pressed at once. Should you want to use more than one of parallel ports at once, you can use gc_2 and gc_3 as additional command line parameters for two more parallel
drivers/input/joystick/gamecon.c +124 -140
373 lines not on this page · raw message
Quoted 9 lines · Peter Nelson
Quoted 7 lines · Rusty Russell
In message <[email protected]> you write:
Quoted 2 lines
Hi, this is my first kernel hack but it's fairly straight froward. I did a partial-rewrite of the PSX support in
gamecon.cto make it far more usable. What this patch changes:
Quoted 5 lines
Quoted 4 lines
While you're there, want to change the code over to the new
module_param?Sure, here's an update patch with the new
module_paramcode. I'll go through and update the rest of the joystick modules if you want, but I can't test them or guarantee they'll work (I have tested these changes though).
Sorry to barge into the middle of the discussion here but why call it PSX?
PSX was the workname of the original PlayStation and was then dropped. The PlayStation was simply called "PS" and not PSX.
PSX stood for PlayStation eXperimental if I'm not incorrect.
PSX however is a new product from Sony that's a PS2 with some extra crap thrown in.
Or am I misunderstanding and this driver is in fact for the PSX (the new one) ?
// Stefan