[PATCH 2/2] staging: comedi: comedidev.h: clarify async-event error/cancel detection

2014-10-13 Thread H Hartley Sweeten
Introduce COMEDI_CB_ERROR_MASK and COMEDI_CB_CANCEL_MASK to clarify the async-events that indicate errors and cancel an async command. Use the new defines to tidy up and clarify the code. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg

[PATCH 1/2] staging: comedi: comedidev.h: don't expose COMEDI_CB_* defines to userspace

2014-10-13 Thread H Hartley Sweeten
to avoid exposing them. For aesthetics, convert the defines to bit shifts to better indicate that they are bitmask values. Cleanup the documentation. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org

[PATCH 0/2] staging: comedi: tidy up the async event defines

2014-10-13 Thread H Hartley Sweeten
conditions and that cancel an async command. H Hartley Sweeten (2): staging: comedi: comedidev.h: don't expose COMEDI_CB_* defines to userspace staging: comedi: comedidev.h: clarify async-event error/cancel detection drivers/staging/comedi/comedi.h | 11 --- drivers/staging

[PATCH 22/34] staging: comedi: addi_common.h: remove boardinfo definition

2014-10-14 Thread H Hartley Sweeten
The addi_board definition is not only used by the addi_apci_3120 driver. Introduce a private definition in that driver and remove the global definition from addi_common.h. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre

[PATCH 09/34] staging: comedi: addi_apci_035: remove unnecessary subdevice initialization

2014-10-14 Thread H Hartley Sweeten
The subdevices that don't initialize any of the callbacks don't really exist. Remove the unnecessary initialzation and just set the type to COMEDI_SUBD_UNUSED. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre

[PATCH 13/34] staging: comedi: addi_common.h: rename boardinfo 'pc_DriverName'

2014-10-14 Thread H Hartley Sweeten
Rename this CamelCase member of the boardinfo. The comedi_device 'board_name' is set to this member during the (*auto_attach) of the addi-data that still use this boardinfo drivers. For aesthetics, use the dev-board_name instead of the boardinfo in the drivers. Signed-off-by: H Hartley Sweeten

[PATCH 21/34] staging: comedi: hwdrv_apci3120: remove need for boardinfo access

2014-10-14 Thread H Hartley Sweeten
and remove the boardinfo access. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff

[PATCH 14/34] staging: comedi: addi_common.h: remove boardinfo 'i_IorangeBase1'

2014-10-14 Thread H Hartley Sweeten
This member of the boardinfo is used as a flag to determine what PCI BAR to use for the main 'iobase' used by the driver. Remove the boardinfo member and refactor the (*auto_attach) of the drivers to use the correct PCI BAR. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian

[PATCH 07/34] staging: comedi: addi_apci_1500: remove subdevice callbacks from boardinfo

2014-10-14 Thread H Hartley Sweeten
This driver only has one boardinfo entry so the subdevice callbacks are always the same. Remvoe the callbacks from the boardinfo and use them directly when initializing the subdevices. Remove all the subdevice callback initialization that would be set to NULL. Signed-off-by: H Hartley Sweeten

[PATCH 02/34] staging: comedi: addi_common.c: remove i_ADDI_Reset()

2014-10-14 Thread H Hartley Sweeten
-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- drivers/staging/comedi/drivers/addi-data/addi_common.c | 9 - drivers/staging/comedi/drivers/addi_apci_035.c | 13 ++--- drivers

[PATCH 11/34] staging: comedi: addi_apci_1500: remove unnecessary subdevice initialization

2014-10-14 Thread H Hartley Sweeten
The subdevices that don't initialize any of the callbacks don't really exist. Remove the unnecessary initialzation and just set the type to COMEDI_SUBD_UNUSED. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre

[PATCH 03/34] staging: comedi: addi_common.c: remove addi_auto_attach()

2014-10-14 Thread H Hartley Sweeten
the bloat. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- .../staging/comedi/drivers/addi-data/addi_common.c | 192 - drivers/staging/comedi/drivers/addi_apci_035.c | 180

[PATCH 29/34] staging: comedi: addi_apci_3120: simplify analog output boardinfo

2014-10-14 Thread H Hartley Sweeten
to be initialized and open code the n_chan and maxdata. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- drivers/staging/comedi/drivers/addi_apci_3120.c | 13 + 1 file changed, 5

[PATCH 18/34] staging: comedi: addi_apci_1500: remove boardinfo

2014-10-14 Thread H Hartley Sweeten
The hardware does not have an eeprom so the 's_EeParameters' use is not necessary. Remove it. Since the boardinfo only has one entry its not really necessary. Remove it and initialize the subdevices directly. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo

[PATCH 20/34] staging: comedi: addi_eeprom: remove source file

2014-10-14 Thread H Hartley Sweeten
This source file is no longer included by any of the addi-data drivers. Remove it. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- .../staging/comedi/drivers/addi-data/addi_eeprom.c | 360

[PATCH 23/34] staging: comedi: addi_common.h: remove unused members from addi_private

2014-10-14 Thread H Hartley Sweeten
Remove all the unused members from the addi_private definition. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- drivers/staging/comedi/drivers/addi-data/addi_common.h | 16 1

[PATCH 05/34] staging: comedi: addi_common.c: remove included source file

2014-10-14 Thread H Hartley Sweeten
The addi_apci_035 and addi_apci_1500 are the only drivers left that include this source file. Copy the i_ADDIDATA_InsnReadEeprom() function from that file to those drivers and remove the addi_common.c file. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo

[PATCH 08/34] staging: comedi: addi_common.h: remove subdevice callbacks from struct addi_board

2014-10-14 Thread H Hartley Sweeten
None of the drivers that still include this header use the subdevice callbacks. Remove all of them to reduce the bloat. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- .../staging/comedi/drivers

[PATCH 04/34] staging: comedi: addi_common.c: remove v_ADDI_Interrupt()

2014-10-14 Thread H Hartley Sweeten
in the drivers and add the return vaules. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- drivers/staging/comedi/drivers/addi-data/addi_common.c| 9 - drivers/staging/comedi/drivers/addi

[PATCH 06/34] staging: comedi: addi_apci_035: remove subdevice callbacks from boardinfo

2014-10-14 Thread H Hartley Sweeten
This driver only has one boardinfo entry so the subdevice callbacks are always the same. Remvoe the callbacks from the boardinfo and use them directly when initializing the subdevices. Remove all the subdevice callback initialization that would be set to NULL. Signed-off-by: H Hartley Sweeten

[PATCH 26/34] staging: comedi: addi_apci_3120: remove boardinfo 'i_NbrDiChannel'

2014-10-14 Thread H Hartley Sweeten
All boardinfo entries have this member set as '4'. Remove the member and initialize the Digial Input 'n_chan' with 4 directly. Also, remove the initialization of 'len_chanlist'. This member is only used with subdevices that support async commands. Signed-off-by: H Hartley Sweeten hswee

[PATCH 15/34] staging: comedi: addi_apci_1500: remove eeprom support

2014-10-14 Thread H Hartley Sweeten
As indicated in the boardinfo, the hardware does not have an eeprom. Remove the subdevice and support code for it. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- drivers/staging/comedi/drivers

[PATCH 01/34] staging: comedi: addi_common.c: remove i_ADDI_Detach()

2014-10-14 Thread H Hartley Sweeten
The addi_apci_035 and addi_apci_1500 are the only drivers left that use this function in addi_common.c. Remove the function an add a private comedi_driver (*detach) function to those drivers. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg

[PATCH 30/34] staging: comedi: addi_apci_3120: simplify analog input boardinfo

2014-10-14 Thread H Hartley Sweeten
, adjust the whitespace in the boardinfo declaration. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- drivers/staging/comedi/drivers/addi_apci_3120.c | 13 ++--- 1 file changed, 6 insertions

[PATCH 19/34] staging: comedi: addi_apci_035: remove boardinfo

2014-10-14 Thread H Hartley Sweeten
interesting. Remove the eeprom support code along with the boardinfo and initialize the subdevices directly. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- drivers/staging/comedi/drivers/addi_apci_035.c

[PATCH 17/34] staging: comedi: addi_common.h: remove boardinfo member 'i_PCIEeprom'

2014-10-14 Thread H Hartley Sweeten
This member of the boardinfo is not used by any of the drivers. Remove it. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- drivers/staging/comedi/drivers/addi-data/addi_common.h | 1 - 1 file

[PATCH 32/34] staging: comedi: addi_apci_1500: separate from addi_common.h

2014-10-14 Thread H Hartley Sweeten
Remove the need to include addi_common.h by introducing a new private data definition. Only include the members that are actually used by the driver. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org

[PATCH 34/34] staging: comedi: addi_common.h: remove file

2014-10-14 Thread H Hartley Sweeten
This header is no longer included by any of the addi-data drivers. Remove it. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- .../staging/comedi/drivers/addi-data/addi_common.h | 52

[PATCH 00/34] staging: comedi: addi-data: remove common code bloat

2014-10-14 Thread H Hartley Sweeten
removes the unneeded boardinfo from the addi_apci_035 and addi_apci_1500 drivers and trims down the boardinfo in the addi_apci_3120 driver. H Hartley Sweeten (34): staging: comedi: addi_common.c: remove i_ADDI_Detach() staging: comedi: addi_common.c: remove i_ADDI_Reset() staging: comedi

[PATCH 33/34] staging: comedi: addi_apci_3120: separate from addi_common.h

2014-10-14 Thread H Hartley Sweeten
Remove the need to include addi_common.h by introducing a new private data definition. Only include the members that are actually used by the driver. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org

[PATCH 25/34] staging: comedi: addi_apci_3120: remove boardinfo 'i_NbrDoChannel'

2014-10-14 Thread H Hartley Sweeten
All boardinfo entries have this member set as '4'. Remove the member and initialize the Digial Output 'n_chan' with 4 directly. Also, remove the initialization of 'len_chanlist'. This member is only used with subdevices that support async commands. Signed-off-by: H Hartley Sweeten hswee

[PATCH 27/34] staging: comedi: addi_apci_3120: remove boardinfo 'i_NbrAiChannel'

2014-10-14 Thread H Hartley Sweeten
All boardinfo entries have this member set as '16'. This will initialize the Analog Input 'n_chan' and cause the 'i_NbrAiChannelDiff' member to never get used. Remove both members and initialize the Analog Input 'n_chan' with 16 directly. Signed-off-by: H Hartley Sweeten hswee

[PATCH 31/34] staging: comedi: addi_apci_035: separate from addi_common.h

2014-10-14 Thread H Hartley Sweeten
Remove the need to include addi_common.h by introducing a new private data definition. Only include the members that are actually used by the driver. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org

[PATCH 12/34] staging: comedi: addi_apci_1500: remove unused subdevices

2014-10-14 Thread H Hartley Sweeten
Only allocate space for the subdevicess used by the driver. Remove all the COMEDI_SUBD_UNUSED subdevices. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- drivers/staging/comedi/drivers

[PATCH 28/34] staging: comedi: addi_apci_3120: remove boardinfo 'i_AiChannelList'

2014-10-14 Thread H Hartley Sweeten
All boardinfo entries have this member set as '16'. This is also the Analog Input 'n_chan'. For aesthetics, initialize the Analog Input 'len_chanlist' with s-n_chan and remove the boardinfo member. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc

[PATCH 10/34] staging: comedi: addi_apci_035: remove unused subdevices

2014-10-14 Thread H Hartley Sweeten
Only allocate space for the subdevicess used by the driver. Remove all the COMEDI_SUBD_UNUSED subdevices. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- drivers/staging/comedi/drivers

[PATCH 24/34] staging: comedi: addi_apci_3120: remove boardinfo 'i_DoMaxdata'

2014-10-14 Thread H Hartley Sweeten
The maxdata for a Digital Output subdevice is always '1'. Remove this incorrect boardinfo. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- drivers/staging/comedi/drivers/addi_apci_3120.c | 5

[PATCH 1/5] staging: comedi: usbdux: introduce usbduxsub_ao_handle_urb()

2014-10-14 Thread H Hartley Sweeten
Factor the urb handling and resubmit out of the analog output urb completion handler and tidy it up. This allows a common exit path to be used in the completion handler to stop the async command and handle the events. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott

[PATCH 2/5] staging: comedi: usbdux: introduce usbduxsub_ai_handle_urb()

2014-10-14 Thread H Hartley Sweeten
Factor the urb handling and resubmit out of the analog input urb completion handler and tidy it up. This allows a common exit path to be used in the completion handler to stop the async command and handle the events. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott

[PATCH 3/5] staging: comedi: usbduxfast: introduce usbduxfast_ai_handle_urb()

2014-10-14 Thread H Hartley Sweeten
Factor the urb handling and resubmit out of the completion handler and tidy it up. This allows a common exit path to be used in the completion handler to stop the async command and handle the events. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc

[PATCH 0/5] staging: comedi: usbdux drivers: tidy up urb completion

2014-10-14 Thread H Hartley Sweeten
: [PATCH 0/2] staging: comedi: tidy up the async event defines H Hartley Sweeten (5): staging: comedi: usbdux: introduce usbduxsub_ao_handle_urb() staging: comedi: usbdux: introduce usbduxsub_ai_handle_urb() staging: comedi: usbduxfast: introduce usbduxfast_ai_handle_urb() staging: comedi

[PATCH 5/5] staging: comedi: usbduxsigma: introduce usbduxsigma_ai_handle_urb()

2014-10-14 Thread H Hartley Sweeten
Factor the urb handling and resubmit out of the analog input urb completion handler and tidy it up. This allows a common exit path to be used in the completion handler to stop the async command and handle the events. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott

[PATCH 4/5] staging: comedi: usbduxsigma: introduce usbduxsigma_ao_handle_urb()

2014-10-14 Thread H Hartley Sweeten
Factor the urb handling and resubmit out of the analog output urb completion handler and tidy it up. This allows a common exit path to be used in the completion handler to stop the async command and handle the events. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott

[PATCH] staging: comedi: addi_apci_035: remove driver

2014-10-20 Thread H Hartley Sweeten
According to ADDI-DATA, this board was discontinued last year and they feel that no further development is needed for this driver. Remove the driver from comedi to help with the addi-data cleanup. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc

[PATCH 4/9] staging: comedi: addi_apci_1564: board has 4 timers

2014-10-20 Thread H Hartley Sweeten
-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- drivers/staging/comedi/drivers/addi_apci_1564.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/comedi/drivers

[PATCH 1/9] staging: comedi: addi_apci_1564: remove APCI1564_COUNTER[1234] defines

2014-10-20 Thread H Hartley Sweeten
These defines don't add any significant clarity to the driver. Remove them. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c | 12

[PATCH 0/9] staging: comedi: addi_apci_1564: additional clean up

2014-10-20 Thread H Hartley Sweeten
registers are incorrect. According to the ADDI-DATA datasheet the PCI BARs are: PCI BAR0 - amcc chip registers PCI BAR1 - main board registers PCI BAR2 - counter registers Move the register map defines from the included hwdrv_apci1564.c file to the main driver source file. H Hartley Sweeten

[PATCH 9/9] staging: comedi: addi_apci_1564: move APCI1564_DO_INT_CTRL/STATUS_REG bit defines

2014-10-20 Thread H Hartley Sweeten
' defines to bit-shifts. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c | 6 -- drivers/staging/comedi/drivers/addi_apci_1564.c

[PATCH 8/9] staging: comedi: addi_apci_1564: move APCI1564_DI_IRQ_REG bit defines

2014-10-20 Thread H Hartley Sweeten
-shift. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- .../comedi/drivers/addi-data/hwdrv_apci1564.c | 8 drivers/staging/comedi/drivers/addi_apci_1564.c| 23

[PATCH 7/9] staging: comedi: addi_apci_1564: move register map defines to driver

2014-10-20 Thread H Hartley Sweeten
Move the defines for the register map from the included source file to the main driver source file. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- .../comedi/drivers/addi-data/hwdrv_apci1564.c

[PATCH 2/9] staging: comedi: addi_apci_1564: remove private data 'mode_select_register'

2014-10-20 Thread H Hartley Sweeten
-chanspec. Use that instead and remove the private data member. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- .../comedi/drivers/addi-data/hwdrv_apci1564.c | 24 -- drivers

[PATCH 6/9] staging: comedi: addi_apci_1564: tidy up private data 'amcc_iobase'

2014-10-20 Thread H Hartley Sweeten
For aesthetics, rename this member to simply 'amcc'. Change the type to match the type returned by pci_resource_start(). Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- drivers/staging/comedi

[PATCH 3/9] staging: comedi: addi_apci_1564: fix counter register access

2014-10-20 Thread H Hartley Sweeten
According to the I/O map information from ADDI-DATA, the counters are accessed using the base address found in PCI BAR 2 not the one in PCI BAR 1. Add a new member to the private data for this base address and fix all the counter I/O. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com

[PATCH 5/9] staging: comedi: addi_apci_1564: fix board register access

2014-10-20 Thread H Hartley Sweeten
According to the I/O map information from ADDI-DATA, the board registers are accessed using the base address found in PCI BAR 1 not the one in PCI BAR 0. The PCI BAR 1 address is stored in dev-iobase during the attach. Use that instead of devpriv-amcc_iobase (PCI BAR 0). Signed-off-by: H Hartley

[PATCH 05/22] staging: comedi: addi_apci_3120: remove private data 'i_IobaseReserved'

2014-10-20 Thread H Hartley Sweeten
This member of the private data is not used by the driver. Remove it. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- drivers/staging/comedi/drivers/addi_apci_3120.c | 2 -- 1 file changed, 2

[PATCH 01/22] staging: comedi: addi_apci_3120: DMA requires an interrupt

2014-10-20 Thread H Hartley Sweeten
An interrupt is required for DMA to work. Factor out the DMA buffer allocation from the (*auto_attach) and only allocate the buffers if the interrupt is available. For aesthetics, also factor the DMA buffer free from the (*detach). Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com

[PATCH 02/22] staging: comedi: addi_apci_3120: introduce struct apci3120_dmabuf

2014-10-20 Thread H Hartley Sweeten
For aesthetics, wrap the DMA buffer information in a struct. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- .../comedi/drivers/addi-data/hwdrv_apci3120.c | 85

[PATCH 00/22] staging: comedi: addi_apci_3120: additional clean up

2014-10-20 Thread H Hartley Sweeten
More cleanup of the addi_apci_3120 driver. These apply after: [PATCH 00/34] staging: comedi: addi-data: remove common code bloat H Hartley Sweeten (22): staging: comedi: addi_apci_3120: DMA requires an interrupt staging: comedi: addi_apci_3120: introduce struct apci3120_dmabuf staging

[PATCH 06/22] staging: comedi: addi_apci_3120: use correct iobase to write AMCC registers

2014-10-20 Thread H Hartley Sweeten
The AMCC registers are accessed using the base address devpriv-i_IobaseAmcc not devpriv-i_IobaseAddon. Fix a couple writes in apci3120_interrupt_dma() that are using the wrong base address. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg

[PATCH 08/22] staging: comedi: addi_apci_3120: rename private data 'i_IobaseAddon'

2014-10-20 Thread H Hartley Sweeten
This member of the private data holds the start address of PCI BAR 2 that is used to access the AMCC Add-On registers. Rename this CamelCase member and fix its type. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre

[PATCH 16/22] staging: comedi: addi_apci_3120: tidy up digital input subdevice init

2014-10-20 Thread H Hartley Sweeten
For aesthetics, add some white space to the digital input subdevice initialization. Remove the subdev_flags SDF_GROUND and SDF_COMMON. These only apply to analog subdevices. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre

[PATCH 18/22] staging: comedi: addi_apci_3120: tidy up analog input subdevice init

2014-10-20 Thread H Hartley Sweeten
-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- drivers/staging/comedi/drivers/addi_apci_3120.c | 32 - 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/drivers/staging

[PATCH 04/22] staging: comedi: addi_apci_3120: remove unipolar range from analog outputs

2014-10-20 Thread H Hartley Sweeten
to range_bipolar10 and remove the munging in apci3120_ao_insn_write(). Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- .../comedi/drivers/addi-data/hwdrv_apci3120.c | 31 ++ drivers

[PATCH 15/22] staging: comedi: addi_apci_3120: tidy up analog output subdevice init

2014-10-20 Thread H Hartley Sweeten
For aesthetics, add some white space to the analog output subdevice initialization. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- drivers/staging/comedi/drivers/addi_apci_3120.c | 18

[PATCH 11/22] staging: comedi: addi_apci_3120: prevent deadlock in apci3120_ao_insn_write()

2014-10-20 Thread H Hartley Sweeten
The DA_READY bit (0x0001) in the status register needs to be set before the analog outputs can be updated. Use comedi_timeout() to prevent a deadlock condition while waiting for the DA_READY bit to get set. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo

[PATCH 03/22] staging: comedi: addi_apci_3120: remove unused struct definition

2014-10-20 Thread H Hartley Sweeten
The struct str_AnalogReadInformation is not used in this driver. Remove it. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- .../staging/comedi/drivers/addi-data/hwdrv_apci3120.c | 17

[PATCH 19/22] staging: comedi: addi_apci_3120: tidy up timer subdevice init

2014-10-20 Thread H Hartley Sweeten
-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- drivers/staging/comedi/drivers/addi_apci_3120.c | 19 --- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/drivers/staging

[PATCH 21/22] staging: comedi: addi_apci_3120: don't reset board when canceling ai command

2014-10-20 Thread H Hartley Sweeten
The analog input (*cancel) stops the async command. There is not reason to also call the board reset function. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- drivers/staging/comedi/drivers/addi

[PATCH 07/22] staging: comedi: addi_apci_3120: use correct iobase to read board register

2014-10-20 Thread H Hartley Sweeten
The board registers are accessed using the bse address devpriv-iobase not devpriv-i_IobaseAmcc. Fix a read in apci3120_interrupt() that is using the wrong base address. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre

[PATCH 09/22] staging: comedi: addi_apci_3120: rename private data 'i_IobaseAmcc'

2014-10-20 Thread H Hartley Sweeten
-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- .../comedi/drivers/addi-data/hwdrv_apci3120.c | 61 +++--- drivers/staging/comedi/drivers/addi_apci_3120.c| 4 +- 2 files changed

[PATCH 20/22] staging: comedi: addi_apci_3120: reset the board before hooking up the interrupt

2014-10-20 Thread H Hartley Sweeten
Move the apci3120_reset() call in the (*auto_attach) to ensure that the board is reset before hooking up the interrupt. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- drivers/staging/comedi

[PATCH 12/22] staging: comedi: addi_apci_3120: remove analog output reset

2014-10-20 Thread H Hartley Sweeten
(). Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- .../staging/comedi/drivers/addi-data/hwdrv_apci3120.c | 18 -- 1 file changed, 18 deletions(-) diff --git a/drivers/staging/comedi

[PATCH 22/22] staging: comedi: addi_apci_3120: don't reset board when detaching driver

2014-10-20 Thread H Hartley Sweeten
The comedi core calls all the subdevice (*cancel) functions before it does the driver (*detach). There is no reason to call the board reset function in the (*detach). Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre

[PATCH 14/22] staging: comedi: addi_apci_3120: provide analog output 'readback'

2014-10-20 Thread H Hartley Sweeten
Use the comedi_subdevice 'readback' member and the core provided (*insn_read) function to provide radback of the analog output channels. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- drivers

[PATCH 13/22] staging: comedi: addi_apci_3120: fix apci3120_ao_insn_write()

2014-10-20 Thread H Hartley Sweeten
and bits in the registers. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- .../comedi/drivers/addi-data/hwdrv_apci3120.c | 45 ++ drivers/staging/comedi/drivers/addi_apci_3120

[PATCH 10/22] staging: comedi: addi_apci_3120: remove private data 'iobase'

2014-10-20 Thread H Hartley Sweeten
registers. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- .../comedi/drivers/addi-data/hwdrv_apci3120.c | 144 ++--- drivers/staging/comedi/drivers/addi_apci_3120.c| 2 - 2

[PATCH 17/22] staging: comedi: addi_apci_3120: tidy up digital output subdevice init

2014-10-20 Thread H Hartley Sweeten
For aesthetics, add some white space to the digital output subdevice initialization. Remove the subdev_flags SDF_GROUND and SDF_COMMON. These only apply to analog subdevices. Also remove the unnecessary SDF_READABLE subdev_flag. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc

[PATCH 01/18] staging: comedi: comedi_buf: introduce comedi_buf_read_samples()

2014-10-20 Thread H Hartley Sweeten
the COMEDI_CB_BLOCK event after reading the data, those events can be removed from the drivers. In addition, comedi_inc_scan_progress() will automatically detect the end of scan and set the COMEDI_CB_EOS event. Those events can also be removed from the drivers. Signed-off-by: H Hartley Sweeten hswee

[PATCH 08/18] staging: comedi: comedi_buf: absorb comedi_read_array_from_buffer()

2014-10-20 Thread H Hartley Sweeten
This function is only called by comedi_buf_read_samples(). Absorb it. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- drivers/staging/comedi/comedi_buf.c | 27 ++- 1 file

[PATCH 02/18] staging: comedi: amplc_pci224: use comedi_buf_read_samples()

2014-10-20 Thread H Hartley Sweeten
Use the new generic method to read the analog output samples from the async buffer. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- drivers/staging/comedi/drivers/amplc_pci224.c | 7 +++ 1

[PATCH 00/18] staging: comedi: clean up reading data from the async buffer

2014-10-20 Thread H Hartley Sweeten
. Remove the exports from comedi_buf_memcpy_{to,from}() and tidy them up a bit. H Hartley Sweeten (18): staging: comedi: comedi_buf: introduce comedi_buf_read_samples() staging: comedi: amplc_pci224: use comedi_buf_read_samples() staging: comedi: cb_pcidas: introduce cb_pcidas_ao_load_fifo

[PATCH 06/18] staging: comedi: comedi_fc.h: remove cfc_read_array_from_buffer()

2014-10-20 Thread H Hartley Sweeten
This inline function is no longer used. Remove it. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- drivers/staging/comedi/drivers/comedi_fc.h | 7 --- 1 file changed, 7 deletions(-) diff

[PATCH 09/18] staging: comedi: comedi_buf: make comedi_buf_read_samples() work for single samples

2014-10-20 Thread H Hartley Sweeten
. Add a check to comedi_buf_read_samples() so that the single sample is read from the buffer only if there is a full sample in the buffer. This allows comedi_buf_read_samples() to mimic the action of comedi_buf_get() with the added benifit of handling the events. Signed-off-by: H Hartley Sweeten

[PATCH 04/18] staging: comedi: cb_pcidas: introduce cb_pcidas64_ao_fill_buffer()

2014-10-20 Thread H Hartley Sweeten
() to read the analog output samples from the async buffer. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- drivers/staging/comedi/drivers/cb_pcidas64.c | 79 +--- 1 file changed

[PATCH 14/18] staging: comedi: comedi_buf: remove comedi_buf_get()

2014-10-20 Thread H Hartley Sweeten
This function is no longer used. Remove it. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- drivers/staging/comedi/comedi_buf.c | 14 -- drivers/staging/comedi/comedidev.h | 1 - 2

[PATCH 17/18] staging: comedi: comedi_buf: comedi_buf_memcpy_to() remove 'offset' param

2014-10-20 Thread H Hartley Sweeten
This parameter is always passed as '0'. Remove the unnecessary parameter. This allows removing the unnecessary check of the write_ptr overflow. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org

[PATCH 05/18] staging: comedi: dt282x: introduce dt282x_ao_setup_dma()

2014-10-20 Thread H Hartley Sweeten
Introduce a helper function to read the analog output samples from the async buffer and prep the DMA. Use comedi_buf_read_samples() to read the analog output samples from the async buffer. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg

[PATCH 15/18] staging: comedi: comedi_buf: dont't export comedi_buf_memcpy_from()

2014-10-20 Thread H Hartley Sweeten
This function is only used internally. Remove the export. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- drivers/staging/comedi/comedi_buf.c | 6 +++--- drivers/staging/comedi/comedidev.h | 3

[PATCH 18/18] staging: comedi: comedi_buf: comedi_buf_memcpy_from() remove 'offset' param

2014-10-20 Thread H Hartley Sweeten
This parameter is always passed as '0'. Remove the unnecessary parameter. This allows removing the unnecessary check of the read_ptr overflow. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org

[PATCH 10/18] staging: comedi: ni_mio_common: use comedi_buf_read_samples()

2014-10-20 Thread H Hartley Sweeten
Use comedi_buf_read_samples() to get the single samples from the async buffer. The number of samples in the buffer was validated by the callers so the error checking can be removed. In addition, the core will set the COMEDI_CB_BLOCK event so it can also be removed. Signed-off-by: H Hartley

[PATCH 07/18] staging: comedi: comedi_buf: remove export of comedi_read_array_from_buffer()

2014-10-20 Thread H Hartley Sweeten
This function is only used internally. Remove the export. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- drivers/staging/comedi/comedi_buf.c | 17 +++-- drivers/staging/comedi

[PATCH 11/18] staging: comedi: amplc_pci230: use comedi_buf_read_samples()

2014-10-20 Thread H Hartley Sweeten
Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- drivers/staging/comedi/drivers/amplc_pci230.c | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/drivers/staging/comedi/drivers

[PATCH 03/18] staging: comedi: cb_pcidas: introduce cb_pcidas_ao_load_fifo()

2014-10-20 Thread H Hartley Sweeten
() read the analog output samples from the async buffer. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- drivers/staging/comedi/drivers/cb_pcidas.c | 54 -- 1 file

[PATCH 12/18] staging: comedi: usbdux: use comedi_buf_read_samples()

2014-10-20 Thread H Hartley Sweeten
Use comedi_buf_read_samples() to read the analog output samples from the async buffer. That function will set the COMEDI_CB_BLOCK event when samples are read from the async buffer. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah

[PATCH 16/18] staging: comedi: comedi_buf: don't export comedi_buf_memcpy_to()

2014-10-20 Thread H Hartley Sweeten
This function is only used internally. Remove the export. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- drivers/staging/comedi/comedi_buf.c | 6 +++--- drivers/staging/comedi/comedidev.h | 3

[PATCH 13/18] staging: comedi: usbduxsigma: use comedi_buf_read_samples()

2014-10-20 Thread H Hartley Sweeten
Use comedi_buf_read_samples() to read the analog output samples from the async buffer. That function will set the COMEDI_CB_BLOCK event when samples are read from the async buffer. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah

[PATCH] staging: comedi: ni_65xx: remove deadcode in ni_65xx_intr_cmdtest()

2014-10-20 Thread H Hartley Sweeten
Reported by: coverity (CID 142963) Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- drivers/staging/comedi/drivers/ni_65xx.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging

[PATCH] staging: comedi: ni_6527: remove deadcode in ni6527_intr_cmdtest()

2014-10-20 Thread H Hartley Sweeten
Reported by: coverity (CID 142962) Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- drivers/staging/comedi/drivers/ni_6527.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging

[PATCH] staging: comedi: ni_mio_common: remove deadcode in ni_cdio_cmdtest()

2014-10-20 Thread H Hartley Sweeten
Reported by: coverity (CID 142967) Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- drivers/staging/comedi/drivers/ni_mio_common.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers

[PATCH v2 00/18] staging: comedi: clean up reading data from the async buffer

2014-10-22 Thread H Hartley Sweeten
. Remove the exports from comedi_buf_memcpy_{to,from}() and tidy them up a bit. v2: fix patch 01/18 as suggested by Ian Abbott fix patch 09/18 as suggested by Ian Abbott H Hartley Sweeten (18): staging: comedi: comedi_buf: introduce comedi_buf_read_samples() staging: comedi

  1   2   3   4   5   6   7   8   9   10   >