On Mon, Aug 04, 2014 at 02:18:43PM +0100, Ian Abbott wrote: > 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. Ok, that's a mess, I'll just wait for a resend of this series with things fixed up so I don't have to pick-and-choose here. thanks, greg k-h _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel