[PATCH 06/11] staging: comedi: adv_pci1723: tidy up pci1723_dio_insn_config()

2014-11-21 Thread H Hartley Sweeten
For aesthetics, tidy this function up and use the register defines to remove the magic numbers. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/adv_pci1723.c | 21 ++--- 1 file changed, 6 insertions(+), 15 deletions

[PATCH 06/11] staging: comedi: addi_apci_1500: remove private data 'i_IobaseReserved'

2014-12-02 Thread H Hartley Sweeten
This member of the private data is set but not used by the driver. Remove it. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/addi_apci_1500.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/comedi/drivers

[PATCH 08/11] staging: comedi: addi_apci_1500: rename private data 'i_IobaseAddon'

2014-12-02 Thread H Hartley Sweeten
Rename this CamelCase member of the private data. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- .../comedi/drivers/addi-data/hwdrv_apci1500.c| 20 drivers/staging/comedi/drivers/addi_apci_1500.c | 4 ++-- 2 files changed, 10

[PATCH 00/11] staging: comedi: addi_apci_1500: initial cleanup

2014-12-02 Thread H Hartley Sweeten
register map defines. Fix the interrupt handler so that the IRQ is properly shared. H Hartley Sweeten (11): staging: comedi: hwdrv_apci1500: introduce z8536_read() staging: comedi: hwdrv_apci1500: introduce z8536_write() staging: comedi: hwdrv_apci1500: introduce z8536_reset() staging

[PATCH 09/11] staging: comedi: addi_apci_1500: tidy up PCI Bar 2 register map

2014-12-02 Thread H Hartley Sweeten
Move the PCI Bar 1 register map defines to the main driver source file. For aesthetics, rename the defines. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- .../comedi/drivers/addi-data/hwdrv_apci1500.c | 21 - drivers/staging/comedi/drivers

[PATCH 02/11] staging: comedi: hwdrv_apci1500: introduce z8536_write()

2014-12-02 Thread H Hartley Sweeten
The Z8536 CIO registers are indirectly written by writing the register value to the control register then writing the value to the control register. Introduce a helper function to write the Z8536 CIO registers. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman

[PATCH 05/11] staging: comedi: addi_apci_1500: remove private data 'iobase'

2014-12-02 Thread H Hartley Sweeten
This member of the private data is the same as the comedi_device 'iobase'. Remove the private data member and use that instead. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- .../comedi/drivers/addi-data/hwdrv_apci1500.c | 28 +

[PATCH 04/11] staging: comedi: addi_apci_1500: tidy up PCI Bar 1 register map

2014-12-02 Thread H Hartley Sweeten
For aesthetics, convert the enum for the PCI Bar 1 register map to defines and move them to the main driver source file. Rename the registers. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- .../comedi/drivers/addi-data/hwdrv_apci1500.c | 35

[PATCH 03/11] staging: comedi: hwdrv_apci1500: introduce z8536_reset()

2014-12-02 Thread H Hartley Sweeten
Introduce a helper function to reset the Z8536 CIO device. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- .../comedi/drivers/addi-data/hwdrv_apci1500.c | 185 - 1 file changed, 69 insertions(+), 116 deletions(-) diff --git a/drivers

[PATCH 11/11] staging: comedi: addi_apci_1500: handle shared interrupt

2014-12-02 Thread H Hartley Sweeten
The interrupt used by this driver is shared. If the board did not cause the interrupt the driver should return IRQ_NONE so that another driver can handle it. Fix the interrupt handler so this happens. Tidy up the interrupt handler a bit. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg

[PATCH 10/11] staging: comedi: addi_apci_1500: remove APCI1500_ADDRESS_RANGE

2014-12-02 Thread H Hartley Sweeten
This define is not used by the driver. Remove it. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/addi-data/hwdrv_apci1500.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1500

[PATCH 01/11] staging: comedi: hwdrv_apci1500: introduce z8536_read()

2014-12-02 Thread H Hartley Sweeten
The Z8536 CIO registers are indirectly read by writing the register value to the control register then reading the control register. Introduce a helper function to read the Z8536 CIO registers. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- .../comedi/drivers/addi

[PATCH 07/11] staging: comedi: addi_apci_1500: use amcc_s5933.h defines

2014-12-02 Thread H Hartley Sweeten
PCI Bar 0 accesses the AMCC S5933 PCI controller used on this board. Use the defines from amcc_35933.h and remove the "magic" numbers. Rename the CamelCase private data member 'i_IobaseAmcc' used to hold the address for PCI Bar 0. Signed-off-by: H Hartley Sweeten Cc: Ian Ab

[PATCH v2 01/11] staging: comedi: hwdrv_apci1500: introduce z8536_read()

2014-12-03 Thread H Hartley Sweeten
inlock the sequence to protect the indirect register access. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- .../comedi/drivers/addi-data/hwdrv_apci1500.c | 222 ++--- 1 file changed, 58 insertions(+), 164 deletions(-) diff --git a/drivers/stag

[PATCH v2 00/11] staging: comedi: addi_apci_1500: initial cleanup

2014-12-03 Thread H Hartley Sweeten
register map defines. Fix the interrupt handler so that the IRQ is properly shared. v2: spinlock protect the Z8536 indirect register access as suggested by Ian Abbott H Hartley Sweeten (11): staging: comedi: hwdrv_apci1500: introduce z8536_read() staging: comedi: hwdrv_apci1500: introduce

[PATCH v2 03/11] staging: comedi: hwdrv_apci1500: introduce z8536_reset()

2014-12-03 Thread H Hartley Sweeten
Introduce a helper function to reset the Z8536 CIO device. Spinlock the initial reset of the Z8536 chip that puts it in State 0. The z8536_{read,write} operations already do the spinlock to protect the indirect register access. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah

[PATCH v2 05/11] staging: comedi: addi_apci_1500: remove private data 'iobase'

2014-12-03 Thread H Hartley Sweeten
This member of the private data is the same as the comedi_device 'iobase'. Remove the private data member and use that instead. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- .../comedi/drivers/addi-data/hwdrv_apci1500.c | 25 ++---

[PATCH v2 06/11] staging: comedi: addi_apci_1500: remove private data 'i_IobaseReserved'

2014-12-03 Thread H Hartley Sweeten
This member of the private data is set but not used by the driver. Remove it. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/addi_apci_1500.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/comedi/drivers

[PATCH v2 07/11] staging: comedi: addi_apci_1500: use amcc_s5933.h defines

2014-12-03 Thread H Hartley Sweeten
Status' local variable in apci1500_do_bits() that is used to hold the result of some dummy reads. Rename the CamelCase local variable 'ui_InterruptStatus' that is used to check the interrupt from the amcc chip. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- .../c

[PATCH v2 04/11] staging: comedi: addi_apci_1500: tidy up PCI Bar 1 register map

2014-12-03 Thread H Hartley Sweeten
For aesthetics, convert the enum for the PCI Bar 1 register map to defines and move them to the main driver source file. Rename the registers. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- .../comedi/drivers/addi-data/hwdrv_apci1500.c | 35

[PATCH v2 02/11] staging: comedi: hwdrv_apci1500: introduce z8536_write()

2014-12-03 Thread H Hartley Sweeten
, spinlock the sequence to protect the indirect register access. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- .../comedi/drivers/addi-data/hwdrv_apci1500.c | 1059 +--- 1 file changed, 250 insertions(+), 809 deletions(-) diff --git a/drive

[PATCH v2 09/11] staging: comedi: addi_apci_1500: tidy up PCI Bar 2 register map

2014-12-03 Thread H Hartley Sweeten
Move the PCI Bar 1 register map defines to the main driver source file. For aesthetics, rename the defines. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- .../comedi/drivers/addi-data/hwdrv_apci1500.c | 21 - drivers/staging/comedi/drivers

[PATCH v2 11/11] staging: comedi: addi_apci_1500: handle shared interrupt

2014-12-03 Thread H Hartley Sweeten
The interrupt used by this driver is shared. If the board did not cause the interrupt the driver should return IRQ_NONE so that another driver can handle it. Fix the interrupt handler so this happens. Tidy up the interrupt handler a bit. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg

[PATCH v2 08/11] staging: comedi: addi_apci_1500: rename private data 'i_IobaseAddon'

2014-12-03 Thread H Hartley Sweeten
Rename this CamelCase member of the private data. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- .../comedi/drivers/addi-data/hwdrv_apci1500.c| 20 drivers/staging/comedi/drivers/addi_apci_1500.c | 4 ++-- 2 files changed, 10

[PATCH v2 10/11] staging: comedi: addi_apci_1500: remove APCI1500_ADDRESS_RANGE

2014-12-03 Thread H Hartley Sweeten
This define is not used by the driver. Remove it. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/addi-data/hwdrv_apci1500.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1500

[PATCH 0/8] staging: comedi: aio_iiro_16: cleaup driver

2015-01-07 Thread H Hartley Sweeten
Tidy up this driver and add async command support for change-of-state detection of the digital inputs. H Hartley Sweeten (8): staging: comedi: aio_iiro_16: fix subdevice 0 'type' staging: comedi: aio_iiro_16: fix subdevice 1 'type' staging: comedi: aio_iiro_16: ti

[PATCH 4/8] staging: comedi: aio_iiro_16: tidy up multi-line comments

2015-01-07 Thread H Hartley Sweeten
Tidy up the multi-line comments to follow the kernel CodingStyle. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/aio_iiro_16.c | 51 +--- 1 file changed, 23 insertions(+), 28 deletions(-) diff --git a/drivers

[PATCH 3/8] staging: comedi: aio_iiro_16: tidy up subdevice init

2015-01-07 Thread H Hartley Sweeten
For aesthetics, add some white space to the subdevice initialization. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/aio_iiro_16.c | 28 +++- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a

[PATCH 2/8] staging: comedi: aio_iiro_16: fix subdevice 1 'type'

2015-01-07 Thread H Hartley Sweeten
Subdevice 1 is a digial input not a digital I/O subdevice. Fix the type and, for aesthetics, rename the (*insn_bits) function used to read the inputs. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/aio_iiro_16.c | 12 ++-- 1

[PATCH 1/8] staging: comedi: aio_iiro_16: fix subdevice 0 'type'

2015-01-07 Thread H Hartley Sweeten
Subdevice 0 is a digial output not a digital I/O subdevice. Fix the type and, for aesthetics, rename the (*insn_bits) function used to set the outputs. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/aio_iiro_16.c | 12 ++-- 1

[PATCH 8/8] staging: comedi: aio_iiro_16: update the MODULE_DESCRIPTION

2015-01-07 Thread H Hartley Sweeten
Update the MODULE_DESCRIPTION to something more useful than the generic "Comedi low-level driver". Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/aio_iiro_16.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) di

[PATCH 5/8] staging: comedi: aio_iiro_16: read intial state of the digital outputs

2015-01-07 Thread H Hartley Sweeten
The relay registers are readable. Read them during the attach to get the initial state of the digital outputs. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/aio_iiro_16.c | 4 1 file changed, 4 insertions(+) diff --git a

[PATCH 7/8] staging: comedi: aio_iiro_16: add command support for change of state detection

2015-01-07 Thread H Hartley Sweeten
This board supports interrupts on change of state of the digital inputs. Add the necessary subdevice support and interrupt handler to allow async commands to detect the change of state. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers

[PATCH 6/8] staging: comedi: aio_iiro_16: introduce aio_iiro_enable_irq()

2015-01-07 Thread H Hartley Sweeten
This board supports interrupts on change of state of the digital inputs. Introduce a helper function to enable/disable the interrupt. Use the new helper function to ensure that interrupts are initially disabled during the driver (*attach). Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc

[PATCH 12/37] staging: comedi: ni_at_a2150: introduce struct a2150_dma_desc

2015-01-12 Thread H Hartley Sweeten
For aesthetics, introduce a struct to hold the DMA descriptor data. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_at_a2150.c | 76 +++- 1 file changed, 41 insertions(+), 35 deletions(-) diff --git a

[PATCH 19/37] staging: comedi: pcl818: introduce struct pcl818_dma_desc

2015-01-12 Thread H Hartley Sweeten
For aesthetics, introduce a struct to hold the DMA descriptor data. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl818.c | 44 +++-- 1 file changed, 25 insertions(+), 19 deletions(-) diff --git a

[PATCH 22/37] staging: comedi: pcl816: introduce pcl816_alloc_dma()

2015-01-12 Thread H Hartley Sweeten
igned-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl816.c | 91 - 1 file changed, 56 insertions(+), 35 deletions(-) diff --git a/drivers/staging/comedi/drivers/pcl816.c b/drivers/staging/comedi/drivers/pcl

[PATCH 08/37] staging: comedi: ni_at_a2150: remove 'volatile' from private data variable

2015-01-12 Thread H Hartley Sweeten
As indicated by checkpatch.pl, "WARNING: Use of volatile is usually wrong: ...", the 'count' member of the private data does not need to be volatile. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_at_a2150.c | 3

[PATCH 01/37] staging: comedi: adl_pci9118: remove VIRT_TO_BUS dependancy

2015-01-12 Thread H Hartley Sweeten
This driver no longer uses virt_to_bus(). Remove the dependancy. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/comedi/Kconfig b/drivers/staging/comedi/Kconfig index

[PATCH 27/37] staging: comedi: pcl812: introduce pcl812_alloc_dma()

2015-01-12 Thread H Hartley Sweeten
DMA is optional with this driver. Introduce a helper function to request the DMA channel and allocate the buffers. Don't fail the driver attach if the user passed an invalid DMA channel or the channel cannot be requested. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Ha

[PATCH 00/37] staging: comedi: tidy up legacy DMA drivers

2015-01-12 Thread H Hartley Sweeten
This series removes all the VIRT_TO_BUS dependancies from the legacy comedi drivers. It also tidies up the allocation and freeing of the DMA and the buffers used for DMA. H Hartley Sweeten (37): staging: comedi: adl_pci9118: remove VIRT_TO_BUS dependancy staging: comedi: das1800: reduce

[PATCH 30/37] staging: comedi: pcl812: remove VIRT_TO_BUS dependancy

2015-01-12 Thread H Hartley Sweeten
Use dma_{alloc,free}_coherent() to allocate and free the DMA buffers. This removes the dependancy on VIRT_TO_BUS. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/Kconfig | 2 +- drivers/staging/comedi/drivers/pcl812.c | 20

[PATCH 09/37] staging: comedi: ni_at_a2150: use comedi_bytes_per_sample()

2015-01-12 Thread H Hartley Sweeten
From: H Hartley Sweeten For aesthetics, use the helper function to get the byte size of each sample instead of using sizeof() the first buffer element. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_at_a2150.c | 8 1

[PATCH 23/37] staging: comedi: pcl816: introduce pcl816_free_dma()

2015-01-12 Thread H Hartley Sweeten
For aesthetics, move the freeing of the DMA channel and the buffers to a helper function. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl816.c | 25 + 1 file changed, 17 insertions(+), 8 deletions(-) diff

[PATCH 33/37] staging: comedi: dt282x: remove VIRT_TO_BUS dependancy

2015-01-12 Thread H Hartley Sweeten
Use dma_{alloc,free}_coherent() to allocate and free the DMA buffers. This removes the dependancy on VIRT_TO_BUS. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/Kconfig | 2 +- drivers/staging/comedi/drivers/dt282x.c | 13

[PATCH 25/37] staging: comedi: pcl816: remove VIRT_TO_BUS dependancy

2015-01-12 Thread H Hartley Sweeten
Use dma_{alloc,free}_coherent() to allocate and free the DMA buffers. This removes the dependancy on VIRT_TO_BUS. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/Kconfig | 2 +- drivers/staging/comedi/drivers/pcl816.c | 20

[PATCH 11/37] staging: comedi: ni_at_a2150: introduce a2150_free_dma()

2015-01-12 Thread H Hartley Sweeten
From: H Hartley Sweeten For aesthetics, introduce a helper function to free the DMA channel and buffer. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_at_a2150.c | 20 +--- 1 file changed, 13 insertions(+), 7

[PATCH 03/37] staging: comedi: das1800: separate AI FIFO bounce buffer from DMA buffer

2015-01-12 Thread H Hartley Sweeten
. For aesthetics, add a new member to the private data and use that for the FIFO bounce buffer. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das1800.c | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/dr

[PATCH 05/37] staging: comedi: das1800: tidy up das1800_init_dma()

2015-01-12 Thread H Hartley Sweeten
Refactor this function so that a for loop can be used to request and set up the two DMA descriptors. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das1800.c | 52 +++- 1 file changed, 25 insertions(+), 27

[PATCH 15/37] staging: comedi: ni_labpc_isadma: tidy up labpc_init_dma_chan()

2015-01-12 Thread H Hartley Sweeten
DMA support is optional for the labpc driver. The return value from labpc_init_dma_chan() is not even checked by the caller. Change the return type to void and tidy up the function a bit. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi

[PATCH 36/37] staging: comedi: das16: introduce das16_free_dma()

2015-01-12 Thread H Hartley Sweeten
For aesthetics, move the freeing of the DMA channel and the buffers to a helper function. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das16.c | 33 +++-- 1 file changed, 19 insertions(+), 14 deletions

[PATCH 32/37] staging: comedi: dt282x: introduce struct dt282x_dma_desc

2015-01-12 Thread H Hartley Sweeten
For aesthetics, introduce a struct to hold the DMA descriptor data. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/dt282x.c | 111 +++- 1 file changed, 53 insertions(+), 58 deletions(-) diff --git a

[PATCH 24/37] staging: comedi: pcl816: introduce struct pcl816_dma_desc

2015-01-12 Thread H Hartley Sweeten
For aesthetics, introduce a struct to hold the DMA descriptor data. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl816.c | 51 ++--- 1 file changed, 28 insertions(+), 23 deletions(-) diff --git a

[PATCH 17/37] staging: comedi: pcl818: introduce pcl818_alloc_dma()

2015-01-12 Thread H Hartley Sweeten
DMA is optional with this driver. Introduce a helper function to request the DMA channel and allocate the buffers. Don't fail the driver attach if the user passed an invalid DMA channel or the channel cannot be requested. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Ha

[PATCH 02/37] staging: comedi: das1800: reduce indent level of das1800_init_dma()

2015-01-12 Thread H Hartley Sweeten
An IRQ and at least one DMA channel are required to use DMA with this driver. Move the check to the caller to reduce the indent level of this function. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das1800.c | 129

[PATCH 13/37] staging: comedi: ni_at_a2150: remove VIRT_TO_BUS dependancy

2015-01-12 Thread H Hartley Sweeten
Use dma_{alloc,free}_coherent() to allocate and free the DMA buffers. This removes the dependancy on VIRT_TO_BUS. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/Kconfig | 2 +- drivers/staging/comedi/drivers/ni_at_a2150.c | 17

[PATCH 31/37] staging: comedi: dt282x: introduce dt282x_alloc_dma()

2015-01-12 Thread H Hartley Sweeten
igned-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/dt282x.c | 84 - 1 file changed, 40 insertions(+), 44 deletions(-) diff --git a/drivers/staging/comedi/drivers/dt282x.c b/drivers/staging/comedi/drivers/dt2

[PATCH 04/37] staging: comedi: das1800: introduce struct das1800_dma_desc

2015-01-12 Thread H Hartley Sweeten
For aesthetics, introduce a struct to hold the DMA descriptor data. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das1800.c | 145 +++ 1 file changed, 70 insertions(+), 75 deletions(-) diff --git a

[PATCH 35/37] staging: comedi: das16 introduce das16_alloc_dma()

2015-01-12 Thread H Hartley Sweeten
DMA is optional with this driver. Introduce a helper function to request the DMA channel and allocate the buffers. Don't fail the driver attach if the user passed an invalid DMA channel or the channel cannot be requested. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Ha

[PATCH 34/37] staging: comedi: das16: introduce struct das16_dma_desc

2015-01-12 Thread H Hartley Sweeten
For aesthetics, introduce a struct to hold the DMA descriptor data. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das16.c | 48 ++ 1 file changed, 26 insertions(+), 22 deletions(-) diff --git a

[PATCH 21/37] staging: comedi: pcl818: fix pcl818_handle_dma() for short DMA transaction

2015-01-12 Thread H Hartley Sweeten
escriptor and initialize it with the actual size of the DMA transfer. Use that in pcl818_handle_dma() to return the proper number of samples. Use the comedi_bytes_to_samples() helper to convert the byte size to comedi samples. Remove the unnecessary 'bufptr' local variable. Signed-off-by

[PATCH 20/37] staging: comedi: pcl818: remove VIRT_TO_BUS dependancy

2015-01-12 Thread H Hartley Sweeten
Use dma_{alloc,free}_coherent() to allocate and free the DMA buffers. This removes the dependancy on VIRT_TO_BUS. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/Kconfig | 2 +- drivers/staging/comedi/drivers/pcl818.c | 25

[PATCH 37/37] staging: comedi: das16: board is not a PCI device

2015-01-12 Thread H Hartley Sweeten
The DAS16 board is an ISA device not a PCI device. For aesthetics, use dma_{alloc,free}_coherent() to allocate and free the DMA buffers instead of the PCI versions. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das16.c | 9

[PATCH 29/37] staging: comedi: pcl812: introduce struct pcl812_dma_desc

2015-01-12 Thread H Hartley Sweeten
For aesthetics, introduce a struct to hold the DMA descriptor data. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl812.c | 100 1 file changed, 50 insertions(+), 50 deletions(-) diff --git a

[PATCH 06/37] staging: comedi: das1800: remove VIRT_TO_BUS dependancy

2015-01-12 Thread H Hartley Sweeten
Use dma_{alloc,free}_coherent() to allocate and free the DMA buffers. This removes the dependancy on VIRT_TO_BUS. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/Kconfig | 2 +- drivers/staging/comedi/drivers/das1800.c | 16

[PATCH 28/37] staging: comedi: pcl812: introduce pcl812_free_dma()

2015-01-12 Thread H Hartley Sweeten
For aesthetics, move the freeing of the DMA channel and the buffers to a helper function. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl812.c | 27 +-- 1 file changed, 17 insertions(+), 10 deletions

[PATCH 18/37] staging: comedi: pcl818: introduce pcl818_dma_free()

2015-01-12 Thread H Hartley Sweeten
For aesthetics, move the freeing of the DMA channel and the buffers to a helper function. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl818.c | 23 +-- 1 file changed, 17 insertions(+), 6 deletions(-) diff

[PATCH 07/37] staging: comedi: das1800: introduce das1800_free_dma()

2015-01-12 Thread H Hartley Sweeten
For aesthetics, introduce a helper function to free the DMA channels and allocated buffers. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das1800.c | 30 -- 1 file changed, 20 insertions(+), 10 deletions

[PATCH 16/37] staging: comedi: ni_labpc: remove VIRT_TO_BUS dependancy

2015-01-12 Thread H Hartley Sweeten
Use dma_{alloc,free}_coherent() to allocate and free the DMA buffers. This removes the dependancy on VIRT_TO_BUS. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/Kconfig | 2 +- drivers/staging/comedi/drivers/ni_labpc.h

[PATCH 14/37] staging: comedi: ni_labpc: introduce struct labpc_dma_desc

2015-01-12 Thread H Hartley Sweeten
For aesthetics, introduce a struct to hold the DMA descriptor data. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_labpc.h| 15 -- drivers/staging/comedi/drivers/ni_labpc_isadma.c | 58 drivers

[PATCH 10/37] staging: comedi: ni_at_a2150: introduce a2150_alloc_irq_dma()

2015-01-12 Thread H Hartley Sweeten
From: H Hartley Sweeten This driver requires an IRQ and DMA in order to support async commands. For aesthetics, introduce a helper function to request the IRQ and DMA channels and allocate the DMA buffer. Since the async command support is optional, make the helper function handle any request

[PATCH 26/37] staging: comedi: pcl816: fix short DMA transactions

2015-01-12 Thread H Hartley Sweeten
errupt and ai subdevice (*poll) function to return the proper number of samples. Use the comedi_bytes_to_samples() helper to convert the byte size to comedi samples in the interrupt handler. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/

[PATCH 07/25] staging: comedi: das1800: pass dma descriptor to das1800_flush_dma_channel()

2015-01-13 Thread H Hartley Sweeten
Instead of passing the dma descriptor 'chan' and 'virt_addr' just pass the dma descriptor. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das1800.c | 18 +- 1 file changed, 9 insertions(+), 9 deleti

[PATCH 11/25] staging: comedi: das16: move dma transfer 'size' to dma descriptor

2015-01-13 Thread H Hartley Sweeten
For asethetics, move the variable that holds the dma transfer 'size' into the dma descriptor. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das16.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) di

[PATCH 10/25] staging: comedi: das1800: introduce das1800_isadma_disable()

2015-01-13 Thread H Hartley Sweeten
Introduce a helper function to disable and the ISA DMA controller and return the residue as described in Documentation/DMA-ISA-LPC.txt. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das1800.c | 40 ++-- 1

[PATCH 13/25] staging: comedi: das16: introduce das16_isadma_disable()

2015-01-13 Thread H Hartley Sweeten
Introduce a helper function to disable and the ISA DMA controller and return the residue as described in Documentation/DMA-ISA-LPC.txt. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das16.c | 33 - 1

[PATCH 21/25] staging: comedi: ni_labpc_isadma: tidy up labpc_drain_dma()

2015-01-13 Thread H Hartley Sweeten
Tidy up the code that determines the number of samples to read for the current DMA transfer and how many samples are needed for the next DMA, Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_labpc_isadma.c | 48

[PATCH 00/25] staging: comedi: tidy up ISA DMA programming

2015-01-13 Thread H Hartley Sweeten
Tidy up the ISA DMA programming in all the comedi legacy drivers to follow the programming sequence described in Documentation/DMA-ISA-LPC.txt. This series applies after: "[PATCH 00/37] staging: comedi: tidy up legacy DMA drivers" H Hartley Sweeten (25): staging: comedi: pcl818:

[PATCH 18/25] staging: comedi: ni_labpc_isadma: remove hard coded samples size

2015-01-13 Thread H Hartley Sweeten
Use the comedi_bytes_per_sample() helper and remove the hard coded sample size. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_labpc_isadma.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers

[PATCH 17/25] staging: comedi: ni_at_a2150: introduce a2150_isadma_disable()

2015-01-13 Thread H Hartley Sweeten
Introduce a helper function to disable and the ISA DMA controller and return the residue as described in Documentation/DMA-ISA-LPC.txt. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_at_a2150.c | 42 +++- 1

[PATCH 22/25] staging: comedi: ni_labpc_isadma: move dma programming out of labpc_drain_dma()

2015-01-13 Thread H Hartley Sweeten
ize != 0) before programming it to avoid enabling the DMA at the end of a stop_src == TRIG_COUNT command. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_labpc_isadma.c | 18 +- 1 file changed, 9 insertions(+), 9 deleti

[PATCH 24/25] staging: comedi: das1800: remove hard coded 'sample_size'

2015-01-13 Thread H Hartley Sweeten
they have namespace associated with the driver. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das1800.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers/staging/comedi/drivers/das1800.c b

[PATCH 05/25] staging: comedi: dt282x: introduce dt282x_isadma_program()

2015-01-13 Thread H Hartley Sweeten
Introduce a helper function to program the ISA DMA controller. Program the ISA DMA as described in Documentation/DMA-ISA-LPC.txt. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/dt282x.c | 36 - 1 file

[PATCH 04/25] staging: comedi: pcl816: introduce pcl816_isadma_disable()

2015-01-13 Thread H Hartley Sweeten
According to Documentation/DMA-ISA-LPC.txt, the DMA lock needs to be claimed before using any of the ISA DMA routines. Introduce a helper function to disable the ISA DMA controller and add the necessary locking calls. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman

[PATCH 25/25] staging: comedi: das1800: tidy up das1800_ai_transfer_size()

2015-01-13 Thread H Hartley Sweeten
oid any possible integer overflow issues. Use the comedi_nsamples_left() helper to limit the samples when cmd->stop_src is TRIG_COUNT. Use comedi_samples_to_bytes() to return the final DMA size in bytes. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- dr

[PATCH 03/25] staging: comedi: pcl816: introduce pcl816_isadma_program()

2015-01-13 Thread H Hartley Sweeten
Introduce a helper function to program the ISA DMA controller. Program the ISA DMA as described in Documentation/DMA-ISA-LPC.txt. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl816.c | 33 ++--- 1 file

[PATCH 23/25] staging: comedi: ni_labpc_isadma: introduce labpc_isadma_program()

2015-01-13 Thread H Hartley Sweeten
Introduce a helper function to program the ISA DMA controller. Program the ISA DMA as described in Documentation/DMA-ISA-LPC.txt. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_labpc_isadma.c | 37 1 file

[PATCH 14/25] staging: comedi: pcl812: introduce pcl812_isadma_program()

2015-01-13 Thread H Hartley Sweeten
Introduce a helper function to program the ISA DMA controller. Program the ISA DMA as described in Documentation/DMA-ISA-LPC.txt. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl812.c | 49 + 1 file

[PATCH 16/25] staging: comedi: ni_at_a2150: introduce a2150_isadma_program()

2015-01-13 Thread H Hartley Sweeten
Introduce a helper function to program the ISA DMA controller. Program the ISA DMA as described in Documentation/DMA-ISA-LPC.txt. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_at_a2150.c | 36 1 file

[PATCH 01/25] staging: comedi: pcl818: introduce pcl818_isadma_program()

2015-01-13 Thread H Hartley Sweeten
Introduce a helper function to program the ISA DMA controller. Program the ISA DMA as described in Documentation/DMA-ISA-LPC.txt. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl818.c | 33 ++--- 1 file

[PATCH 15/25] staging: comedi: pcl812: introduce pcl812_isadma_disable()

2015-01-13 Thread H Hartley Sweeten
According to Documentation/DMA-ISA-LPC.txt, the DMA lock needs to be claimed before using any of the ISA DMA routines. Introduce a helper function to disable the ISA DMA controller and add the necessary locking calls. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman

[PATCH 12/25] staging: comedi: das16: introduce das16_isadma_program()

2015-01-13 Thread H Hartley Sweeten
Introduce a helper function to program the ISA DMA controller. Program the ISA DMA as described in Documentation/DMA-ISA-LPC.txt. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das16.c | 35 ++ 1 file

[PATCH 19/25] staging: comedi: ni_labpc_isadma: convert 'dma_buffer_size' to a define

2015-01-13 Thread H Hartley Sweeten
For aesthetics, convert this statis const global variable to a define. Cleanup the maximum 'size' calc in labpc_suggest_transfer_size(). The modulo operation will always result in '0'. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/st

[PATCH 02/25] staging: comedi: pcl818: introduce pcl818_isadma_disable()

2015-01-13 Thread H Hartley Sweeten
According to Documentation/DMA-ISA-LPC.txt, the DMA lock needs to be claimed before using any of the ISA DMA routines. Introduce a helper function to disable the ISA DMA controller and add the necessary locking calls. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman

[PATCH 09/25] staging: comedi: das1800: introduce das1800_isadma_program()

2015-01-13 Thread H Hartley Sweeten
Introduce a helper function to program the ISA DMA controller. Program the ISA DMA as described in Documentation/DMA-ISA-LPC.txt. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das1800.c | 48 ++-- 1 file

[PATCH 20/25] staging: comedi: ni_labpc_isadma: introduce labpc_isadma_disable()

2015-01-13 Thread H Hartley Sweeten
Introduce a helper function to disable and the ISA DMA controller and return the residue as described in Documentation/DMA-ISA-LPC.txt. The DMA will always be disabled when labpc_setup_dma() is called. Remove the unnecessary disable in that function. Signed-off-by: H Hartley Sweeten Cc: Ian

[PATCH 08/25] staging: comedi: das1800: move dma transfer 'size' to dma descriptor

2015-01-13 Thread H Hartley Sweeten
For asethetics, move the variable that holds the dma transfer 'size' into the dma descriptor. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das1800.c | 17 ++--- 1 file changed, 10 insertions(+), 7 deletion

[PATCH 06/25] staging: comedi: dt282x: introduce dt282x_isadma_disable()

2015-01-13 Thread H Hartley Sweeten
According to Documentation/DMA-ISA-LPC.txt, the DMA lock needs to be claimed before using any of the ISA DMA routines. Introduce a helper function to disable the ISA DMA controller and add the necessary locking calls. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman

[PATCH 01/15] staging: comedi: comedi_isadma: introduce helper module for ISA DMA

2015-01-14 Thread H Hartley Sweeten
-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/Kconfig | 3 + drivers/staging/comedi/drivers/Makefile| 1 + drivers/staging/comedi/drivers/comedi_isadma.c | 262 + drivers/staging/comedi/drivers/comedi_isad

[PATCH 08/15] staging: comedi: ni_at_a2150: remove depends on ISA_DMA_API limitation

2015-01-14 Thread H Hartley Sweeten
Use the new comedi_isadma module to provide the ISA DMA support. This removes all the ISA_DMA_API code from this driver and allows the driver to be used on platforms that don't support the ISA_DMA_API. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/st

<    2   3   4   5   6   7   8   9   10   11   >