1. 06 Nov, 2012 37 commits
  2. 02 Nov, 2012 3 commits
    • Ian Abbott's avatar
      staging: comedi: adl_pci9118: support auto-attachment · 15358a7f
      Ian Abbott authored
      Support auto-attachment of supported PCI devices by adding the
      `auto_attach()` hook (`pci9118_auto_attach()`) to the `struct
      comedi_driver`.  This is called via `comedi_pci_auto_attach()` at PCI
      probe time.
      
      Previously, the driver's call to `comedi_pci_auto_config()` would fall
      back to the old method of auto-attaching devices and would fail because
      it couldn't find a board name matching the driver name.  The new method
      doesn't care about that.
      
      There are still a few problems.  All the boards supported by this driver
      have the same PCI vendor and device ID, so it will just pick the first
      supported board type, "pci9118dg".  (Other supported board types have
      different AI ranges or different AI speeds, but are otherwise the same.)
      Also, manual attachment of devices allows several optional features to
      be configured, such as use of an external multiplexord, specified
      sample&hold delays and options to ignore certain hardware errors.  These
      will all be set to defaults for auto-attached devices.  A future version
      of the driver may address these issues via configurable device
      attributes.
      Signed-off-by: default avatarIan Abbott <abbotti@mev.co.uk>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      15358a7f
    • Ian Abbott's avatar
      staging: comedi: adl_pci9118: cards have same vendor ID · 00d93194
      Ian Abbott authored
      Don't bother recording the PCI vendor ID of each board in `boardtypes[]`
      as they are all the same and the code doesn't use it anyway.
      Signed-off-by: default avatarIan Abbott <abbotti@mev.co.uk>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      00d93194
    • Ian Abbott's avatar
      staging: comedi: adl_pci9118: split pci9118_attach() · f3b81d54
      Ian Abbott authored
      Split most of the functionality of the attach routine `pci9118_attach()`
      into a new function `pci9118_common_attach()` that can be called when
      auto-attachment of devices is supported.  Move the enabling of the PCI
      device and its i/o regions into this function.  Do the requesting of the
      interrupt near the end of the function so it doesn't get enabled before
      the device is ready.
      
      Note that auto-attachment of PCI devices is currently broken in this
      driver because the list of board names referred to by the `struct
      comedi_driver` does not contain a "wildcard" entry matching the comedi
      driver name.  This won't be a problem once support for the
      `auto_attach()` method is added.
      Signed-off-by: default avatarIan Abbott <abbotti@mev.co.uk>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f3b81d54