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

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

 



On 2014-08-01 22:18, H Hartley Sweeten wrote:
Now that the comedi_device has a 'mmio' and a 'iobase' member, this module
can detect if the (*io) operations need to use readb/writeb for memory mapped
I/O or inb/outb for port I/O. This can be use to cleanup a lot of the code
duplication 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) Modify the default (*io) callback to use the comedi_device 'mmio'. Remove
    the private (*io) callbacks that use readb/writeb to access the hardware.

5) Modify the amplc_dio200_common module to use the 8255 module and remove the
    code duplication.

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: ni_labpc: 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: make default (*io) function handle memory mapped io
   staging: comedi: 8255: provide common defines for registers
   staging: comedi: amplc_dio200_common: use 8255 module

  drivers/staging/comedi/Kconfig                     |   1 +
  drivers/staging/comedi/drivers/8255.c              | 100 +++++++------
  drivers/staging/comedi/drivers/8255.h              |  24 ++-
  drivers/staging/comedi/drivers/8255_pci.c          |  26 +---
  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   | 127 ++--------------
  .../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       |  28 +---
  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          |  20 +--
  drivers/staging/comedi/drivers/ni_mio_common.c     |  12 +-
  drivers/staging/comedi/drivers/pcl724.c            |  10 +-
  drivers/staging/comedi/drivers/pcm3724.c           |  27 +---
  24 files changed, 233 insertions(+), 394 deletions(-)


Patch 08 has an incorrect title. Patch 13 has an implicit assumption about the type of I/O to use that I don't like. I'd rather drop patch 15 as it stops me supporting additional features of the Amplicon DIO PCIe boards.

Reviewed-by: Ian Abbott <abbotti@xxxxxxxxx>
for patches 01 to 07, 09 to 12, and 14, and for patch 08 once the patch title is corrected.

--
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti@xxxxxxxxx>        )=-
-=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587         )=-
_______________________________________________
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