Re: [PATCH 10/49] staging: comedi: adv_pci_dio: use the pci id_table 'driver_data'

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

 



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: <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/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