Skip to content

Convert gameport to driver model/sysfs

Dmitry Torokhov alsa-devel lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest10 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10Gameport: rename driver to port_datadrivers/input/gameport/lightning.c drivers/input/gameport/vortex.c drivers/input/joystick/a3d.c +3 more+27 -280 replies
2/10Gameport: rename gameport_dev to gameport_driverdrivers/input/gameport/gameport.c drivers/input/joystick/a3d.c drivers/input/joystick/adi.c +11 more+97 -970 replies
3/10Gameport: connect() is mandatorydrivers/input/gameport/gameport.c+4 -50 replies
4/10Gameport: prepare to dynamic allocationdrivers/input/gameport/gameport.c include/linux/gameport.h+55 -70 replies
5/10Gameport: convert input/gameport to dynamic allocationdrivers/input/gameport/cs461x.c drivers/input/gameport/emu10k1-gp.c drivers/input/gameport/fm801-gp.c +5 more+286 -2660 replies
6/10Gameport: convert sound/oss to dynamic allocationsound/oss/cmpci.c sound/oss/es1370.c sound/oss/es1371.c +4 more+249 -1190 replies
7/10Gameport: convert sound/alsa to dynamic allocationinclude/sound/cs46xx.h include/sound/trident.h include/sound/ymfpci.h +17 more+761 -4580 replies
8/10Gameport: add "gameport" sysfs bus, add driversdrivers/Makefile drivers/input/gameport/gameport.c drivers/input/joystick/a3d.c +12 more+407 -2330 replies
9/10Gameport: complete sysfs integrationdrivers/input/gameport/gameport.c include/linux/gameport.h+579 -710 replies
10/10Gameport: replace ->private with gameport_get/set_drvdatadrivers/input/joystick/a3d.c drivers/input/joystick/adi.c drivers/input/joystick/analog.c +9 more+76 -410 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/10] Convert gameport to driver model/sysfs

Hi,

This series of patches adds a new "gameport" bus to the driver model. It is implemented very similarly to "serio" bus and also allows individual drivers to be manually bound/disconnected from a port by manipulating port's "drvctl" attribute.

01-gameport-renames1.patch
- rename gameport->driver to gameport->port_data in preparation to sysfs integration to avoid confusion with real drivers.

02-gameport-renames2.patch
- more renames in gameport in preparations to sysfs integration, gameport_dev renamed to gameport_driver, gameport_[un]register_device renamed to gameport_[un]register_driver

03-gameport-connect-mandatory.patch
- make connect and disconnect mandatory as these call gameport_open and gameport_close which actually bind driver and port together.

04-gameport-dynalloc-prepare.patch
- sysfs/kobjects requires objects be allocated synamically. Prepare to dynamic gameport allocation, create gameport_allocate_port and gameport_free_port; dynamically allocated ports are freed by core upon release. Also add gameport_set_name and gameport_set_phys to ease transition.

05-gameport-dynalloc-input.patch
- convert drivers in input/gameport to dynamic gameport allocation.

06-gameport-dynalloc-sound-oss.patch
- convert drivers in sound/oss to dynamic gameport allocation.

07-gameport-dynalloc-sound-alsa.patch
- convert drivers in sound/pci to dynamic gameport allocation.

08-gameport-drivers-sysfs.patch
- add "gameport" bus and have joystick gameport drivers register themselves on this bus.

09-gameport-devices-sysfs.patch
- complete gameport sysfs integration. Gameports are registered on the "gameport" bus.

10-gameport-drvdata.patch
- Get rid of gameport->private, use driver-specific data in device structure, access through gameport_get/set_drvdata helpers.

The changes can also be pulled from my tree (which has Vojtech's input tree as a parent):

bk pull bk://dtor.bkbits.net/input

I am CC-ing ALSA list as the changes touch quite a few sound drivers.

Comments/testing is appreciated.

Signature · 8 lines
Dmitry


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click