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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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(-)
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
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
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
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
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
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
'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(-)
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
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
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
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
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
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:
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
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
'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(-)
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
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
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
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
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
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
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
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
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
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
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
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
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
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 --
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
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
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:
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
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
'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(-)
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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:
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
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
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
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
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
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
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
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(+)
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
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(+
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
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
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
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
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.
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
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
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
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
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
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
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
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
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
901 - 1000 of 4915 matches
Mail list logo