[PATCH 23/87] staging: comedi: pcl818: factor analog input range selection out of (*attach)

2014-02-17 Thread H Hartley Sweeten
The analog input subdevice range is setup in this driver based on a config option passed by the user. Factor the code that sets the range_table out of pcl818_attach() to clarify the (*attach). Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi

[PATCH 05/87] staging: comedi: pcl818: remove 0/NULL initialzation in boardinfo

2014-02-17 Thread H Hartley Sweeten
The unlisted members in the boardinfo declaration will default to 0/NULL. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl818.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/staging/comedi/drivers/pcl818.c b

[PATCH 34/87] staging: comedi: pcl816: remove 'n_aochan' from boardinfo

2014-02-17 Thread H Hartley Sweeten
This member of the boardinfo is the same for all board types. Remove this data from the boardinfo. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl816.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers

[PATCH 16/87] staging: comedi: pcl818: clarify dma channel request in pcl818_attach()

2014-02-17 Thread H Hartley Sweeten
All the board types that can do DMA can use DMA channels 3 or 1. Remove the 'DMAbits', which is a mask of the valid channels, from the boardinfo and replace it with a bit-field flag 'has_dma'. Refactor pcl818_attach() to use the new flag and remove the need for the goto. Sign

[PATCH 03/87] staging: comedi: pcl818: convert boardinfo declaration to C99 format

2014-02-17 Thread H Hartley Sweeten
To reduce editing errors and make the data more maintainable, convert the boardinfo declaration to C99 format. For aesthetics, move the declaration closer to the definition and remove the unnecessary comments in the definition. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah

[PATCH 01/87] staging: comedi: pcl812: convert boardinfo declaration to C99 format

2014-02-17 Thread H Hartley Sweeten
To reduce editing errors and make the data more maintainable, convert the boardinfo declaration to C99 format. For aesthetics, move the declaration closer to the definition and remove the unnecessary comments in the definition. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah

[PATCH 12/87] staging: comedi: pcl816: remove 'rangelist_ao' from boardinfo

2014-02-17 Thread H Hartley Sweeten
The 'rangelist_ao' is the same for all board types. Remove this data from the boardinfo. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl816.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drive

[PATCH 00/87] staging: comedi: cleanup pcl812/816/818 drivers

2014-02-17 Thread H Hartley Sweeten
These comedi drivers are all very similar so it made sense to clean them up together. This series removes a bunch of the cruft in the drivers and reduces the boardinfo and private data. H Hartley Sweeten (87): staging: comedi: pcl812: convert boardinfo declaration to C99 format staging

[PATCH 20/87] staging: comedi: pcl818: all board types have digital inputs and outputs

2014-02-17 Thread H Hartley Sweeten
All the board types have 16 digital inputs and 16 digital outputs. Remove the 'n_dichan' and 'n_dochan' members in the boardinfo. Refactor pcl818_attach() to always setup these subdevices. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- dr

[PATCH 02/87] staging: comedi: pcl816: convert boardinfo declaration to C99 format

2014-02-17 Thread H Hartley Sweeten
To reduce editing errors and make the data more maintainable, convert the boardinfo declaration to C99 format. For aesthetics, move the declaration closer to the definition and remove the unnecessary comments in the definition. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah

[PATCH 30/87] staging: comedi: pcl816: remove 'ao_chanlist' from boardinfo

2014-02-17 Thread H Hartley Sweeten
This member in the boardinfo is the same for all board types. Remove it. The comedi core will initalize the subdevice len_chanlist to 1 if it is not set by the driver so remove the unnecessary initialization. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers

[PATCH 04/87] staging: comedi: pcl812: remove 0/NULL initialzation in boardinfo

2014-02-17 Thread H Hartley Sweeten
The unlisted members in the boardinfo declaration will default to 0/NULL. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl812.c | 61 - 1 file changed, 61 deletions(-) diff --git a/drivers/staging

[PATCH 24/87] staging: comedi: pcl812: all board types have analog inputs

2014-02-17 Thread H Hartley Sweeten
All the boards supported by this driver have 16 or 32 analog input channels. Remove the unnecessary check in pcl812_attach() to reduce the indent level of the code. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl812.c | 104

[PATCH 25/87] staging: comedi: pcl816: all board types have 16 analog inputs

2014-02-17 Thread H Hartley Sweeten
All the boards supported by this driver have 16 analog input channels. Remove the 'n_aichan' member from the boardinfo and refactor pcl816_attach(). Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl

[PATCH 11/87] staging: comedi: pcl812: remove 'rangelist_ao' from boardinfo

2014-02-17 Thread H Hartley Sweeten
The 'rangelist_ao' is the same for all board types. Remove this data from the boardinfo. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl812.c | 16 +--- 1 file changed, 1 insertion(+), 15 deletions(-) di

[PATCH 63/87] staging: comedi: pcl812: don't calc the timer divisors twice

2014-02-17 Thread H Hartley Sweeten
The timer divisors are calculated in the (*do_cmdtest) before the (*do_cmd) is called by the comedi core. Save the values in the private data so they don't need to be recalced. Refactor pcl812_start_pacer() to use the values from the private data. Signed-off-by: H Hartley Sweeten Cc: Ian A

[PATCH 49/87] staging: comedi: pcl812: remove 'ai_n_chan' from private data

2014-02-17 Thread H Hartley Sweeten
This member of the private data is just a copy of the cmd->chanlist_len. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl812.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/drivers/stag

[PATCH 22/87] staging: comedi: pcl812: factor analog input range selection out of (*attach)

2014-02-17 Thread H Hartley Sweeten
The analog input subdevice range is setup in this driver based on a config option passed by the user. Factor the code that sets the range_table out of pcl812_attach() to clarify the (*attach). Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi

[PATCH 09/87] staging: comedi: pcl812: remove 'i8254_osc_base' from boardinfo

2014-02-17 Thread H Hartley Sweeten
The 'i8254_osc_base' is the same for all board types. Remove this data from the boardinfo. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl812.c | 19 ++- 1 file changed, 2 insertions(+), 17 deletions(-)

[PATCH 41/87] staging: comedi: pcl816: introduce pcl816_ai_get_sample()

2014-02-17 Thread H Hartley Sweeten
Introduce a helper function to read the 14/16-bit analog input data sample. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl816.c | 26 +++--- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a

[PATCH 57/87] staging: comedi: pcl816: remove 'last_int_sub' from private data

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

[PATCH 44/87] staging: comedi: pcl812: remove acl8216_ai_insn_read()

2014-02-17 Thread H Hartley Sweeten
Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl812.c | 32 +--- 1 file changed, 1 insertion(+), 31 deletions(-) diff --git a/drivers/staging/comedi/drivers/pcl812.c b/drivers/staging/comedi/drivers/pcl812.c index c61ec5f

[PATCH 69/87] staging: comedi: pcl818: remove analog output interrupt code

2014-02-17 Thread H Hartley Sweeten
The hardware does not have any analog output interrupt support. Remove the stubbed in code. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl818.c | 15 --- 1 file changed, 15 deletions(-) diff --git a/drivers/staging

[PATCH 26/87] staging: comedi: pcl818: all board types have analog inputs

2014-02-17 Thread H Hartley Sweeten
All the boards supported by this driver have 16 single-ended analog input channels. The boards can also be configued to give 8 differential inputs. Remove the 'n_aichan_se' and 'n_aichan_diff' members from the boardinfo and refactor pcl818_attach(). Signed-off-by: H Hart

[PATCH 13/87] staging: comedi: pcl818: remove 'rangelist_ao' from boardinfo

2014-02-17 Thread H Hartley Sweeten
The 'rangelist_ao' is the same for all board types. Remove this data from the boardinfo. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl818.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git

[PATCH 54/87] staging: comedi: pcl812: tidy up dma buffer allocation

2014-02-17 Thread H Hartley Sweeten
'hwdmasize' arrays in the private data with variables to save a bit of space. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl812.c | 63 ++--- 1 file changed, 27 insertions(+), 36 deletions(-)

[PATCH 74/87] staging: comedi: pcl812: convert private data flags to bit-fields

2014-02-17 Thread H Hartley Sweeten
Convert the flags in the private data to bit-fields to save a bit of space. Rename the CamelCase 'use_MPC' member. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl812.c | 16 1 file changed, 8 insert

[PATCH 17/87] staging: comedi: pcl812: rename 'haveMPC508' in boardinfo

2014-02-17 Thread H Hartley Sweeten
Rename this CamelCase member in the boardinfo and change it to a bit- field flag. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl812.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging

[PATCH 35/87] staging: comedi: pcl816: clarify irq request in pcl816_attach()

2014-02-17 Thread H Hartley Sweeten
All the board types can use IRQ 2-7 for async command support. Remove the 'IRQbits', which is a mask of the valid IRQs, from the boardinfo and refactor pcl816_attach(). Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pc

[PATCH 58/87] staging: comedi: pcl818: remove 'last_int_sub' from private data

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

[PATCH 45/87] staging: comedi: pcl812: remove 'valid' from private data

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

[PATCH 75/87] staging: comedi: pcl816: convert private data flags to bit-fields

2014-02-17 Thread H Hartley Sweeten
Convert the flags in the private data to bit-fields to save a bit of space. The 'irq_was_now_closed' member is actually a flag, devpriv->int816_mode will always be > 0 when it's used to set irq_was_now_closed in the cancel function. Signed-off-by: H Hartley Sweeten Cc:

[PATCH 65/87] staging: comedi: pcl818: don't calc the timer divisors twice

2014-02-17 Thread H Hartley Sweeten
need to be recalced. Refactor pcl818_start_pacer() to use the values from the private data. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl818.c | 37 +++-- 1 file changed, 12 insertions(+), 25 dele

[PATCH 15/87] staging: comedi: pcl816: clarify dma channel request in pcl816_attach()

2014-02-17 Thread H Hartley Sweeten
All the board types can do DMA using DMA channels 3 or 1. Remove the 'DMAbits', which is a mask of the valid channels, from the boardinfo. Refactor pcl816_attach() to remove the need for the goto. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drive

[PATCH 55/87] staging: comedi: pcl816: tidy up dma buffer allocation

2014-02-17 Thread H Hartley Sweeten
'hwdmasize' arrays in the private data with variables to save a bit of space. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl816.c | 68 - 1 file changed, 25 insertions(+), 43 deletions(-)

[PATCH 47/87] staging: comedi: pcl816: remove 'ai_scans' from private data

2014-02-17 Thread H Hartley Sweeten
This member of the private data is just a copy of the cmd->stop_arg. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl816.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/drivers/staging/com

[PATCH 48/87] staging: comedi: pcl818: remove 'ai_scans' from private data

2014-02-17 Thread H Hartley Sweeten
This member of the private data is just a copy of the cmd->stop_arg. Refactor the code to follow the style of pcl812 and pcl816 drivers. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl818.c | 14 +- 1 file changed

[PATCH 53/87] staging: comedi: pcl818: remove 'ai_flags' from private data

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

[PATCH 67/87] staging: comedi: pcl816: use subdevice (*cancel)

2014-02-17 Thread H Hartley Sweeten
Use the subdevice (*cancel) operation to remove the need for a forward declaration. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl816.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/staging

[PATCH 52/87] staging: comedi: pcl812: remove 'ai_flags' from private data

2014-02-17 Thread H Hartley Sweeten
This member of the private data is just a copy of the cmd->flags. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl812.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/comedi/drivers/pcl81

[PATCH 31/87] staging: comedi: pcl816: remove incorrect 'ai_chanlist' from boardinfo

2014-02-17 Thread H Hartley Sweeten
The maximum chanlist that this hardware can handle is 16 (the number of input channels). Remove this incorrect data from the boardinfo and just initialize the subdevice 'len_chanlist' to subdevice 'n_chan'. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-H

[PATCH 37/87] staging: comedi: pcl818: remove 'ai_maxdata' from boardinfo

2014-02-17 Thread H Hartley Sweeten
All the board types have 12-bit analog inputs. Remove this data from the boardinfo. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl818.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/staging

[PATCH 46/87] staging: comedi: pcl812: remove 'ai_scans' from private data

2014-02-17 Thread H Hartley Sweeten
This member of the private data is just a copy of the cmd->stop_arg. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl812.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/drivers/staging/com

[PATCH 33/87] staging: comedi: pcl816: remove 'ai_ns_min' from boardinfo

2014-02-17 Thread H Hartley Sweeten
This member of the boardinfo is the same for all board types. Remove this data from the boardinfo. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl816.c | 16 +--- 1 file changed, 5 insertions(+), 11 deletions(-) diff

[PATCH 72/87] staging: comedi: pcl818: remove 'ai_chanlist' from private data

2014-02-17 Thread H Hartley Sweeten
This member of the private data is just a pointer to the cmd->chanlist. Use that instead. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl818.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/driv

[PATCH 42/87] staging: comedi: pcl818: introduce pcl818_ai_get_sample()

2014-02-17 Thread H Hartley Sweeten
Introduce a helper function to read the 12-bit analog input data sample and optionally return the channel that the sample was for. The channel is only used in the interrupt routine to check for dropped samples. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers

[PATCH 50/87] staging: comedi: pcl816: remove 'ai_n_chan' from private data

2014-02-17 Thread H Hartley Sweeten
This member of the private data is just a copy of the cmd->chanlist_len. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl816.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/comedi/driv

[PATCH 32/87] staging: comedi: pcl816: remove 'ai_range_type' from boardinfo

2014-02-17 Thread H Hartley Sweeten
All the board types use the same analog input range_table. Remove this data from the boardinfo. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl816.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers

[PATCH 08/87] staging: comedi: pcl818: remove 'io_range' from boardinfo

2014-02-17 Thread H Hartley Sweeten
27;io_range' in the private data. For aesthetics, rename the 'fifo' member in the boardinfo to 'has_fifo' and change it to a bit-field. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl818.c | 31 --

[PATCH 40/87] staging: comedi: pcl812: introduce pcl812_ai_get_sample()

2014-02-17 Thread H Hartley Sweeten
Introduce a helper function to read the 12/16-bit analog input data sample. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl812.c | 27 +++ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a

[PATCH 64/87] staging: comedi: pcl816: don't calc the timer divisors twice

2014-02-17 Thread H Hartley Sweeten
need to be recalced. Refactor pcl816_start_pacer() to use the values from the private data. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl816.c | 41 +++-- 1 file changed, 13 insertions(+), 28 dele

[PATCH 77/87] staging: comedi: pcl816: rename 'irq_blocked' in private data

2014-02-17 Thread H Hartley Sweeten
This member in the private data is a flag that indicates that an analog input async command is currently running. Rename it to make this clear. The private data is kzalloc'ed in the attach so remove the unnecessary clearing of this flag. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc:

[PATCH 28/87] staging: comedi: pcl816: remove 'n_ranges' from boardinfo

2014-02-17 Thread H Hartley Sweeten
This member in the boardinfo is not used. Remove it. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl816.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/comedi/drivers/pcl816.c b/drivers/staging/comedi

[PATCH 86/87] staging: comedi: pcl816: kzalloc'ed memory does not need to be cleared

2014-02-17 Thread H Hartley Sweeten
The private data is kzalloc'ed in the (*attach). There is no need to initialize and the members to 0. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl816.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/c

[PATCH 56/87] staging: comedi: pcl818: tidy up dma buffer allocation

2014-02-17 Thread H Hartley Sweeten
'hwdmasize' arrays in the private data with variables to save a bit of space. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl818.c | 61 +++-- 1 file changed, 28 insertions(+), 33 deletions(-)

[PATCH 62/87] staging: comedi: pcl816: remove unneeded forward declarations

2014-02-17 Thread H Hartley Sweeten
These forward declarations are not needed. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl816.c | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/staging/comedi/drivers/pcl816.c b/drivers/staging/comedi/drivers

[PATCH 70/87] staging: comedi: pcl818: remove 'ai_timer[12]' from private data

2014-02-17 Thread H Hartley Sweeten
These members of the private data are set but never used. Remove them. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl818.c | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/staging/comedi/drivers/pcl818.c b/drivers

[PATCH 71/87] staging: comedi: pcl812: remove 'ai_chanlist' from private data

2014-02-17 Thread H Hartley Sweeten
This member of the private data is just a copy of the cmd->chanlist. Use that instead. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl812.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/driv

[PATCH 61/87] staging: comedi: pcl818: use 8253.h helpers

2014-02-17 Thread H Hartley Sweeten
icating if the divisors should be loaded into the timers. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl818.c | 60 +++-- 1 file changed, 27 insertions(+), 33 deletions(-) diff --git a/drivers/stag

[PATCH 68/87] staging: comedi: pcl818: use subdevice (*cancel)

2014-02-17 Thread H Hartley Sweeten
Use the subdevice (*cancel) operation to remove the need for a forward declaration. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl818.c | 24 +++- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a

[PATCH 39/87] staging: comedi: pcl812: remove 'ai_maxdata' from boardinfo

2014-02-17 Thread H Hartley Sweeten
e this new boardinfo. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl812.c | 24 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/drivers/staging/comedi/drivers/pcl812.c b/drivers/staging/comedi/dr

[PATCH 14/87] staging: comedi: pcl812: clarify dma channel request in pcl812_attach()

2014-02-17 Thread H Hartley Sweeten
All the board types that can do DMA can use DMA channels 3 or 1. Remove the 'DMAbits', which is a mask of the valid channels, from the boardinfo and replace it with a bit-field flag 'has_dma'. Refactor pcl812_attach() to use the new flag and remove the need for the goto. Sign

[PATCH 73/87] staging: comedi: pcl816: remove 'ai_act_chanlist_{len, pos}' from private data

2014-02-17 Thread H Hartley Sweeten
These members of the private data don't do anything usefull. Just remove them. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl816.c | 13 - 1 file changed, 13 deletions(-) diff --git a/drivers/staging/comedi/dr

[PATCH 81/87] staging: comedi: pcl816: remove unnecessary function separation comments

2014-02-17 Thread H Hartley Sweeten
These comments are just added cruft. Remove them. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl816.c | 40 - 1 file changed, 40 deletions(-) diff --git a/drivers/staging/comedi/drivers/pcl816.c b

[PATCH 60/87] staging: comedi: pcl816: use 8253.h helpers

2014-02-17 Thread H Hartley Sweeten
icating if the divisors should be loaded into the timers. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl816.c | 80 ++--- 1 file changed, 34 insertions(+), 46 deletions(-) diff --git a/drivers/stag

[PATCH 59/87] staging: comedi: pcl812: use 8253.h helpers

2014-02-17 Thread H Hartley Sweeten
icating if the divisors should be loaded into the timers. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl812.c | 51 + 1 file changed, 20 insertions(+), 31 deletions(-) diff --git a/drivers/stag

[PATCH 66/87] staging: comedi: pcl812: use subdevice (*cancel)

2014-02-17 Thread H Hartley Sweeten
Use the subdevice (*cancel) operation to remove the need for a forward declaration. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl812.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/staging

[PATCH 76/87] staging: comedi: pcl818: convert private data flags to bit-fields

2014-02-17 Thread H Hartley Sweeten
Convert the flags in the private data to bit-fields to save a bit of space. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl818.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/comedi

[PATCH 51/87] staging: comedi: pcl818: remove 'ai_n_chan' from private data

2014-02-17 Thread H Hartley Sweeten
This member of the private data is just a copy of the cmd->chanlist_len. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl818.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/drivers/stag

[PATCH 85/87] staging: comedi: pcl812: allocate private data before requesting the I/O region

2014-02-17 Thread H Hartley Sweeten
To better match the pcl818 and pcl816 drivers, allocate the private data before calling comedi_request_region(). Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl812.c | 8 1 file changed, 4 insertions(+), 4 deletions

[PATCH 83/87] staging: comedi: pcl818: tidy up pcl818_check()

2014-02-17 Thread H Hartley Sweeten
unnecessary comedi_error() noise. Make sure the CONTROL register is reset to a known state after the check. The 0x18 value actually defines an invalid interrupt selection and sets an undefined bit. Add a couple comments to clarify the magic values. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott

[PATCH 80/87] staging: comedi: pcl812: remove unnecessary function separation comments

2014-02-17 Thread H Hartley Sweeten
These comments are just added cruft. Remove them. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl812.c | 39 - 1 file changed, 39 deletions(-) diff --git a/drivers/staging/comedi/drivers/pcl812.c b

[PATCH 82/87] staging: comedi: pcl818: remove unnecessary function separation comments

2014-02-17 Thread H Hartley Sweeten
These comments are just added cruft. Remove them. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl818.c | 66 - 1 file changed, 66 deletions(-) diff --git a/drivers/staging/comedi/drivers/pcl818.c b

[PATCH 79/87] staging: comedi: pcl816: remove unnecessary 'dev->irq' check

2014-02-17 Thread H Hartley Sweeten
If the dev->irq is not valid the interrupt function will not be hooked up during the attach. Remove the unnecessary check. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl816.c | 2 +- 1 file changed, 1 insertion(+), 1 delet

[PATCH 84/87] staging: comedi: pcl816: tidy up pcl818_check()

2014-02-17 Thread H Hartley Sweeten
comments to clarify the magic values. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl816.c | 58 ++--- 1 file changed, 31 insertions(+), 27 deletions(-) diff --git a/drivers/staging/comedi/drivers/pcl816

[PATCH 78/87] staging: comedi: pcl818: rename 'irq_blocked' in private data

2014-02-17 Thread H Hartley Sweeten
This member in the private data is a flag that indicates that an analog input async command is currently running. Rename it to make this clear. The private data is kzalloc'ed in the attach so remove the unnecessary clearing of this flag. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc:

[PATCH 87/87] staging: comedi: pcl818: kzalloc'ed memory does not need to be cleared

2014-02-17 Thread H Hartley Sweeten
The private data is kzalloc'ed in the (*attach). There is no need to initialize and the members to 0. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl818.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/c

[PATCH 00/12] staging: comedi: pcl816: cleanup driver

2014-02-19 Thread H Hartley Sweeten
Hartley Sweeten (12): staging: comedi: pcl816: remove 'ai_ns_min' from boardinfo staging: comedi: pcl816: remove 'n_aochan' from boardinfo staging: comedi: pcl816: clarify irq request in pcl816_attach() staging: comedi: pcl816: don't calc the timer divisors twice

[PATCH 05/12] staging: comedi: pcl816: use subdevice (*cancel)

2014-02-19 Thread H Hartley Sweeten
Use the subdevice (*cancel) operation to remove the need for a forward declaration. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl816.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers

[PATCH 01/12] staging: comedi: pcl816: remove 'ai_ns_min' from boardinfo

2014-02-19 Thread H Hartley Sweeten
This member of the boardinfo is the same for all board types. Remove this data from the boardinfo. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl816.c | 16 +--- 1 file changed, 5 insertions(+), 11 deletions

[PATCH 08/12] staging: comedi: pcl816: kzalloc'ed memory does not need to be cleared

2014-02-19 Thread H Hartley Sweeten
The private data is kzalloc'ed in the (*attach). There is no need to initialize any of the members to 0. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl816.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/dr

[PATCH 02/12] staging: comedi: pcl816: remove 'n_aochan' from boardinfo

2014-02-19 Thread H Hartley Sweeten
This member of the boardinfo is the same for all board types. Remove this data from the boardinfo. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl816.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git

[PATCH 03/12] staging: comedi: pcl816: clarify irq request in pcl816_attach()

2014-02-19 Thread H Hartley Sweeten
All the board types can use IRQ 2-7 for async command support. Remove the 'IRQbits', which is a mask of the valid IRQs, from the boardinfo and refactor pcl816_attach(). Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/driver

[PATCH 10/12] staging: comedi: pcl816: remove unnecessary 'dev->irq' check

2014-02-19 Thread H Hartley Sweeten
If the dev->irq is not valid the interrupt function will not be hooked up during the attach. Remove the unnecessary check. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl816.c | 2 +- 1 file changed, 1 insertion(+)

[PATCH 06/12] staging: comedi: pcl816: remove 'ai_act_chanlist_{len, pos}' from private data

2014-02-19 Thread H Hartley Sweeten
These members of the private data don't do anything usefull. Just remove them. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl816.c | 13 - 1 file changed, 13 deletions(-) diff --git a/drivers/staging/c

[PATCH 04/12] staging: comedi: pcl816: don't calc the timer divisors twice

2014-02-19 Thread H Hartley Sweeten
need to be recalced. Refactor pcl816_start_pacer() to use the values from the private data. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl816.c | 41 +++-- 1 file changed, 13 insertions(+

[PATCH 11/12] staging: comedi: pcl816: remove unnecessary function separation comments

2014-02-19 Thread H Hartley Sweeten
These comments are just added cruft. Remove them. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl816.c | 40 - 1 file changed, 40 deletions(-) diff --git a/drivers/staging/comedi/drivers

[PATCH 12/12] staging: comedi: pcl816: tidy up pcl818_check()

2014-02-19 Thread H Hartley Sweeten
comments to clarify the magic values. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl816.c | 58 ++--- 1 file changed, 31 insertions(+), 27 deletions(-) diff --git a/drivers/staging/comedi

[PATCH 07/12] staging: comedi: pcl816: convert private data flags to bit-fields

2014-02-19 Thread H Hartley Sweeten
The 'irq_was_now_closed' member is actually a flag, devpriv->int816_mode will always be > 0 when it's used to set irq_was_now_closed in the cancel function. Convert the flags in the private data to bit-fields to save a bit of space. Signed-off-by: H Hartley Sweeten Review

[PATCH 09/12] staging: comedi: pcl816: rename 'irq_blocked' in private data

2014-02-19 Thread H Hartley Sweeten
This member in the private data is a flag that indicates that an analog input async command is currently running. Rename it to make this clear. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl816.c | 12 ++-- 1 file

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

2014-02-28 Thread H Hartley Sweeten
request in the hardware. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl812.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers/pcl812.c b/drivers/staging/comedi/drivers/pcl812.

[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 Cc: Ian Abbott Cc

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

2014-02-28 Thread H Hartley Sweeten
ttach this driver to a non- compatible board but the check would still pass depending on the register map of the board. Just remove the buggy function to simplify the attach a bit. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl816.c

[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 Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl816.c | 114 ++-- 1

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

2014-02-28 Thread H Hartley Sweeten
rrupt routines should not busywait. That's just mean... Remove the bustwait and use pcl818_ai_eoc() to check for the end-of- conversion. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl818.c | 19 +++ 1 file

[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 Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl812.c | 8 +++- 1 file changed, 3 insertions(+), 5

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

2014-02-28 Thread H Hartley Sweeten
s set at the completion of each scan. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl816.c | 63 - 1 file changed, 31 insertions(+), 32 deletions(-) diff --git a/drivers/staging/comedi/drivers/pcl816

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

2014-02-28 Thread H Hartley Sweeten
Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl812.c | 98 + 1 file changed, 50 insertions(+), 48 deletions(-) diff --git a/drivers/staging/comedi/drivers/pcl812.c b/drivers/staging/comedi/drivers/pcl812.c index

[PATCH 11/66] staging: comedi: pcl816: remove 'dmasamplesize' from private data

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

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

2014-02-28 Thread H Hartley Sweeten
r functions. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl818.c | 101 ++-- 1 file changed, 30 insertions(+), 71 deletions(-) diff --git a/drivers/staging/comedi/drivers/pcl818.c b/drivers/staging

<    5   6   7   8   9   10   11   12   13   14   >