Re: [PATCH 1/2] Staging: comedi: addi-data: fix lines that are over 80 characters

2014-02-28 Thread Chase Southwood
On Friday, February 28, 2014 1:57 AM, Dan Carpenter dan.carpen...@oracle.com wrote: On Fri, Feb 28, 2014 at 10:52:32AM +0300, Dan Carpenter wrote: On Fri, Feb 28, 2014 at 01:31:20AM -0600, Chase Southwood wrote: hwdrv_apci1564.c had numerous lines over the column limit.  This patch splits

Re: [PATCH v5 0/2] hyperv-fb: add support for generation 2 virtual machines

2014-02-28 Thread Tomi Valkeinen
On 26/02/14 12:51, Gerd Hoffmann wrote: Hi, This patch series adds support for uefi-based gen2 virtual machines to the hyperv-fb driver. It depends on a few vmbus changes which are staged in Greg's char-misc tree (and linux-next). Depends how? Patches that depend on other patches should

Re: [PATCH v3 1/4] vmbus: add missing breaks

2014-02-28 Thread Tomi Valkeinen
On 24/02/14 15:17, Gerd Hoffmann wrote: Signed-off-by: Gerd Hoffmann kra...@redhat.com --- drivers/hv/vmbus_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c index b37c91b..2352ae48 100644 --- a/drivers/hv/vmbus_drv.c +++

[PATCH 1/2 v2] Staging: comedi: fix lines that are over 80 characters

2014-02-28 Thread Chase Southwood
This patch introduces a simple helper function, outl_1564_timer(), to allow several lines which violate the character limit to be shortened. A handful of other lines that are too long are appropriately split as well. Cc: Dan Carpenter dan.carpen...@oracle.com Signed-off-by: Chase Southwood

[PATCH 2/2 v2] Staging: comedi: addi-data: remove unnecessary variable initializations in hwdrv_apci1564.c

2014-02-28 Thread Chase Southwood
A handful of variables here were being initialized to 0 upon declaration, however they are always then set to another value before their first use, so initialization here is useless and we can remove it. Signed-off-by: Chase Southwood chase.southw...@yahoo.com --- 2: no content change; redone and

Re: [PATCH 1/2 v2] Staging: comedi: fix lines that are over 80 characters

2014-02-28 Thread Dan Carpenter
On Fri, Feb 28, 2014 at 03:15:45AM -0600, Chase Southwood wrote: This patch introduces a simple helper function, outl_1564_timer(), to allow several lines which violate the character limit to be shortened. A handful of other lines that are too long are appropriately split as well. Cc: Dan

Re: [PATCH 1/2 v2] Staging: comedi: fix lines that are over 80 characters

2014-02-28 Thread Chase Southwood
On Friday, February 28, 2014 3:42 AM, Dan Carpenter dan.carpen...@oracle.com wrote: On Fri, Feb 28, 2014 at 03:15:45AM -0600, Chase Southwood wrote: This patch introduces a simple helper function, outl_1564_timer(), to allow several lines which violate the character limit to be shortened. A

Re: [PATCH v5 0/2] hyperv-fb: add support for generation 2 virtual machines

2014-02-28 Thread Gerd Hoffmann
On Fr, 2014-02-28 at 11:01 +0200, Tomi Valkeinen wrote: On 26/02/14 12:51, Gerd Hoffmann wrote: Hi, This patch series adds support for uefi-based gen2 virtual machines to the hyperv-fb driver. It depends on a few vmbus changes which are staged in Greg's char-misc tree (and

Re: [PATCH v3 1/4] vmbus: add missing breaks

2014-02-28 Thread Gerd Hoffmann
Why is this sent to fbdev list? Is this related to the hyperv-fb patches? Yes, the hyperv-fb patches depend on this one. Greg has picked it up meanwhile, that's why v4 + v5 of the patch series don't include it any more. cheers, Gerd ___ devel

Re: [PATCH] staging: dgap: Fix format string mismatch in downld.c

2014-02-28 Thread Mark Hounschell
On 02/28/2014 06:10 AM, Masanari Iida wrote: req_type and bdid in struct downldio are defined as unsigned int. So dlio.req_type and dlio.bdid have to be unsigned int,too. Signed-off-by: Masanari Iida standby2...@gmail.com --- drivers/staging/dgap/downld.c | 4 ++-- 1 file changed, 2

Re: [PATCH v2] staging: dgap: fix kernel oops on port open

2014-02-28 Thread Mark Hounschell
On 02/27/2014 04:52 PM, Dan Carpenter wrote: This isn't a real patch, and it deliberately doesn't compile, but it's sort of what the patch should look like. The first thing to do is to get rid of the stupid DGAP_UNLOCK() macro. Disabling IRQs more than once doesn't help anything and it doesn't

Re: [PATCH v2] staging: dgap: fix kernel oops on port open

2014-02-28 Thread Dan Carpenter
On Fri, Feb 28, 2014 at 08:56:37AM -0500, Mark Hounschell wrote: Thanks Dan. I see what should be done. I like and can work on this. But is it OK to save all the 80 char problems until the end of this next series or more likely a separate patch all together? What ever you want to do is ok. :P

[PATCH v5 1/2] imx-drm: ipu-dmfc: Remove unneeded 'dmfc' check

2014-02-28 Thread Fabio Estevam
From: Fabio Estevam fabio.este...@freescale.com Fix the following static checker warning: drivers/staging/imx-drm/ipu-v3/ipu-dmfc.c:164 ipu_dmfc_setup_channel() warn: variable dereferenced before check 'dmfc' (see line 157) As 'dmfc' could never be null, there is no need to do such check.

[PATCH v5 2/2] imx-drm: imx-ldb: Use snprintf()

2014-02-28 Thread Fabio Estevam
From: Fabio Estevam fabio.este...@freescale.com Use snprintf() in order to fix the following static checker warning: drivers/staging/imx-drm/imx-ldb.c:340 imx_ldb_get_clk() error: format string overflow. buf_size: 16 length: 18 probably 18 is theory and not real life, but 16 is based on theory

Re: [PATCH v5 1/2] imx-drm: ipu-dmfc: Remove unneeded 'dmfc' check

2014-02-28 Thread Philipp Zabel
Hi Fabio, Am Freitag, den 28.02.2014, 11:39 -0300 schrieb Fabio Estevam: From: Fabio Estevam fabio.este...@freescale.com Fix the following static checker warning: drivers/staging/imx-drm/ipu-v3/ipu-dmfc.c:164 ipu_dmfc_setup_channel() warn: variable dereferenced before check 'dmfc' (see

Re: [PATCH v5 2/2] imx-drm: imx-ldb: Use snprintf()

2014-02-28 Thread Philipp Zabel
Am Freitag, den 28.02.2014, 11:39 -0300 schrieb Fabio Estevam: From: Fabio Estevam fabio.este...@freescale.com Use snprintf() in order to fix the following static checker warning: drivers/staging/imx-drm/imx-ldb.c:340 imx_ldb_get_clk() error: format string overflow. buf_size: 16 length:

Re: [PATCH] Staging: comedi: addi-data: remove unnecessary variable initializations in hwdrv_apci035.c

2014-02-28 Thread Ian Abbott
On 2014-02-28 07:30, Chase Southwood wrote: Nearly every variable in hwdrv_apci035.c is initialized to 0 when it is declared, and then set to some other value before ever being used. As such, we can remove all of these initializations. They are accomplishing nothing. Signed-off-by: Chase

[PATCH] Drivers:staging:ozwpan Fixed sparse context imbalance warning

2014-02-28 Thread Surendra Patil
Sparse warns about - drivers/staging/ozwpan/ozproto.c:797:6: warning: context imbalance in 'oz_polling_lock_bh' - wrong count at exit drivers/staging/ozwpan/ozproto.c:802:6: warning: context imbalance in 'oz_polling_unlock_bh' - unexpected unlock so added __acquires() and __releases().

Re: [PATCH] Drivers:staging:ozwpan Fixed sparse context imbalance warning

2014-02-28 Thread Greg KH
On Fri, Feb 28, 2014 at 08:57:02AM -0800, Surendra Patil wrote: Sparse warns about - drivers/staging/ozwpan/ozproto.c:797:6: warning: context imbalance in 'oz_polling_lock_bh' - wrong count at exit drivers/staging/ozwpan/ozproto.c:802:6: warning: context imbalance in 'oz_polling_unlock_bh'

Re: [PATCH] Staging: comedi: add timeouts to while loops in s626.c

2014-02-28 Thread Ian Abbott
On 2014-02-28 07:35, Chase Southwood wrote: Smatch located a handful of while loops testing readl calls in s626.c. Since these while loops depend on readl succeeding, it's safer to make sure they time out eventually. Signed-off-by: Chase Southwood chase.southw...@yahoo.com --- Ian and/or

[PATCH 05/08] staging: dgap: Fix include errs reported by checkpatch

2014-02-28 Thread Mark Hounschell
This patch fixes all include related errors in dgap.c as reported by checkpatch Signed-off-by: Mark Hounschell ma...@compro.net Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- drivers/staging/dgap/dgap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH 08/08] staging: dgap: Fix white space errors as reported by checkpatch

2014-02-28 Thread Mark Hounschell
This patch fixes white space errors in dgap.c as reported by checkpatch. It also changes unnecessary mutliple empty lines with a single empty line Signed-off-by: Mark Hounschell ma...@compro.net --- drivers/staging/dgap/dgap.c | 314 1 file changed,

[PATCH 04/08] staging: dgap: Fix foo* bar should be foo *bar as reported by checkpatch

2014-02-28 Thread Mark Hounschell
This patch fixes foo* bar should be foo *bar errors in dgap.c as reported by checkpatch Signed-off-by: Mark Hounschell ma...@compro.net Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- drivers/staging/dgap/dgap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH 07/08] staging:dgap: Fix externs should be avoided in .c files as reported by checkpatch

2014-02-28 Thread Mark Hounschell
This patch fixes externs should be avoided in .c files in dgap.c as reported by checkpatch Signed-off-by: Mark Hounschell ma...@compro.net --- drivers/staging/dgap/dgap.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/dgap/dgap.c

[PATCH 03/08] staging: dgap: Fix indent errs as reported by checkpatch

2014-02-28 Thread Mark Hounschell
This patch fixes all indent errs in dgap.c as reported by checkpatch Signed-off-by: Mark Hounschell ma...@compro.net Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- drivers/staging/dgap/dgap.c | 148 +++- 1 file changed, 77 insertions(+), 71

[PATCH 00/08] staging: dgap: Digi International dgap driver

2014-02-28 Thread Mark Hounschell
This patch series begins the process of cleaning up dgap.c and dgap.h using the checkpath tool. One or more of these patches will show checkpatch errors that will be cleaned up in following patches -- 1.8.1.4 ___ devel mailing list

[PATCH 02/08] staging:dgap: Fix all return statments in err as reported by checkpatch

2014-02-28 Thread Mark Hounschell
Fix all return staments in err as reported by checkpatch Signed-off-by: Mark Hounschell ma...@compro.net Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- drivers/staging/dgap/dgap.c | 672 ++-- 1 file changed, 336 insertions(+), 336 deletions(-) diff

[PATCH 06/08] staging: dgap: Fix bracing errors reported by checkpatch

2014-02-28 Thread Mark Hounschell
This patch fixes bracing errors in dgap.c as reported by checkpatch Signed-off-by: Mark Hounschell ma...@compro.net --- drivers/staging/dgap/dgap.c | 338 1 file changed, 121 insertions(+), 217 deletions(-) diff --git a/drivers/staging/dgap/dgap.c

Re: status of sbe-2t3e3 staging driver?

2014-02-28 Thread Greg KH
On Mon, Jan 13, 2014 at 03:05:29PM +0100, Krzysztof Halasa wrote: Hi Greg, Greg KH gre...@linuxfoundation.org writes: It's been pointed out to me that there hasn't been any forward development on the sbe-2t3e3 in almost a year now. Is development dead, and I should delete it, or are

Re: [PATCH 2/3] imx-drm: ipu-dc: Use usleep_range instead of msleep

2014-02-28 Thread Russell King - ARM Linux
On Tue, Feb 25, 2014 at 12:43:42PM +0100, Philipp Zabel wrote: Since msleep(2) can sleep up to 20ms anyway, make this explicit by using usleep_range(2000, 2). Signed-off-by: Philipp Zabel p.za...@pengutronix.de --- drivers/staging/imx-drm/ipu-v3/ipu-dc.c | 2 +- 1 file changed, 1

[PATCH 09/11] staging: dgap: fix do not use assignment in if condition as reported by checkpatch

2014-02-28 Thread Mark Hounschell
This patch fixes do not use assignment in if condition errors reported by checkpatch Signed-off-by: Mark Hounschell ma...@compro.net Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- drivers/staging/dgap/dgap.c | 75 ++--- 1 file changed, 50

[PATCH 10/11] staging: dgap: Fix printk related errors as reported by checkpatch

2014-02-28 Thread Mark Hounschell
This patch fixes some printk related errors report by checkpatch. It also removes more Digi debug/trace code left behind from patch #1. Signed-off-by: Mark Hounschell ma...@compro.net Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- drivers/staging/dgap/dgap.c | 38

[PATCH 11/11] staging: dgap: Fix various previously missed checkpatch errors

2014-02-28 Thread Mark Hounschell
This patch fixes various small checkpatch errors I missed in patches 01-10. Signed-off-by: Mark Hounschell ma...@compro.net Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- drivers/staging/dgap/dgap.c | 16 ++-- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git

Re: [PATCH 01/08] staging:dgap: remove digi debug and tracing code

2014-02-28 Thread Dan Carpenter
I have some comments on this patch. It's all minor stuff you can fix in a later patch. Don't redo this one. Staging has more relaxed standards on whitespace than mm/. We don't want to slow you down by making you redo stuff and I don't want to review it more than once if I can avoid that. On

Re: [PATCH 02/08] staging:dgap: Fix all return statments in err as reported by checkpatch

2014-02-28 Thread Dan Carpenter
Reviewed-by: Dan Carpenter dan.carpen...@oracle.com Btw, for later work, this driver returns -EFAULT a lot when some times it should be returning -EINVAL or something. Also the DGAP_VERIFY_BOARD() macro is disgusting. regards, dan carpenter ___ devel

Re: [PATCH 3/5] Staging: cxt1e1: Fix line length over 80 characters in hwprobe.c

2014-02-28 Thread Greg KH
On Fri, Feb 28, 2014 at 04:33:49PM +0900, DaeSeok Youn wrote: OK. sorry. I will send again. Please resend all 3 of these, I've applied the first 2. thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org

Re: [PATCH] staging: sb105x: b_pci_mp.c: fix for non-member access

2014-02-28 Thread Greg KH
On Fri, Feb 28, 2014 at 04:21:03AM +0200, Kumar Amit Mehta wrote: 'struct tty_struct’ has no member named ‘low_latency’ This driver is marked BROKEN, and can't even compile, how did you test this patch? ___ devel mailing list

Re: [PATCH 10/11] staging: dgap: Fix printk related errors as reported by checkpatch

2014-02-28 Thread Dan Carpenter
Please redo this one. On Fri, Feb 28, 2014 at 03:48:58PM -0500, Mark Hounschell wrote: This patch fixes some printk related errors report by checkpatch. It also removes more Digi debug/trace code left behind from patch #1. These are two separate patches. The debug code is dead code yes?

Re: [PATCH 1/2 v2] Staging: comedi: fix lines that are over 80 characters

2014-02-28 Thread Greg KH
On Fri, Feb 28, 2014 at 03:15:45AM -0600, Chase Southwood wrote: This patch introduces a simple helper function, outl_1564_timer(), to allow several lines which violate the character limit to be shortened. A handful of other lines that are too long are appropriately split as well. Cc: Dan

Re: [PATCH 11/11] staging: dgap: Fix various previously missed checkpatch errors

2014-02-28 Thread Dan Carpenter
Please redo this one. On Fri, Feb 28, 2014 at 03:49:09PM -0500, Mark Hounschell wrote: This patch fixes various small checkpatch errors I missed in patches 01-10. Signed-off-by: Mark Hounschell ma...@compro.net Cc: Greg Kroah-Hartman gre...@linuxfoundation.org ---

Re: [PATCH] staging: sb105x: b_pci_mp.c: fix for non-member access

2014-02-28 Thread Greg KH
On Fri, Feb 28, 2014 at 02:20:40PM -0800, Greg KH wrote: On Fri, Feb 28, 2014 at 04:21:03AM +0200, Kumar Amit Mehta wrote: 'struct tty_struct’ has no member named ‘low_latency’ This driver is marked BROKEN, and can't even compile, how did you test this patch? Don't worry about it anymore,

Re: [PATCH 1/3] staging/usbip: add uapi header to export usbip kernel interfaces

2014-02-28 Thread Shuah Khan
On 02/28/2014 03:15 PM, Greg KH wrote: On Thu, Feb 27, 2014 at 05:27:25PM -0700, Shuah Khan wrote: usbip userspace has duplicated enum definition to report usbip device status maintained by the kernel. Adding an usbip uapi header file will define the kernel - userspace interface for this device

Re: [PATCH 07/08] staging:dgap: Fix externs should be avoided in .c files as reported by checkpatch

2014-02-28 Thread Greg KH
On Fri, Feb 28, 2014 at 12:42:14PM -0500, Mark Hounschell wrote: This patch fixes externs should be avoided in .c files in dgap.c as reported by checkpatch Signed-off-by: Mark Hounschell ma...@compro.net --- drivers/staging/dgap/dgap.c | 8 1 file changed, 4 insertions(+), 4

[PATCH 25/66] staging: comedi: pcl812: remove spurious interrupt noise

2014-02-28 Thread H Hartley Sweeten
Because this driver is manually attached, the spurious interrupt check in the interrupt handler should never happen. The interrupt is only hooked up during the attach and it's released during the detach. Leave the check but remove the noise. Also make sure to clear the interrupt request in the

[PATCH 18/66] staging: comedi: pcl818: fix PCL818_FI_DATAHI

2014-02-28 Thread H Hartley Sweeten
The A/D FIFO uses two registers to get each analog data sample. PCL818_FI_DATALO is the LSB of the data and PCL818_FI_DATAHI is the MSB of the data. The current define for PCL818_FI_DATAHI is incorrect and results in the LSB getting read twice. Signed-off-by: H Hartley Sweeten

[PATCH 01/66] staging: comedi: pcl816: remove pcl816_check()

2014-02-28 Thread H Hartley Sweeten
This function is a _very_ simplified probe that tried to verify that the driver is being attached to a PCL-816 compatible board. The function simply writes some values to specific registers then reads back the values to see if they are the same. It's possible that the user could try to attach

[PATCH 08/66] staging: comedi: pcl816: factor out dma setup to helper functions

2014-02-28 Thread H Hartley Sweeten
To assist in cleaning up the the rest of the driver, factor the initial dma setup and the next dma buffer setup into helper functions. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org ---

[PATCH 14/66] staging: comedi: pcl818: interrupt handlers should not busywait

2014-02-28 Thread H Hartley Sweeten
The interrupt is only generated by the hardware at the completion of an A/D conversion. Because of this the sanity check to make sure that the A/D conversion is complete and data is available is probably unnecessary but it doesn't hurt anything. The busywait loop is a different issue. Interrupt

[PATCH 10/66] staging: comedi: pcl812: remove 'ai_data_len' from private data

2014-02-28 Thread H Hartley Sweeten
This member of the private data is only used in the initial dma setup. Refactor that code to not need it and remove the member. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org ---

[PATCH 16/66] staging: comedi: pcl816: factor out the common next ai chan code

2014-02-28 Thread H Hartley Sweeten
The DMA and EOC interrupt handlers all have common code that bumps the counters in the private data that keep track of what channel is being sampled next and when all the data has been sampled. Factor this common code into a helper function. Don't clear the events in the driver. The comedi core

[PATCH 37/66] staging: comedi: pcl812: tidy up the analog output subdevice

2014-02-28 Thread H Hartley Sweeten
For aesthetics, tidy up the analog output subdevice code. Change the regsiter map defines to simplify the code. Move the analog subdevice support functions out of the analog input support functions. Tidy them up a bit during the move. Add some whitespace to the subdevice init. Signed-off-by: H

[PATCH 29/66] staging: comedi: pcl818: remove 'ai_mode' from private data

2014-02-28 Thread H Hartley Sweeten
This member of the private data is not needed. We can determine the interrupt mode based on the 'dma' and 'usefifo' members. Refactor the interrupt handler and the (*cancel) function to not use the 'ai_mode' and remove the setting of this member in the (*do_cmd) heler functions. Signed-off-by: H

[PATCH 00/66] staging: comedi: clenaup pcl812/816/818 drivers part 2

2014-02-28 Thread H Hartley Sweeten
This series continues the cleanup of the pcl812/816/818 drivers. H Hartley Sweeten (66): staging: comedi: pcl816: remove pcl816_check() staging: comedi: pcl818: remove pcl818_check() staging: comedi: pcl818: fix board resource region request staging: comedi: pcl812: remove

[PATCH 05/66] staging: comedi: pcl816: remove 'ai_neverending' from private data

2014-02-28 Thread H Hartley Sweeten
This member of the private data is not needed. We can check the stop_src to determine this information: ai_neverending - cmd-stop_src == TRIG_NONE !ai_neverending - cmd-stop_src == TRIG_COUNT Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc:

[PATCH 27/66] staging: comedi: pcl818: exit interrupt quick when there is nothing to do

2014-02-28 Thread H Hartley Sweeten
If an async ai command is not running or the ai_mode is 0 the interrupt routine doesn't do anything other than spew some noise and clear the interrupt request in the hardware. Because this driver is manually attached, the premature interrupt check in the interrupt handler should never happen. The

[PATCH 04/66] staging: comedi: pcl812: remove 'ai_neverending' from private data

2014-02-28 Thread H Hartley Sweeten
This member of the private data is not needed. We can check the stop_src to determine this information: ai_neverending - cmd-stop_src == TRIG_NONE !ai_neverending - cmd-stop_src == TRIG_COUNT Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc:

[PATCH 22/66] staging: comedi: pcl818: reduce indent level in pcl818_ai_cancel()

2014-02-28 Thread H Hartley Sweeten
If an async command is not running the (*cancel) function doesn't do anything. Exit the function early if this is the case. This allows reducing the indent level in the rest of the function. Also, move the setting of the 'irq_was_now_closed' to the only place wher it actually gets left set to 1

[PATCH 26/66] staging: comedi: pcl816: exit interrupt quick when there is nothing to do

2014-02-28 Thread H Hartley Sweeten
If an async ai command is not running or the int816_mode is 0 the interrupt routine doesn't do anything other than spew some noise and clear the interrupt request in the hardware. Because this driver is manually attached, the premature interrupt check in the interrupt handler should never happen.

[PATCH 19/66] staging: comedi: pcl818: introduce pcl818_ai_get_fifo_sample()

2014-02-28 Thread H Hartley Sweeten
To clarify the code, introduce a helper function to read the analog input data sample from the FIFO and optionally return the channel that the sample was for. The channel is used to check for dropped samples. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott

[PATCH 43/66] staging: comedi: pcl816: introduce pcl816_ai_clear_eoc()

2014-02-28 Thread H Hartley Sweeten
Introduce a helper function to clear the end-of-conversion flag. This flag is set when an analog input conversion is finished and the hardware generates an interrupt request. Writing any value to the register resets the flag and re-enables the interrupt. Move the call in pcl816_ai_cancel() so

[PATCH 06/66] staging: comedi: pcl818: remove 'neverending_ai' from private data

2014-02-28 Thread H Hartley Sweeten
This member of the private data is not needed. We can check the stop_src to determine this information: neverending_ai - cmd-stop_src == TRIG_NONE !neverending_ai - cmd-stop_src == TRIG_COUNT Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc:

[PATCH 46/66] staging: comedi: pcl816: introduce pcl816_ai_soft_trig()

2014-02-28 Thread H Hartley Sweeten
Introduce a helper function to start a software triggered analog input conversion. 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/pcl816.c | 11 --- 1 file

[PATCH 39/66] staging: comedi: pcl818: tidy up the analog input (*insn_read)

2014-02-28 Thread H Hartley Sweeten
For aesthetics, move this function out of the async command support code. For safety, the INT request (end-of-conversion flag) should be cleared before doing each conversion and after the final data sample is read. This driver already clears the flag before starting a conversion but it does not

[PATCH 28/66] staging: comedi: pcl816: remove 'int816_mode' from private data

2014-02-28 Thread H Hartley Sweeten
This member of the private data is not needed. We can determine the inerrupt 'mode' based on the 'dma' member. Refactor the interrupt handler and the (*cancel) function to not use the 'int816_mode' and remove the setting of this member in the (*do_cmd) heler function. Signed-off-by: H Hartley

[PATCH 31/66] staging: comedi: pcl816: consolidate the common interrupt code

2014-02-28 Thread H Hartley Sweeten
The DMA and EOC interrupt handler functions, that are called by the _real_ interrupt function, always return IRQ_HANDLED. Change the return type for these functions to void and move the final return to the real interrupt function. Change the parameters to the handler functions to the

[PATCH 09/66] staging: comedi: pcl818: factor out dma setup to helper functions

2014-02-28 Thread H Hartley Sweeten
To assist in cleaning up the the rest of the driver, factor the initial dma setup and the next dma buffer setup into helper functions. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org ---

[PATCH 44/66] staging: comedi: pcl818: introduce pcl818_ai_clear_eoc()

2014-02-28 Thread H Hartley Sweeten
Introduce a helper function to clear the end-of-conversion flag. This flag is set when an analog input conversion is finished and the hardware generates an interrupt request. Writing any value to the register resets the flag and re-enables the interrupt. Remove the clearing of the flag in

[PATCH 48/66] staging: comedi: pcl812: tidy up analog input registers

2014-02-28 Thread H Hartley Sweeten
For aesthetics, rename the analog input register defines and convert the offsets to hex. 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/pcl812.c | 15

[PATCH 34/66] staging: comedi: pcl816: add support for digital subdevices

2014-02-28 Thread H Hartley Sweeten
The PCL-816 boards have 16 digital inputs and 16 digtial outputs. Add the subdevice support for these channels. Allocate additional subdevice space to the analog outputs. This code is not currently in the driver so mark the subdevice as COMEDI_SUBD_UNUSED. Signed-off-by: H Hartley Sweeten

[PATCH 51/66] staging: comedi: pcl818: define the status register bits

2014-02-28 Thread H Hartley Sweeten
Define the bits in the status register and remove the magic values. Writing any value to the status register clears any pending interrupt. For aesthetics, rename the status register and remove the clrint register. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott

[PATCH 40/66] staging: comedi: pcl816: tidy up the analog input (*insn_read)

2014-02-28 Thread H Hartley Sweeten
For aesthetics, move this function out of the async command support code. For safety, the INT request (end-of-conversion flag) should be cleared before doing each conversion and after the final data sample is read. This driver does that but it's a bit awkward with the initial clear being outside

[PATCH 45/66] staging: comedi: pcl818: introduce pcl818_ai_soft_trig()

2014-02-28 Thread H Hartley Sweeten
Introduce a helper function to start a software triggered analog input conversion. 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/pcl818.c | 10 +++--- 1 file

[PATCH 21/66] staging: comedi: pcl816: reduce indent level in pcl816_ai_cancel()

2014-02-28 Thread H Hartley Sweeten
If an async command is not running the (*cancel) function doesn't do anything. Exit the function early if this is the case. This allows reducing the indent level in the rest of the function. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg

[PATCH 24/66] staging: comedi: pcl818: fix (*cancel) when cmd-stop_src == TRIG_NONE

2014-02-28 Thread H Hartley Sweeten
When using DMA, the async command (*cancel) operation is delayed until the current DMA transfer is complete. When the DMA transfer finishes the interrupt routine detects this and calls the (*cancel) again which should then cancel the async command. The current logic does not work when

[PATCH 03/66] staging: comedi: pcl818: fix board resource region request

2014-02-28 Thread H Hartley Sweeten
Some of the PCL-818 compatible boards have a FIFO that can be used when running analog input async commands. This FIFO increased the resource range used by the driver. Request the correct resources used by the board even if the FIFO is not used. This prevents another driver from trying to use the

[PATCH 12/66] staging: comedi: pcl812: interrupt handlers should not busywait

2014-02-28 Thread H Hartley Sweeten
The interrupt is only generated by the hardware at the completion of an A/D conversion. Because of this the sanity check to make sure that the A/D conversion is complete and data is available is probably unnecessary but it doesn't hurt anything. The busywait loop is a different issue. Interrupt

[PATCH 57/66] staging: comedi: pcl812: define the mode register bits

2014-02-28 Thread H Hartley Sweeten
For aesthetics, rename this register. Define the bits in the register to remove the magic values. 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/pcl812.c | 30

[PATCH 36/66] staging: comedi: pcl816: move pcl816_reset()

2014-02-28 Thread H Hartley Sweeten
For aesthetics, move this function to follow the pcl812 and pcl818 drivers better. Remove the commented out cut-and-paste code from the pcl818 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 41/66] staging: comedi: pcl812: tidy up the analog input (*insn_read)

2014-02-28 Thread H Hartley Sweeten
For aesthetics, move this function out of the async command support code. For safety, the INT request (end-of-conversion flag) should be cleared before doing each conversion and after the final data sample is read. The driver currently does not do this. Refactor the function a bit so it's more

[PATCH 59/66] staging: comedi: pcl818: define the mode register bits

2014-02-28 Thread H Hartley Sweeten
Define the bits in the register to remove the magic values. Tidy up pcl818_ai_cancel(). The 0x73 mask of the value read from the control register will disable dma and interrupts but it does not change the trigger mode. So the software trigger following it might not work. Just disable the trigger

[PATCH 49/66] staging: comedi: pcl816: tidy up analog input registers

2014-02-28 Thread H Hartley Sweeten
For aesthetics, rename the analog input register defines and convert the offsets to hex. 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/pcl816.c | 13 +

[PATCH 50/66] staging: comedi: pcl818: tidy up analog input registers

2014-02-28 Thread H Hartley Sweeten
For aesthetics, rename the analog input register defines and convert the offsets to hex. 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/pcl818.c | 13 +

[PATCH 60/66] staging: comedi: pcl818: absorb pcl818_ai_mode13dma_int()

2014-02-28 Thread H Hartley Sweeten
Absorb this function into pcl818_ai_cmd_mode() and simplify the code. 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/pcl818.c | 53

[PATCH 17/66] staging: comedi: pcl818: factor out the common next ai chan code

2014-02-28 Thread H Hartley Sweeten
The DMA, FIFO, and EOC interrupt handlers all have common code that bumps the counters in the private data that keep track of what channel is being sampled next and when all the data has been sampled. Factor this common code into a helper function. Make sure the COMEDI_CB_BLOCK event is set when

[PATCH 20/66] staging: comedi: pcl818: factor out the common dropout detect code

2014-02-28 Thread H Hartley Sweeten
The DMA, FIFO, and EOC interrupt handlers all have common code that checks for channel dropout when running an async command. Factor this common code into a helper function. Only return the sample if the channel is valid. The EOC handler was previously returning the value then checking for

[PATCH 62/66] staging: comedi: pcl812: tidy up the remaining register defines

2014-02-28 Thread H Hartley Sweeten
The PCL812_CNTENABLE define is not used in this driver. Remove it. For aesthetics, rename the software trigger register. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org ---

[PATCH 23/66] staging: comedi: pcl816: clarify 'irq_was_now_closed' flag in private data

2014-02-28 Thread H Hartley Sweeten
This flag in the private data is set when an async command is canceled with the ai (*cancel) operation. Rename the flag to 'ai_cmd_canceled' to clarify its use. Move the check for the flag in the interrupt handler. If the async command was canceled there is no reason to handle the interrupt. Just

[PATCH 30/66] staging: comedi: pcl812: consolidate the common interrupt code

2014-02-28 Thread H Hartley Sweeten
The DMA and EOC interrupt handler functions, that are called by the _real_ interrupt function, always return IRQ_HANDLED. Change the return type for these functions to void and move the final return to the real interrupt function. Change the parameters to the handler functions to the

[PATCH 54/66] staging: comedi: pcl812: cleanup setup_range_channel()

2014-02-28 Thread H Hartley Sweeten
Move this function to remove the need for the forward declaration. Rename it so it has namespace associated with the driver. Remove the unnecessary comedi_subdevice parameter from the function. The hardware does not support analog input channel scanning so the mux and range need to be set before

[PATCH 32/66] staging: comedi: pcl818: consolidate the common interrupt code

2014-02-28 Thread H Hartley Sweeten
The DMA, FIFO, and EOC interrupt handler functions, that are called by the _real_ interrupt function, always return IRQ_HANDLED. Change the return type for these functions to void and move the final return to the real interrupt function. Change the parameters to the handler functions to the

[PATCH 07/66] staging: comedi: pcl812: factor out dma setup to helper functions

2014-02-28 Thread H Hartley Sweeten
To assist in cleaning up the the rest of the driver, factor the initial dma setup and the next dma buffer setup into helper functions. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org ---

[PATCH 42/66] staging: comedi: pcl812: introduce pcl812_ai_clear_eoc()

2014-02-28 Thread H Hartley Sweeten
Introduce a helper function to clear the end-of-conversion flag. This flag is set when an analog input conversion is finished and the hardware generates an interrupt request. Writing any value to the register resets the flag and re-enables the interrupt. Remove a redundant call in

[PATCH 33/66] staging: comedi: pcl812: tidy up the digital subdevices

2014-02-28 Thread H Hartley Sweeten
For aesthetics, tidy up the digtial subdevice code. rename the register map defines for the digital input and output ports. Move the two digital subdevice (*insn_bits) functions out of the analog support functions. Tidy them up a bit during the move. Add some whitespace to the subdevice init.

[PATCH 56/66] staging: comedi: pcl818: cleanup setup_channel_list()

2014-02-28 Thread H Hartley Sweeten
Move this function to remove the need for the forward declaration. Rename it so it has namespace associated with the driver. Remove the unnecessary comedi_subdevice parameter from the function. The hardware has per-channel programmable gain. This function first sets the range for each channel

[PATCH 58/66] staging: comedi: pcl816: define the mode register bits

2014-02-28 Thread H Hartley Sweeten
Define the bits in the register to remove the magic values. Fix pcl816_ai_cancel(). The 0x73 mask of the value read from the control register will not stop the A/D as indicated by the comment. This would just clear the DS1, POE, and EXT bits which would only disable the external trigger. Setting

[PATCH 52/66] staging: comedi: pcl816: define the status register bits

2014-02-28 Thread H Hartley Sweeten
Define the bits in the status register. 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/pcl816.c | 20 +--- 1 file changed, 13 insertions(+), 7

[PATCH 66/66] staging: comedi: pcl818: clarify pcl818_reset()

2014-02-28 Thread H Hartley Sweeten
Like done in the pcl812 driver, use the boardinfo to determine what should be reset. 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/pcl818.c | 31

[PATCH 53/66] staging: comedi: pcl812: define the status register bits

2014-02-28 Thread H Hartley Sweeten
Define the bits in the status register. Writing any value to the status register clears any pending interrupt. For aesthetics, rename the status register and remove the clrint register. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg

[PATCH 35/66] staging: comedi: pcl818: tidy up the digital subdevices

2014-02-28 Thread H Hartley Sweeten
For aesthetics, tidy up the digtial subdevice code. Rename the register map defines for the digital input and output ports. Move the two digital subdevice (*insn_bits) functions out of the analog support functions. Tidy them up a bit during the move. Signed-off-by: H Hartley Sweeten

[PATCH 61/66] staging: comedi: pcl818: cleanup ai_cmd()

2014-02-28 Thread H Hartley Sweeten
Rename this function so it has namespace associated with the driver. The cmd-scan_begin_src is always TRIG_FOLLOW and the only valid cmd-convert_src is TRIG_TIMER or TRIG_EXT so pcl818_ai_cmd_mode() is always called with a 'mode' of 1 or 3. The 'mode' actually indicates the trigger source.

  1   2   >