- 06 11月, 2012 3 次提交
-
-
由 Lars-Peter Clausen 提交于
The recent cleanups have decimated the drivers code size by quite a bit. It is only a few hundred lines in total now and we also always build buffer support, so there really is no need to spread the driver out over multiple files. Putting everything into one file also allows to reduce the code size a bit more by removing a few lines of boilerplate code. Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Lars-Peter Clausen 提交于
Rework the regulator handling of the ad7887 driver to match more closely what we do for other drivers. Only request the regulator if a external reference is used, but treat it as an error if requesting the regulator fails. Also remove the possibility to specify the reference voltage via platform data and always use the regulator for this. Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Lars-Peter Clausen 提交于
We know that the sample buffer will at most need to hold two 16 bit samples and the 64 bit aligned 64 bit timestamp. Preallocate a buffer large enough to hold this instead of allocating and freeing it each time a sample is read. Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 04 11月, 2012 4 次提交
-
-
由 Lars-Peter Clausen 提交于
The adis16334 has the PROD_ID register so set the PROD_ID flag in its chip info. Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Lars-Peter Clausen 提交于
The ADIS1360 and ADIS13605 are very similar and do have the same software interface. The only difference is the contents of the PROD_ID register. Since we now read the product id from the device name instead of the chip_info struct we can use the same chip_table entry for both the ADIS1360 and ADIS13605. Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Lars-Peter Clausen 提交于
The product id check currently ANDs the read id with 0xF000 and compares the result to the product id from the chip info. Since none of the product ids in the chip info table end in 0x000 the check will always fail. Furthermore it is also wrong, the product id in the PROD_ID register will always match the part number of the device. Some of the ADIS16XXX devices are identical from a software point of view with the product id register having a different content. If we keep the current scheme of storing the product id in the chip info table this would require us to have multiple almost identical chip info table entries. So instead this patch changes the code to parse the product id from the device name. Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
由 Lars-Peter Clausen 提交于
Setting the sampling frequency for the adis16334 differs from the other devices. This patch introduces two new callback functions to the adis16400 chip_info struct which are used to specify how to read and write the current sample rate. The patch also introduces the proper implementations for these callbacks for the adis16334. Related to this is that the adis16334 has no slow mode and so we do not limit the SPI clock rate to 300kHz during initialization. The patch adds a new flag for devices which do have a slow mode. Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
-
- 03 11月, 2012 33 次提交
-
-
由 Ian Abbott 提交于
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: NIan Abbott <abbotti@mev.co.uk> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Ian Abbott 提交于
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: NIan Abbott <abbotti@mev.co.uk> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Ian Abbott 提交于
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: NIan Abbott <abbotti@mev.co.uk> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Ian Abbott 提交于
Replace or remove the `printk()` calls in this driver. Call new function `pci9118_report_attach()` to report successful attachment of the board. Signed-off-by: NIan Abbott <abbotti@mev.co.uk> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Kevin McKinney 提交于
This patch changes ULONG to unsigned long in InterfaceAdapter.h. Signed-off-by: NKevin McKinney <klmckinney1@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Kevin McKinney 提交于
This patch removes typedef for _BULK_ENDP_IN, changes the name of the struct to bcm_bulk_endpoint_in. In addition, any calls to typedefs BULK_ENDP_IN, or *PBULK_ENDP_IN are changed to call the struct directly. Signed-off-by: NKevin McKinney <klmckinney1@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Kevin McKinney 提交于
This patch removes typedef for _BULK_ENDP_OUT, changes the name of the struct to bcm_bulk_endpoint_out. In addition, any calls to typedefs BULK_ENDP_OUT, or *PBULK_ENDP_OUT are changed to call the struct directly. Signed-off-by: NKevin McKinney <klmckinney1@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Kevin McKinney 提交于
This patch removes typedef for _INTR_ENDP_IN, changes the name of the struct to bcm_intr_endpoint_in. In addition, any calls to typedefs INTR_ENDP_IN, or *PINTR_ENDP_IN are changed to call the struct directly. Signed-off-by: NKevin McKinney <klmckinney1@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Kevin McKinney 提交于
This patch removes typedef for _INTR_ENDP_OUT, changes the name of the struct to bcm_intr_endpoint_out. In addition, any calls to typedefs INTR_ENDP_OUT, or *PINTR_ENDP_OUT are changed to call the struct directly. Signed-off-by: NKevin McKinney <klmckinney1@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Kevin McKinney 提交于
This patch removes typedef for _USB_TCB, changes the name of the struct to bcm_usb_tcb. In addition, any calls to typedefs USB_TCB, or *PUSB_TCB are changed to call the struct directly. Signed-off-by: NKevin McKinney <klmckinney1@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Kevin McKinney 提交于
This patch removes typedef for _USB_RCB, changes the name of the struct to bcm_usb_rcb. In addition, any calls to typedefs USB_RCB, or *PUSB_RCB are changed to call the struct directly. Signed-off-by: NKevin McKinney <klmckinney1@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Kevin McKinney 提交于
This patch removes typedef for _S_INTERFACE_ADAPTER, changes the name of the struct to bcm_interface_adapter. In addition, any calls to typedefs S_INTERFACE_ADAPTER, or *PS_INTERFACE_ADAPTER are changed to call the struct directly. Signed-off-by: NKevin McKinney <klmckinney1@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Kevin McKinney 提交于
This patch changes BOOLEAN to bool in InterfaceAdapter.h. Signed-off-by: NKevin McKinney <klmckinney1@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Kevin McKinney 提交于
This patch changes PVOID to void * in InterfaceAdapter.h. Signed-off-by: NKevin McKinney <klmckinney1@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Kevin McKinney 提交于
This patch changes UINT to unsigned int in InterfaceAdapter.h. Signed-off-by: NKevin McKinney <klmckinney1@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Kevin McKinney 提交于
This patch changes UCHAR to unsigned char in InterfaceAdapter.h. Signed-off-by: NKevin McKinney <klmckinney1@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Kevin McKinney 提交于
This patch changes PCHAR to char * in InterfaceAdapter.h. Signed-off-by: NKevin McKinney <klmckinney1@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Kevin McKinney 提交于
This patch correctly formats braces in InterfaceAdapter.h as reported by checkpatch.pl. Signed-off-by: NKevin McKinney <klmckinney1@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Kevin McKinney 提交于
This patch correctly formats comments in InterfaceAdapter.h as reported by checkpatch.pl. Signed-off-by: NKevin McKinney <klmckinney1@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Kevin McKinney 提交于
This patch fixes all white space issues in InterfaceAdapter.h as reported by checkpatch.pl. Signed-off-by: NKevin McKinney <klmckinney1@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 YAMANE Toshiaki 提交于
fixed below checkpatch warnings. - WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ... - WARNING: Prefer netdev_info(netdev, ... then dev_info(dev, ... then pr_info(... to printk(KERN_INFO ... - WARNING: Prefer netdev_notice(netdev, ... then dev_notice(dev, ... then pr_notice(... to printk(KERN_NOTICE ... Signed-off-by: NYAMANE Toshiaki <yamanetoshi@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Kumar Amit Mehta 提交于
checkpatch.pl throws error message for the current code. This patch fixes coding style issue. Signed-off-by: NKumar Amit Mehta <gmate.amit@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Mark Einon 提交于
A ring_index value of 0 is being used to reference the free buffer ring fbr[1] and ring_index=1 is used to reference fbr[0]. Avoid this confusing referencing by swapping the indicies so that ring_index=0 refers to fbr[0] and vice versa. Signed-off-by: NMark Einon <mark.einon@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Mark Einon 提交于
The fbr_lookup struct variables buffer1 and buffer2 are only assigned and never used, so remove them. Signed-off-by: NMark Einon <mark.einon@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 H Hartley Sweeten 提交于
This driver uses the comedi PCI auto attach mechanism and the comedi core does not use the boardinfo during the attach. Now that this driver has the attach separated from addi_common.c we can remove passing the boardinfo in the comedi_driver and cleanup the code that finds the boardinfo. Also, rename addi_find_boardinfo() so it has namespace associated with this driver. Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 H Hartley Sweeten 提交于
This define is not used by the driver. Remove it. Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 H Hartley Sweeten 提交于
This driver always tried to allocate the dma buffers so they need to be free'd when the board is detached. Remove the unneeded tests for the eeprom chip and bring the code back an indent. Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 H Hartley Sweeten 提交于
Only the apci3120 board supports an analog output subdevice. The boardinfo indicates this by setting the 'i_NbrAoChannel' value. The range table as well as the function used for the insn_write operation are fixed for the analog outputs. Remove this information from the boardinfo and use it directly in the subdevice init. Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 H Hartley Sweeten 提交于
This boardinfo value is not used by the driver. Remove it. Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 H Hartley Sweeten 提交于
Both boards supported by this driver have the same minimum delay time. Remove the boardinfo for it and just open code the value in i_APCI3120_CommandTestAnalogInput(). Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 H Hartley Sweeten 提交于
Both boards supported by this driver have the same minimum acquisition time.. Remove the boardinfo for it and just open code the value in i_APCI3120_CommandTestAnalogInput(). Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 H Hartley Sweeten 提交于
Both boards supported by this driver have the same analog input ranges. Remove the boardinfo for it and just init the subdevice directly. Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 H Hartley Sweeten 提交于
These values in the boardinfor were used in the common addi-data attach code to work out use of the PCI bars. Since this driver has a localized attach we already know the use of the bars so this information in the boardinfo is unnecessary. Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-