1. 11 Sep, 2014 3 commits
  2. 08 Sep, 2014 2 commits
  3. 02 Sep, 2014 28 commits
  4. 30 Aug, 2014 3 commits
  5. 16 Aug, 2014 2 commits
    • H Hartley Sweeten's avatar
      staging: comedi: 8255: refactor how the (*io) function works · 4085e93b
      H Hartley Sweeten authored
      Currently, all users of is module that use the default (*io) function
      pass an 'iobase' to subdev_8255_init() of the form:
      
        dev->iobase + OFFSET_TO_8255_BASE_REG
      
      Now that the (*io) callback includes the comedi_device 'dev' pointer
      the 'dev->iobase' does not need to be included.
      
      Modify the default (*io) function, subdev_8255_io(), to automatically
      add the dev->iobase to the address when reading/writing the port.
      
      For aesthetics, rename the subdevice private data member to 'regbase'.
      Also, rename the local variables in this module that are used to
      access this member.
      
      Add a comment in dev_8255_attach() about the 'iobase' that is passed
      to subdev_8255_init(). For manually attached 8255 devices the io
      region is requested with __comedi_request_region() which does not
      set dev->iobase. For these devices the 'regbase' is actually the
      'iobase'.
      
      Remove the, now unnecessary, dev->iobase from all the callers of
      subdev_8255_init(). There are a couple drivers that only passed the
      dev->iobase. For those drivers pass a 'regbase' of 0x00.
      
      Note that the das16m1 driver is a bit goofy. The devpriv->extra_iobase
      is requested using __comedi_request_region() which does not set the
      dev->iobase. But the starting address passed is dev->iobase + DAS16M1_82C55
      so a 'regbase' of DAS16M1_82C55 is passed to subdev_8255_init().
      Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
      Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      4085e93b
    • H Hartley Sweeten's avatar
      staging: comedi: amplc_pci230: refactor iobase addresses · 4f9c63fe
      H Hartley Sweeten authored
      This driver uses two iobase addresses, found in PCI bars 2 and 3.
      Currently, the address in PCI bar 2 is saved in the private data as
      'iobase1' and the address in PCI bar 3 is saved in the comedi_device
      as the 'iobase'. The 'iobase' is the base address of the daq
      registers (ai/ao) of the board. The 'iobase1' address is the base
      address of the 8255, 8254, configuration, and interrupt registers.
      
      Flip the saving of these base addresses. Save the address from PCI
      bar 2 in the comedi_device 'iobase' and the address from PCI bar 3
      in the private data as 'daqio'.
      
      This will help with some cleanup of the 8255 module.
      Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
      Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      4f9c63fe
  6. 30 Jul, 2014 2 commits