[PATCH v2 00/15] staging: comedi: 8255: tidy up the (*io) operations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Now that the comedi_device has a 'mmio' and a 'iobase' member, this module
can updated to readb/writeb for memory mapped I/O or inb/outb for port I/O.
With this a lot of the code duplication can be removed in the drivers that
use the 8255 module.

 1) Modify a couple comedi drivers that use port I/O for the 8255 device so
    that the 'iobase' is used for the base address of the 8255 device.

 2) Add a comedi_device parameter to the (*io) callback. Tidy up the private
    (*io) callbacks to use this parameter.

 3) Modify the default (*io) callback to use the comedi_device 'iobase'. Remove
    the, now redundant, dev->iobase from the 'iobase' that is passed to
    subdev_8255_init() for all callers that use the default (*io) callback.

 4) Remove the unused and incomplete async command support from the 8255 module.

 5) Add a default (*io) callback to use the comedi_device 'mmio'. Remove
    the private (*io) callbacks that use readb/writeb to access the hardware.

v2: Fix the commit title for one of the patches (pointed out by Ian Abbott).
    Remove the async command support (suggested by Ian Abbott).
    Modify the 'mmio' support (suggested by Ian Abbott).
    Drop the conversion of amplc_dio200_common (requested by Ian Abbott).

H Hartley Sweeten (15):
  staging: comedi: cb_pcidas: use dev->iobase for PCI bar 3
  staging: comedi: cb_pcimdas: refactor iobase addresses
  staging: comedi: cb_pcidda: refactor iobase addresses
  staging: comedi: amplc_pci230: refactor iobase addresses
  staging: comedi: 8255: add a comedi_device param to the (*io) callback
  staging: comedi: ni_mio_common: tidy up ni_8255_callback()
  staging: comedi: ni_labpc: tidy up labpc_8255_mmio()
  staging: comedi: daqboard2000: tidy up daqboard2000_8255_cb()
  staging: comedi: cb_pcidas64: tidy up dio_callback()
  staging: comedi: cb_pcidas64: tidy up dio_callback_4020()
  staging: comedi: 8255_pci: tidy up pci_8255_mmio()
  staging: comedi: 8255: refactor how the (*io) function works
  staging: comedi: 8255: remove incomplete async command support
  staging: comedi: 8255: handle memory mapped io
  staging: comedi: 8255: provide common defines for registers

 drivers/staging/comedi/drivers/8255.c              | 198 +++++++--------------
 drivers/staging/comedi/drivers/8255.h              |  31 +++-
 drivers/staging/comedi/drivers/8255_pci.c          |  29 +--
 drivers/staging/comedi/drivers/adv_pci_dio.c       |   4 +-
 drivers/staging/comedi/drivers/aio_aio12_8.c       |   3 +-
 .../staging/comedi/drivers/amplc_dio200_common.c   |  35 ++--
 .../staging/comedi/drivers/amplc_pc236_common.c    |   2 +-
 drivers/staging/comedi/drivers/amplc_pci230.c      | 162 ++++++++---------
 drivers/staging/comedi/drivers/cb_pcidas.c         |  10 +-
 drivers/staging/comedi/drivers/cb_pcidas64.c       |  29 +--
 drivers/staging/comedi/drivers/cb_pcidda.c         |  27 +--
 drivers/staging/comedi/drivers/cb_pcimdas.c        |  16 +-
 drivers/staging/comedi/drivers/cb_pcimdda.c        |   3 +-
 drivers/staging/comedi/drivers/daqboard2000.c      |  13 +-
 drivers/staging/comedi/drivers/das08.c             |   3 +-
 drivers/staging/comedi/drivers/das16.c             |   3 +-
 drivers/staging/comedi/drivers/das16m1.c           |   2 +-
 drivers/staging/comedi/drivers/ni_atmio16d.c       |   2 +-
 drivers/staging/comedi/drivers/ni_daq_dio24.c      |   2 +-
 drivers/staging/comedi/drivers/ni_labpc.c          |  18 +-
 drivers/staging/comedi/drivers/ni_mio_common.c     |  12 +-
 drivers/staging/comedi/drivers/pcl724.c            |  10 +-
 drivers/staging/comedi/drivers/pcm3724.c           |  27 +--
 23 files changed, 254 insertions(+), 387 deletions(-)

-- 
2.0.3

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux