On 2013-03-05 16:59, H Hartley Sweeten wrote:
Create an enum to the boardinfo and pass that enum in the pci_driver
id_table as the driver_data.
Change the macro used to fill in the device table from PCI_DEVICE() to
PCI_VDEVICE(). This allows passing the enum as the next field.
This allows removing the 'vendor_id' and 'device_id' data from the
boardinfo as well the search function that was used to locate the
boardinfo for the PCI device.
The pci1753 and pci1753e boards have the same vendor/device id so it
is impossible to determine which board is actually detected. The
boardinfo for the boards is quite different. Group them in the same
enum index in the boardinfo table and #if out the information with
USE_PCI1753E_BOARDINFO. Until a better solution is worked out, this
will allow the driver to be compiled to support the pci1753 (default)
or pci1752e.
It turns out that what the comedi driver lists as a PCI-1753E is really
a PCI-1753 with a PCI-1753E attached to it. The PCI-1753E is an
expansion card that is attached to the PCI-1753 via a ribbon cable to
expand the number of DIO channels. It also physically plugs into a PCI
slot but isn't a PCI device itself.
Apparently it is possible to detect whether the expansion board is
connected by reading and writing some registers. See Advantech's own
Linux driver package advdaq-1.10.0001-1.tar.bz2 available from
<http://support.advantech.com.tw/support/DownloadSRDetail_New.aspx?SR_ID=1-41GHVV&Doc_Source=Download>
for details. We could use this to determine the number of subdevices as
a special case hack in the auto_attach routine.
--
-=( Ian Abbott @ MEV Ltd. E-mail: <[email protected]> )=-
-=( Tel: +44 (0)161 477 1898 FAX: +44 (0)161 718 3587 )=-
_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel