On Tue, Nov 04, 2014 at 11:48:26PM +0200, Aya Mahfouz wrote:
> On Tue, Nov 04, 2014 at 03:06:53PM +0530, Sudip Mukherjee wrote:
> > On Tue, Nov 04, 2014 at 02:13:19AM +0200, Aya Mahfouz wrote:
> > > This patch replaces dev_err by pr_err since the value
> > > of ir is NULL when the message is displa
On 2014年11月04日 22:29, Russell King - ARM Linux wrote:
On Tue, Nov 04, 2014 at 09:33:10PM +0800, Andy Yan wrote:
From: Andy yan
We found freescale imx6 and rockchip rk3288 and Ingenic JZ4780 (Xburst/MIPS)
use the interface compatible Designware HDMI IP, but they also have some
lightly differen
Hi ZubairLK:
On 2014年11月04日 21:50, Zubair Lutfullah Kakakhel wrote:
Hi,
On 04/11/14 13:39, Andy Yan wrote:
From: Andy yan
the original imx hdmi driver is under staging/imx-drm,
which depends on imx-drm, so move the imx hdmi drvier out
to drm/bridge and rename imx-hdmi to dw-hdmi
Change-Id: I
[with a valid Message-ID]
On Tue, Nov 04, 2014 at 10:00:32AM +0100, Bjørn Mork wrote:
> [added linux-...@vger.kernel.org Cc]
>
> Stephanie Wallick writes:
>
> > Media Agnostic (MA) USB enables the USB protocol to be used over a wide
> > range of physical media. MA USB is a relatively new protoc
Fix the implementation of a single-open policy for both
devices (lcd and keypad) by using atomic_t instead of plain ints.
Signed-off-by: Mariusz Gorski
---
drivers/staging/panel/panel.c | 19 ++-
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/drivers/staging/panel
This patches replaces one pr_debug call by dev_dbg and
changes the device used by one of the dev_err calls.
Signed-off-by: Aya Mahfouz
---
drivers/staging/media/lirc/lirc_zilog.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/media/lirc/lirc_zilog.c
b/dr
The GET_BUS_DEV macro contained flow control statements that are undesirable.
This patch removes the macro and places the code in each function.
Signed-off-by: Bryan Thompson
---
drivers/staging/unisys/virtpci/virtpci.c | 48 --
1 file changed, 33 insertions(+), 15
On Tue, Nov 04, 2014 at 10:00:32AM +0100, Bjørn Mork wrote:
> [added linux-...@vger.kernel.org Cc]
>
> Nice. But don't you think this deserves the attention of the linux-usb
> mailing list? Yes, Greg's attention is of course good to have too :-)
> But I believe this is of interest to more people
On Tue, Nov 04, 2014 at 10:00:32AM +0100, Bjørn Mork wrote:
> [added linux-...@vger.kernel.org Cc]
>
> Nice. But don't you think this deserves the attention of the linux-usb
> mailing list? Yes, Greg's attention is of course good to have too :-)
> But I believe this is of interest to more people
On Tuesday, November 04, 2014 11:09 AM, Ian Abbott wrote:
> This series of patches adds a couple of ioctl codes to the Comedi core
> to allow the current "read" and "write" subdevice to be changed after
> opening the comedi device. The current read and write subdevice
> information is stored in fi
Move this function from the included source file to the main driver
source file.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
.../comedi/drivers/addi-data/hwdrv_apci3120.c | 32 --
drivers/staging/comedi/drivers/addi_apci_3120.c| 32 ++
Pass the comedi_device and comedi_subdevice pointers to this function instead
of the irq number and void pointer.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/addi_apci_3120.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions
Move this function from the included source file to the main driver
source file.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
.../comedi/drivers/addi-data/hwdrv_apci3120.c | 28 --
drivers/staging/comedi/drivers/addi_apci_3120.c| 28 ++
Rename this CamelCase member of the private data and convert it to
a bit-field.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c | 10 +-
drivers/staging/comedi/drivers/addi_apci_3120.c | 2 +
A dummy read of APCI3120_TIMER_MODE_REG resets the analog input FIFO. Introduce
a helper function to clarify this.
It's not necessary to do a dummy read of the FIFO (base + 0) before reseting it.
Remove the unnecessary dummy reads.
The APCI3120_TIMER_MODE_REG is a 16-bit register. This fixes a co
Use the defines for the AMCC 5933 PCI controller registers and bits instead
of creating private defines in this driver.
Move the generic AGCSTS_TC_ENABLE define from this driver to the header.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
.../comedi/drivers/addi-d
Currently the DMA buffers are switched before writing the current samples to
the async buffer. This works but when the EOA event happens we end up with an
outstanding DMA operation in progress that gets terminated by the (*cancel).
Avoid the outstanding DMA operation by switching the DMA buffers a
Move this function from the included hwdrv_apci31210.c source file to
the main driver source file.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c | 12
drivers/staging/comedi/drivers/addi_apci_31
This function is only called by apci3120_set_chanlist(). Absorb it.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/addi_apci_3120.c | 9 ++---
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/comedi/dri
This function is only called during the attach of the driver and it's
called after the private data has been kzalloc'd. There is no reason
to clear any of the private data members.
Simplify the function by just writing '0' to the necessary registers
to disable all the interrupt sources and stop th
Move this function from the included source file to the main driver
source file.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
.../comedi/drivers/addi-data/hwdrv_apci3120.c | 72 --
drivers/staging/comedi/drivers/addi_apci_3120.c| 72 ++
Move this function from the included source file to the main driver
source file.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
.../comedi/drivers/addi-data/hwdrv_apci3120.c | 56 --
drivers/staging/comedi/drivers/addi_apci_3120.c| 56 ++
Move this function from the included source file to the main driver
source file.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
.../comedi/drivers/addi-data/hwdrv_apci3120.c | 51 --
drivers/staging/comedi/drivers/addi_apci_3120.c| 51 ++
Move this function from the included source file to the main driver
source file.
Remove the now empty included source file.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
.../comedi/drivers/addi-data/hwdrv_apci3120.c | 58 --
drivers/stagin
The async command support should now work. Enable the hook up of the command
support functions in apci3120_auto_attach().
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/addi_apci_3120.c | 2 +-
1 file changed, 1 insertion(+), 1 deletio
Use the helper function to calculate the number of samples in the DMA
buffer. For aesthetics, tidy up the local variables.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c | 15 ---
1 file changed,
In apci3120_interrupt_dma(), use the async->events to report the hardware
error and allow the core to (*cancel) the command instead of calling the
(*cancel) function directly.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/addi-data/hw
Remove the copyright info from the included source file and add it
to the main driver source file.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
.../comedi/drivers/addi-data/hwdrv_apci3120.c | 42 --
drivers/staging/comedi/drivers/addi_apci
The timer subdevice in this driver does not follow the comedi API.
Fix the (*insn_config) to correctly arm, disarm, set the mode, and
get the status of the timer.
Remove the unnecessary, and broken, (*insn_write).
The new (*insn_config) does not enable the interrupt for timer 2.
Remove the inter
The header is not needed by this driver. Remove the
include.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/addi_apci_3120.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/staging/comedi/drivers/addi_apci_3120.c
b/drivers
Regardless of the cmd->scan_begin_src, the minimum cmd->convert_arg
value is 1 (10us). Fix the validation in apci3120_ai_cmdtest().
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c | 9 ++---
1 file cha
Move apci3120_ai_cmdtest() from the included source file to the main
driver source file. Tidy up Step 4 a bit during the move.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
.../comedi/drivers/addi-data/hwdrv_apci3120.c | 64 -
drivers/stagi
Move this function from the included source file to the main driver
source file.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c | 14 --
drivers/staging/comedi/drivers/addi_apci_3120.c |
Rename this CamelCase member of the private data and convert it to
a bit-field.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c | 2 +-
drivers/staging/comedi/drivers/addi_apci_3120.c | 4 ++--
2 fil
The timer subdevice in this driver does not follow the comedi API.
Fix the (*insn_read) to work correctly.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
.../comedi/drivers/addi-data/hwdrv_apci3120.c | 35 --
drivers/staging/comedi/drivers/a
These true/false defines don't add any significant clarity to the code.
Remove them.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
.../comedi/drivers/addi-data/hwdrv_apci3120.c | 22 +-
1 file changed, 9 insertions(+), 13 deletions(-)
diff
Define the add-On registers and bits and remove the "magic" numbers in the
driver.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
.../comedi/drivers/addi-data/hwdrv_apci3120.c | 40 +-
drivers/staging/comedi/drivers/addi_apci_3120.c| 5
Timer 2 can be used to count the number of scans when the cmd->stop_src
is TRIG_COUNT. Unfortunately that timer can also be used by userspace and
this breaks the async command. Timer 2 also only works for counting the
number of scans when DMA is not used.
The number of scans is counted by the core
Define the offset for the analog input software trigger register.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c | 3 ---
drivers/staging/comedi/drivers/addi_apci_3120.c | 1 +
2 files changed, 1 in
Comedi devices may have several subdevices that support "read" and/or
"write" asynchronous commands that use the "read" or "write" file
operations for data transfer. The low-level Comedi drivers may nominate
a default "read" subdevice and/or a default "write" subdevice, but it
may have other subde
This series of patches adds a couple of ioctl codes to the Comedi core
to allow the current "read" and "write" subdevice to be changed after
opening the comedi device. The current read and write subdevice
information is stored in file private data allocated for the lifetime of
the file object, so
Now that Comedi has the structures in place to support setting the
current "read" and/or "write" subdevice on a per-file object basis, add
new ioctls to set them. The newly chosen "read" ("write") subdevice
needs to support "read" ("write") commands, and the file cannot be busy
handling a "read" (
On Tue, Nov 04, 2014 at 09:55:19AM -0800, sostalle wrote:
> >On Mon, Nov 03, 2014 at 01:24:04PM -0800, Greg KH wrote:
> >>On Mon, Nov 03, 2014 at 12:42:57PM -0800, Stephanie Wallick wrote:
> >> --- /dev/null
> >> +++ b/drivers/staging/mausb/TODO
> >> @@ -0,0 +1,14 @@
> >> +TODO:
> >> + - checkpatc
>On Mon, Nov 03, 2014 at 01:24:04PM -0800, Greg KH wrote:
>>On Mon, Nov 03, 2014 at 12:42:57PM -0800, Stephanie Wallick wrote:
>> --- /dev/null
>> +++ b/drivers/staging/mausb/TODO
>> @@ -0,0 +1,14 @@
>> +TODO:
>> +- checkpatch.pl cleanups
>
>Is this still true?
>
checkpatch.pl reports:
total:
On Tue, Nov 04, 2014 at 09:48:33AM +0100, Tobias Klauser wrote:
> On 2014-11-03 at 21:42:52 +0100, Stephanie Wallick
> wrote:
> > This is where we handle media specific packets and transport. The MS driver
> > interfaces with a media agnostic (MA) driver via a series of transfer pairs.
> > Transf
The devpriv->mode is set to '0' at the start of apci3120_ai_insn_read() and
apci3120_cyclic_ai(). There is no need to clear any of the bits or do any
of the additional writes of those cleared bits.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
.../comedi/drivers/ad
For aesthetics, move the check of the cmd->start_src.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c | 12 +---
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/comedi/dri
Define the offset for the analog input FIFO register.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c | 4 +---
drivers/staging/comedi/drivers/addi_apci_3120.c | 3 ++-
2 files changed, 3 insertions(
Introduce a helper function to handle the common code that writes the DMA
start address and number of acquisitions to the AMCC Add-on registers.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
.../comedi/drivers/addi-data/hwdrv_apci3120.c | 75 +++---
For aesthetics, remove this define and just use ~APCI3120_ENABLE_TIMER_INT.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c | 9 -
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/
This driver tries to be tricky and allow passing an analog input conversion time
for the (*insn_read) in the (*insn_config). The (*insn_config) doesn't follow
the comedi API and this programmable conversion time is not part of the API for
(*insn_read) operations.
Remove the member from the privat
For aesthetics, flip this test and do the DMA setup first.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c | 9 -
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/comedi/dr
This member of the private data is not really needed. The interrupt mode
can be determined by checking the devpriv->mode value to see if the
interrupt is enabled. Remove the unnecessary member.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
.../staging/comedi/driver
This functon is called by apci3120_ai_cmd() with one additional parameter,
'mode', The 'mode' is based on the cmd->scan_begin_src.
For aesthetics, absorb the function into apci3120_ai_cmd() and use the
cmd->scan_begin_src directly to determine the 'mode'.
Signed-off-by: H Hartley Sweeten
Cc: Ian
Now that the scanning and interrupt support have been removed from this
function it can be refactored to work correctly.
The comedi core expects (*insn_read) functions to read insn->n values
from the hardware and return the number of samples read. This function
currently just reads one sample but
At the start of apci3120_ai_insn_read() the devpriv->b_ModeSelectRegister is set
to '0'. Remove the unnecessary masking to clear the interrupt enable bits.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c | 13
The 'SCAN_ENA' bit in the mode register needs to be set if the chanlist
has more than 1 channel. Set the bit in apci3120_set_chanlist() if needed.
The callers write the mode register after setting any additional bits,
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
d
Move the enable of timer 2 to avoid needing the extra if() check.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/comedi
For aesthetics, factor the DMA setup code out of apci3120_cyclic_ai().
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
.../comedi/drivers/addi-data/hwdrv_apci3120.c | 295 +++--
1 file changed, 148 insertions(+), 147 deletions(-)
diff --git a/dr
The apci3120_setup_chan_list() function sets devpriv->ctrl to the scan length
(PR) and scan start (PA) values and writes the value to the register. There is
no need to mask the value first.
The apci3120_ai_insn_read() function calles apci3120_setup_chan_list(). There
is no need to clear devpriv->c
There is no reason for the separate updates of the mode register in this
function. Refactor the code so that the mode register is only updated at
the end of the function after all the necessary bits have been set.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drive
Tidy up the programming of timers 0 and 1 so that only one local variable is
required.
Also, remove the unnecessary clear of devpriv->timer_mode. This value will get
set correctly by each apci3120_timer_set_mode() call. It's not necessary to
clear it first.
Signed-off-by: H Hartley Sweeten
Cc: I
The APCI3120_DISABLE_ALL_TIMER define define is not needed, and it's used
incorrectly in apci3120_cancel(). The define is a mask of the bits needed
to disable the counters. Writing the value directly sets unintended bits.
Prior to writing the value, the 'devpriv->us_OutputRegister' is set to 0
and
Rename this CamelCase member of the private data and tidy up the mask/set
of its bits.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
.../comedi/drivers/addi-data/hwdrv_apci3120.c | 198 +++--
drivers/staging/comedi/drivers/addi_apci_3120.c|
This member of the private data was used to determine if the interrupt
routine was handling data for the (*insn_read) or an async command. Now
that the (*insn_read) does not use interrupts this member is not needed.
Remove the member and refactor the code.
Signed-off-by: H Hartley Sweeten
Cc: Ia
This parameter is always passed as '0'. Remove it and refactor the code.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
.../comedi/drivers/addi-data/hwdrv_apci3120.c | 23 +-
1 file changed, 5 insertions(+), 18 deletions(-)
diff --git a/dri
For aesthetics, rename this define.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c | 11 +--
drivers/staging/comedi/drivers/addi_apci_3120.c | 1 +
2 files changed, 6 insertions(+), 6 delet
For aesthetics, rename this define used for the status register offset.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
.../staging/comedi/drivers/addi-data/hwdrv_apci3120.c | 17 +++--
drivers/staging/comedi/drivers/addi_apci_3120.c | 3 ++-
2
Introduce a helper function to select a timer and write a value to it.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
.../comedi/drivers/addi-data/hwdrv_apci3120.c | 138 +
drivers/staging/comedi/drivers/addi_apci_3120.c| 1 +
2 files
Move this helper function from the included source file into the main driver
source file.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c | 11 ---
drivers/staging/comedi/drivers/addi_apci_3120.c
Move this function, and its helper function, from the included hwdrv_apci31210.c
source file to the main driver source file.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
.../comedi/drivers/addi-data/hwdrv_apci3120.c | 38 --
drivers/stagin
Move this function from the included hwdrv_apci31210.c source file to the
main driver source file.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
.../comedi/drivers/addi-data/hwdrv_apci3120.c | 28 --
drivers/staging/comedi/drivers/addi_apci
This member of the private data is always the cmd->chanlist_len. Use that
instead and remove the member.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c | 8 +++-
drivers/staging/comedi/drivers/addi_apci_3
(*insn_read) functions are supposed to do simple polled reads of a single
channel. This driver tries to be tricky and allow passing a chanlist in
the analog input (*insn_config) to allow the (*insn_read) to do chanlist
scanning with or without interrupts.
The (*insn_config) doesn't follow the come
The APCI-3120 documentation says that the FIFO should be reset after the
chanlist sequence is programmed.
Reset the FIFO after programming the chanlist and remove the extra FIFO
resets in the driver.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/co
The n_chan check is not needed. This value will always be >= 1. Remove
the unnecessary check.
For aesthetics, rename the function and change it's return type to void.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
.../staging/comedi/drivers/addi-data/hwdrv_apci3120
Define the CTR0 register in the main driver source file and remove all
the old defines in hwrdv_apci3120.c.
For aesthetics, save the raw digital output state (devpriv->do_bits) in
the digital output (*insn_bits) function and use a macro to set them when
reading/writing a timer.
Use the CTR0 regis
Move this function, and its helper function, from the included hwdrv_apci31210.c
source file to the main driver source file.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
.../comedi/drivers/addi-data/hwdrv_apci3120.c | 60 --
drivers/stagin
This member of the private data was used to return analog input samples that
were acquired for the (*insn_read) using interrupts. The interrupt support
code for the (*insn_read) has been removed. Remove this unused member from
the private data.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc:
Move this define to the main driver source and convert it to a bit-shift.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c | 6 --
drivers/staging/comedi/drivers/addi_apci_3120.c | 1 +
2 files ch
Tidy up the programming of timer 2.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
.../staging/comedi/drivers/addi-data/hwdrv_apci3120.c| 16 +---
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/comedi/drivers/addi-data/
For aesthetics, remove these defines and just use ~APCI3120_ENABLE_TIMER[012].
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c | 14 +-
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a
For aesthetics, redefine the bits in the mode register that enable interrupts
and scanning.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
.../comedi/drivers/addi-data/hwdrv_apci3120.c | 38 +-
drivers/staging/comedi/drivers/addi_apci_3120.c
Introduce a helper function to handle the common code that writes a 32-bit
value to the 16-bit add-on register.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
.../comedi/drivers/addi-data/hwdrv_apci3120.c | 71 +-
1 file changed, 29 insertio
For aesthetics, redefine the bits in the mode register used to select the
clock for timer 2.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c | 11 ---
drivers/staging/comedi/drivers/addi_apci_3120.c
For aesthetics, replace these defines with a macro that returns the
correct bit needed to set the gate bit to enable a timer.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
.../comedi/drivers/addi-data/hwdrv_apci3120.c | 25 +-
drivers/stagi
Move the timer read/write and set mode helpers from the included source
file into the main driver source file.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
.../comedi/drivers/addi-data/hwdrv_apci3120.c | 53 --
drivers/staging/comedi/drive
The timer divisor calculations in this driver are over complicated.
There are three timers on the board. They all use the same base clock
with a fixed prescaler for each timer. The base clock used depends on
the board version and type:
APCI-3120 Rev A boards OSC = 14.29MHz base clock (~70ns)
For aesthetics, rename this define.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c | 7 ++-
drivers/staging/comedi/drivers/addi_apci_3120.c | 1 +
2 files changed, 3 insertions(+), 5 deletions(-
For aesthetics, redefine the bits in the mode register used to set the
operation mode of timer 2.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
.../comedi/drivers/addi-data/hwdrv_apci3120.c | 23 --
drivers/staging/comedi/drivers/addi_apci_
Absorb this simple function into apci3120_interrupt().
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
.../comedi/drivers/addi-data/hwdrv_apci3120.c | 28 +++---
1 file changed, 8 insertions(+), 20 deletions(-)
diff --git a/drivers/staging/comed
Introduce a helper function to enable/disable a timer.
The disable of timers 0 and 1 in apci3120_interrupt() is probably not needed.
For now use the helper function to make sure the devpriv->ctrl bits are cleared
correctly to disable the timers.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
C
Move this function from the included hwdrv_apci31210.c source file to the main
driver source file.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
.../staging/comedi/drivers/addi-data/hwdrv_apci3120.c | 18 --
drivers/staging/comedi/drivers/addi_apci
Move the analog input comedi_lrange table from the included hwdrv_apci3120.c
source file to the main driver source file.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c | 14 --
drivers/staging/com
For aesthetics, rename this define used for the mode register offset.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
.../comedi/drivers/addi-data/hwdrv_apci3120.c | 42 +-
drivers/staging/comedi/drivers/addi_apci_3120.c| 1 +
2 files ch
A dummy read of APCI3120_CTR0_REG clears the timer 2 interrupt. Introduce a
helper function to clarify this.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
.../comedi/drivers/addi-data/hwdrv_apci3120.c | 30 --
drivers/staging/comedi/drivers
Rename this CamelCase member of the private data and tidy up the mask/set
of its bits.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
.../comedi/drivers/addi-data/hwdrv_apci3120.c | 110 -
drivers/staging/comedi/drivers/addi_apci_3120.c|
For aesthetics, remove this define and just use ~APCI3120_ENABLE_EOS_INT.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/stag
Define the bits in the status register and use them to clarify the code.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
.../comedi/drivers/addi-data/hwdrv_apci3120.c | 58 ++
drivers/staging/comedi/drivers/addi_apci_3120.c| 9
2 fi
Move this function from the included hwdrv_apci31210.c source file to the main
driver source file.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c | 13 -
drivers/staging/comedi/drivers/addi_apci_3
1 - 100 of 214 matches
Mail list logo