platform/kernel/linux-starfive.git
10 years agostaging: unisys: visorchannel: Adjust lines to contain a maximum of 80 characters
Bryan Thompson [Thu, 6 Nov 2014 19:13:09 +0000 (14:13 -0500)]
staging: unisys: visorchannel: Adjust lines to contain a maximum of 80 characters

Split multiple logging lines to get them closer to 80 characters per line.

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: visorchannel: Place logical continuation at the end of a line
Bryan Thompson [Thu, 6 Nov 2014 19:13:08 +0000 (14:13 -0500)]
staging: unisys: visorchannel: Place logical continuation at the end of a line

Move the || logical continuation from the start of the second line of an if statement to the end of the first line.

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: visorchannel: Remove unnecessary parentheses
Bryan Thompson [Thu, 6 Nov 2014 19:13:07 +0000 (14:13 -0500)]
staging: unisys: visorchannel: Remove unnecessary parentheses

Remove extraneous parentheses around a variable in visorchannel_funcs.c

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: visorchannel: Remove space between cast and variable
Bryan Thompson [Thu, 6 Nov 2014 19:13:06 +0000 (14:13 -0500)]
staging: unisys: visorchannel: Remove space between cast and variable

Remove the whitespace between a cast and the variable in visorchannel_funcs.c

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: visorchannel: Fix alignment issues
Bryan Thompson [Thu, 6 Nov 2014 19:13:05 +0000 (14:13 -0500)]
staging: unisys: visorchannel: Fix alignment issues

Use the appropriate whitespace for multiline statements in visorchannel_funcs.c

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: visorchannel: Remove multiple blank lines
Bryan Thompson [Thu, 6 Nov 2014 19:13:04 +0000 (14:13 -0500)]
staging: unisys: visorchannel: Remove multiple blank lines

Remove the instances of multiple blank lines in the visorchannel files.

Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: das800: use comedi_async 'scans_done' to detect EOA
H Hartley Sweeten [Wed, 5 Nov 2014 17:21:09 +0000 (10:21 -0700)]
staging: comedi: das800: use comedi_async 'scans_done' to detect EOA

Remove the private data member 'count' and use the comedi_async 'scans_done'
member to detect the end-of-acquisition.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: addi_apci_3120: use comedi_async 'scans_done' to detect EOA
H Hartley Sweeten [Wed, 5 Nov 2014 17:21:08 +0000 (10:21 -0700)]
staging: comedi: addi_apci_3120: use comedi_async 'scans_done' to detect EOA

Remove the private data member 'ai_AiActualScan' and use the comedi_async
'scans_done' member to detect the end-of-acquisition.

The function v_APCI3120_InterruptDmaMoveBlock16bit() is then just a wrapper
for comedi_buf_write_samples(). Remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: usbduxsigma: use comedi_async 'scans_done' to detect AI EOA
H Hartley Sweeten [Wed, 5 Nov 2014 17:21:07 +0000 (10:21 -0700)]
staging: comedi: usbduxsigma: use comedi_async 'scans_done' to detect AI EOA

Remove the private data member 'ai_sample_count' and use the comedi_async
'scans_done' member to detect the analog input end-of-acquisition.

Move the EOA check so it happens after adding the samples from the current
urb to the async buffer. This prevents the unnecessary resubmit of the urb
when the EOA occurs.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: usbduxsigma: use comedi_async 'scans_done' to detect AO EOA
H Hartley Sweeten [Wed, 5 Nov 2014 17:21:06 +0000 (10:21 -0700)]
staging: comedi: usbduxsigma: use comedi_async 'scans_done' to detect AO EOA

Remove the private data member 'ao_sample_count' and use the comedi_async
'scans_done' member to detect the analog output end-of-acquisition.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: usbdux: use comedi_async 'scans_done' to detect AI EOA
H Hartley Sweeten [Wed, 5 Nov 2014 17:21:05 +0000 (10:21 -0700)]
staging: comedi: usbdux: use comedi_async 'scans_done' to detect AI EOA

Remove the private data member 'ai_sample_count' and use the comedi_async
'scans_done' member to detect the analog input end-of-acquisition.

Move the EOA check so it happens after adding the samples from the current
urb to the async buffer. This prevents the unnecessary resubmit of the urb
when the EOA occurs.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: usbdux: use comedi_async 'scans_done' to detect AO EOA
H Hartley Sweeten [Wed, 5 Nov 2014 17:21:04 +0000 (10:21 -0700)]
staging: comedi: usbdux: use comedi_async 'scans_done' to detect AO EOA

Remove the private data member 'ao_sample_count' and use the comedi_async
'scans_done' member to detect the analog output end-of-acquisition.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: s626: use comedi_async 'scans_done' to detect EOA
H Hartley Sweeten [Wed, 5 Nov 2014 17:21:03 +0000 (10:21 -0700)]
staging: comedi: s626: use comedi_async 'scans_done' to detect EOA

Remove the private data member 'ai_sample_count' and use the comedi_async
'scans_done' member to detect the end-of-acquisition.

Also, remove the unnecessary COMEDI_CB_EOS event. The core automatically
detects and adds that event.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pcmuio: use comedi_async 'scans_done' to detect EOA
H Hartley Sweeten [Wed, 5 Nov 2014 17:21:02 +0000 (10:21 -0700)]
staging: comedi: pcmuio: use comedi_async 'scans_done' to detect EOA

Remove the private data member 'stop_count' and use the comedi_async 'scans_done'
member to detect the end-of-acquisition.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pcmmio: use comedi_async 'scans_done' to detect EOA
H Hartley Sweeten [Wed, 5 Nov 2014 17:21:01 +0000 (10:21 -0700)]
staging: comedi: pcmmio: use comedi_async 'scans_done' to detect EOA

Remove the private data member 'count' and use the comedi_async 'scans_done'
member to detect the end-of-acquisition.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: adv_pci1710: use comedi_async 'scans_done' to detect EOA
H Hartley Sweeten [Wed, 5 Nov 2014 17:21:00 +0000 (10:21 -0700)]
staging: comedi: adv_pci1710: use comedi_async 'scans_done' to detect EOA

Remove the private data member 'ai_act_scan' and use the comedi_async
'scans_done' member to detect the end-of-acquisition.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pcl818: use comedi_async 'scans_done' to detect EOA
H Hartley Sweeten [Wed, 5 Nov 2014 17:20:59 +0000 (10:20 -0700)]
staging: comedi: pcl818: use comedi_async 'scans_done' to detect EOA

Remove the private data member 'ai_act_scan' and use the comedi_async
'scans_done' member to detect the end-of-acquisition.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pcl818: remove private data member 'ai_act_chan'
H Hartley Sweeten [Wed, 5 Nov 2014 17:20:58 +0000 (10:20 -0700)]
staging: comedi: pcl818: remove private data member 'ai_act_chan'

This member of the private data is set to '0' but never used. Remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pcl816: use comedi_async 'scans_done' to detect EOA
H Hartley Sweeten [Wed, 5 Nov 2014 17:20:57 +0000 (10:20 -0700)]
staging: comedi: pcl816: use comedi_async 'scans_done' to detect EOA

Remove the private data member 'ai_act_scan' and use the comedi_async
'scans_done' member to detect the end-of-acquisition.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pcl812: use comedi_async 'scans_done' to detect EOA
H Hartley Sweeten [Wed, 5 Nov 2014 17:20:56 +0000 (10:20 -0700)]
staging: comedi: pcl812: use comedi_async 'scans_done' to detect EOA

Remove the private data member 'ai_act_scan' and use the comedi_async
'scans_done' member to detect the end-of-acquisition.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pcl711: use comedi_async 'scans_done' to detect EOA
H Hartley Sweeten [Wed, 5 Nov 2014 17:20:55 +0000 (10:20 -0700)]
staging: comedi: pcl711: use comedi_async 'scans_done' to detect EOA

Remove the private data member 'ntrig' and use the comedi_async 'scans_done'
member to detect the end-of-acquisition.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: amplc_dio200_common: use comedi_async 'scans_done' to detect EOA
H Hartley Sweeten [Wed, 5 Nov 2014 17:20:54 +0000 (10:20 -0700)]
staging: comedi: amplc_dio200_common: use comedi_async 'scans_done' to detect EOA

Remove the private data member 'stopcount' and use the comedi_async 'scans_done'
member to detect the end-of-acquisition.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: addi_apci_2032: use comedi_async 'scans_done' to detect EOA
H Hartley Sweeten [Wed, 5 Nov 2014 17:20:53 +0000 (10:20 -0700)]
staging: comedi: addi_apci_2032: use comedi_async 'scans_done' to detect EOA

Remove the private data member 'stop_count' and use the comedi_async 'scans_done'
member to detect the end-of-acquisition.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: comedidev.h: add 'scans_done' member to comedi_async
H Hartley Sweeten [Wed, 5 Nov 2014 17:20:52 +0000 (10:20 -0700)]
staging: comedi: comedidev.h: add 'scans_done' member to comedi_async

Introduce a new member to comedi_async to count the number of scans completed.
This member is cleared by comedi_buf_reset() along with the other comedi_async
members. It is incremented in comedi_inc_scan_progress() when the end of scan
is detected.

This member will be used to clean up the scan counting in the comedi drivers.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: panel: Fix single-open policy race condition
Mariusz Gorski [Tue, 4 Nov 2014 21:47:19 +0000 (22:47 +0100)]
staging: panel: Fix single-open policy race condition

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 <marius.gorski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: change tx wake queue
Malcolm Priestley [Tue, 4 Nov 2014 14:49:46 +0000 (14:49 +0000)]
staging: vt6655: change tx wake queue

Wake queue in the dwIsr loop of device_intr instead of device_tx_srv.

This fixes an issue when ISR_TXDMA0 or ISR_AC0DMA does not occur
device_tx_srv is not called and the queue gets stuck in stopped
condition.

On test if the queue is stuck another MACvTransmitAC0 or MACvTransmit0
in vnt_tx_packet will clear it.

Check on vif that both buffers are available and the queue is stopped.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: imx-drm: remove old FSF address from license text
Philipp Zabel [Tue, 4 Nov 2014 10:52:48 +0000 (11:52 +0100)]
staging: imx-drm: remove old FSF address from license text

Linux already includes a copy of the GPL, checkpatch compains about the address.
Remove it from the license text.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: add ioctls to set per-file read and write subdevice
Ian Abbott [Tue, 4 Nov 2014 18:09:01 +0000 (18:09 +0000)]
staging: comedi: add ioctls to set per-file read and write subdevice

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" ("write") command on the previous subdevice (if any).

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: prepare support for per-file read and write subdevices
Ian Abbott [Tue, 4 Nov 2014 18:09:00 +0000 (18:09 +0000)]
staging: comedi: prepare support for per-file read and write subdevices

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 subdevices that support asynchronous commands.

The Comedi core provides a somewhat clunky mechanism to provide access
to the asynchronous command support of the non-default subdevices.  When
a low-level device is "attached" to a core Comedi device, it dynamically
allocates a minor device number for each of the subdevices that support
asynchrounous commands and associates them with files created in SysFS
named "comediX_subdY", where "X" is the minor device number of the main
comedi device, and "Y" is the subdevice number.  An application can open
these subdevice-specific files and they behave like the regular
"comediX" files except that the "read" and/or "write" subdevice may be
different to the default chosen by the low-level driver.

This patch adds a layer of indirection between the file object and the
comedi device object to allow the current "read" and/or "write"
subdevice to be altered after opening the Comedi device, on a per-file
object basis.  The advantage is that an application only needs to open
the main Comedi device file and can then choose which subdevice it wants
to "read" or "write".  The main Comedi device file can be opened more
than once, and each file object can choose the "read" and "write"
subdevices independently.

The new `struct comedi_file` is created on "open" and freed on
"release".  It includes pointers to the main Comedi device structure,
and to the current "read" and "write" subdevice structures (which may be
NULL).  It also has information to keep track of when a low-level device
has been attached or detached since the previous time the file object
was used.  In that case, the current "read" and "write" subdevices in
the `struct comedi_file` will be changed to the new defaults (or set to
NULL).  (The change to new defaults is done by `comedi_file_reset()`.
The checking for attach/detach is done by `comedi_file_check()` which
will call `comedi_file_reset()` if there have been any attach/detach
operations since the previous call.)

A subsequent patch will add the ioctls to change the current "read" and
"write" subdevices.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: media: lirc: modify print calls
Aya Mahfouz [Tue, 4 Nov 2014 21:43:07 +0000 (23:43 +0200)]
staging: media: lirc: modify print calls

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 <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: dgap: remove unnecessary function
Daeseok Youn [Wed, 5 Nov 2014 08:58:11 +0000 (17:58 +0900)]
staging: dgap: remove unnecessary function

The dgap_init_global() initialize the dgap_board
that is a global variable as static and dgap_poll_timer.
But init_timer() is called twice in dgap_start() and dgap_board
doesn't need to be initialized to NULL.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655 baseband.c camel case replace pDevice -> priv
Malcolm Priestley [Wed, 5 Nov 2014 21:08:59 +0000 (21:08 +0000)]
staging: vt6655 baseband.c camel case replace pDevice -> priv

for struct vnt_private

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: device.h remove dead member wstats
Malcolm Priestley [Wed, 5 Nov 2014 21:08:58 +0000 (21:08 +0000)]
staging: vt6655: device.h remove dead member wstats

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: device_set_options remove dead variables
Malcolm Priestley [Wed, 5 Nov 2014 21:08:57 +0000 (21:08 +0000)]
staging: vt6655: device_set_options remove dead variables

uConnectionRate
wRTSThreshold
byOpMode
b11hEnable
uChannel

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: baseband.c/h remove dead functions
Malcolm Priestley [Wed, 5 Nov 2014 21:08:56 +0000 (21:08 +0000)]
staging: vt6655: baseband.c/h remove dead functions

These functions are not used so remove them
BBbIsRegBitsOn
BBbIsRegBitsOff
BBvReadAllRegs
BBvLoopbackOn
BBvLoopbackOff

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: device_init_registers remove uConnectionRate
Malcolm Priestley [Wed, 5 Nov 2014 21:08:55 +0000 (21:08 +0000)]
staging: vt6655: device_init_registers remove uConnectionRate

The device starts up with a default rate of 54M

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: device_set_options remove unused ethernet addresses
Malcolm Priestley [Wed, 5 Nov 2014 21:08:54 +0000 (21:08 +0000)]
staging: vt6655: device_set_options remove unused ethernet addresses

Removing these variables
abyBroadcastAddr
abySNAP_RFC1042
abySNAP_Bridgetunnel

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: device_get_options remove unused device parameters
Malcolm Priestley [Wed, 5 Nov 2014 21:08:53 +0000 (21:08 +0000)]
staging: vt6655: device_get_options remove unused device parameters

IP_byte_align
Channel
PreambleType
RTSThreshold
ConnectionRate
OPMode
b80211hEnable

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: remove fragmentation from driver
Malcolm Priestley [Wed, 5 Nov 2014 21:08:52 +0000 (21:08 +0000)]
staging: vt6655: remove fragmentation from driver

fragmentation is now handled by mac80211.

Remove functions
device_alloc_frag_buf
device_init_defrag_cb
device_free_frag_buf

Removing
typedef struct tagSDeFragControlBlock
frag_thresh
sRxDFCB
cbDFCB;
cbFreeDFCB;
uCurrentDFCBIdx;

macros
FRAG_THRESH_MIN
FRAG_THRESH_MAX

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: mac.c and mac.h remove dead functions.
Malcolm Priestley [Wed, 5 Nov 2014 21:08:51 +0000 (21:08 +0000)]
staging: vt6655: mac.c and mac.h remove dead functions.

MACvReadAllRegs
MACbyReadMultiAddr
MACvWriteMultiAddr
MACvSetMultiAddrByHash
MACvResetMultiAddrByHash
MACvSetRxThreshold
MACvGetRxThreshold
MACvSetTxThreshold
MACvGetTxThreshold
MACvSetDmaLength
MACvGetDmaLength
MACvGetLongRetryLimit
MACbIsInLoopbackMode
MACbCompareContext
MACvOneShotTimer0MicroSec
MACbTxDMAOff
MACvClearBusSusInd
MACvEnableBusSusEn
MACbFlushSYNCFifo
MACvSetDefaultKeyEntry
MACvEnableDefaultKey
MACvDisableDefaultKey
MACvSetDefaultTKIPKeyEntry
MACvSetDefaultKeyCtl

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: mac.c/h remove member type comments
Malcolm Priestley [Wed, 5 Nov 2014 21:08:50 +0000 (21:08 +0000)]
staging: vt6655: mac.c/h remove member type comments

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6655: mac remove dead variable TxRate_iwconfig
Malcolm Priestley [Wed, 5 Nov 2014 21:08:49 +0000 (21:08 +0000)]
staging: vt6655: mac remove dead variable TxRate_iwconfig

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: remove unused functions from uislib.c
Benjamin Romer [Wed, 5 Nov 2014 17:47:50 +0000 (12:47 -0500)]
staging: unisys: remove unused functions from uislib.c

Delete uislib_client_add_vnic() and uislib_client_delete_vnic(), since these
are never used.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: Remove extra blank lines from virthba files
Ken Depro [Wed, 5 Nov 2014 15:57:57 +0000 (10:57 -0500)]
staging: unisys: Remove extra blank lines from virthba files

This patch removes extra blank lines from the virthba header and source
files.  This is the first of a set of patches that will clean up the
virthba source file.  The only checkpatch issue in the header file was
the blank line warnings.

Signed-off-by: Ken Depro <kenneth.depro@unisys.com>
Signed-off-by: Ben Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: virtpci: Remove GET_BUS_DEV macro
Bryan Thompson [Tue, 4 Nov 2014 21:13:17 +0000 (16:13 -0500)]
staging: unisys: virtpci: Remove GET_BUS_DEV macro

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 <bryan.thompson@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: refactor visorutil_mod_init()
Benjamin Romer [Tue, 4 Nov 2014 16:25:25 +0000 (11:25 -0500)]
staging: unisys: refactor visorutil_mod_init()

Fix the function name declaration so it is just one line, and add the missing
brackets to the else clause in the if statement.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: refactor visorutil_spar_detect()
Benjamin Romer [Tue, 4 Nov 2014 16:25:24 +0000 (11:25 -0500)]
staging: unisys: refactor visorutil_spar_detect()

Fix the declaration line so it is just one single line, and add the missing
brackets on the else clause in the if statement.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: fix spacing in visorkmodutils.c
Benjamin Romer [Tue, 4 Nov 2014 16:25:23 +0000 (11:25 -0500)]
staging: unisys: fix spacing in visorkmodutils.c

Remove all the extraneous blank lines from visorkmodutils.c.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: fix bracketing in visor_periodic_work_stop()
Benjamin Romer [Tue, 4 Nov 2014 16:25:22 +0000 (11:25 -0500)]
staging: unisys: fix bracketing in visor_periodic_work_stop()

The last if statement in this function is missing brackets on the else
clause. Add them.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: fix spacing in periodic_work.c
Benjamin Romer [Tue, 4 Nov 2014 16:25:21 +0000 (11:25 -0500)]
staging: unisys: fix spacing in periodic_work.c

Get rid of all extraneous blank lines in periodic_work.c.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: fix sizeof() in visor_memregion_create_overlapped()
Benjamin Romer [Tue, 4 Nov 2014 16:25:20 +0000 (11:25 -0500)]
staging: unisys: fix sizeof() in visor_memregion_create_overlapped()

Use the variable name rather than the type in the sizeof() call in this
function.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: fix line over 80 characters in mapit()
Benjamin Romer [Tue, 4 Nov 2014 16:25:19 +0000 (11:25 -0500)]
staging: unisys: fix line over 80 characters in mapit()

The error output in mapit() in memregion_direct.c has variables past the 80
character limit. Move them to the next line, but the string constant will still
go past the limit, and that's okay.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: remove extra blank lines in memregion_direct.c
Benjamin Romer [Tue, 4 Nov 2014 16:25:18 +0000 (11:25 -0500)]
staging: unisys: remove extra blank lines in memregion_direct.c

Get rid of the extra blank lines in this file.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: remove unnecessary spaces in casts in memregion_direct.c
Benjamin Romer [Tue, 4 Nov 2014 16:25:17 +0000 (11:25 -0500)]
staging: unisys: remove unnecessary spaces in casts in memregion_direct.c

Get rid of all extra spaces between casts and their targets in this file.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: refactor visor_memregion_create()
Benjamin Romer [Tue, 4 Nov 2014 16:25:16 +0000 (11:25 -0500)]
staging: unisys: refactor visor_memregion_create()

Fix the sizeof() so it uses the variable name rather than the type, fix the
argument alignment to the kzalloc(), and rename the goto label.

Away => cleanup

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: remove typedef for MEMREGION
Benjamin Romer [Tue, 4 Nov 2014 16:25:15 +0000 (11:25 -0500)]
staging: unisys: remove typedef for MEMREGION

Remove the typedef for this structure and just use struct memregion instead.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: split double assignment in visor_charqueue_create()
Benjamin Romer [Tue, 4 Nov 2014 16:25:13 +0000 (11:25 -0500)]
staging: unisys: split double assignment in visor_charqueue_create()

Split up the doubled assignment in visor_charqueue_create() into two separate
assignments.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: refactor CHARQUEUE
Benjamin Romer [Tue, 4 Nov 2014 16:25:12 +0000 (11:25 -0500)]
staging: unisys: refactor CHARQUEUE

Remove the typedef and just use struct charqueue instead. Update all references.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: fix line spacing in charqueue.c
Benjamin Romer [Tue, 4 Nov 2014 16:25:11 +0000 (11:25 -0500)]
staging: unisys: fix line spacing in charqueue.c

Clean up the extraneous blank lines in charqueue.c.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoMerge tag 'iio-for-3.19a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23...
Greg Kroah-Hartman [Wed, 5 Nov 2014 19:42:48 +0000 (11:42 -0800)]
Merge tag 'iio-for-3.19a' of git://git./linux/kernel/git/jic23/iio into staging-next

Jonathan writes:

First round of new drivers, features and cleanups for IIO in the 3.19 cycle.

New drivers / supported parts
* rockchip - rk3066-tsadc variant
* si7020 humidity and temperature sensor
* mcp320x - add mcp3001, mcp3002, mcp3004, mcp3008, mcp3201, mcp3202
* bmp280 pressure and temperature sensor
* Qualcomm SPMI PMIC current ADC driver
* Exynos_adc - support exynos7

New features
* vf610-adc - add temperature sensor support
* Documentation of current attributes, scaled pressure, offset and
  scaled humidity, RGBC intensity gain factor and scale applied to
  differential voltage channels.
* Bring iio_event_monitor up to date with newer modifiers.
* Add of_xlate function to allow for complex channel mappings from the
  device tree.
* Add -g parameter to generic_buffer example to allow for devices with
  directly fed (no trigger) buffers.
* Move exynos driver over to syscon for PMU register access.

Cleanups, fixes for new drivers
* lis3l02dq drop an unneeded else.
* st sensors - renam st_sensors to st_sensor_settings (for clarity)
* st sensors - drop an unused parameter from all the probe utility
  functions.
* vf610 better error handling and tidy up.
* si7020 - cleanups following merge
* as3935 - drop some unnecessary semicolons.
* bmp280 - fix the pressure calculation.

10 years agoiio: Add ABI documentation for scaled voltage
Darshana Padmadas [Wed, 5 Nov 2014 16:18:11 +0000 (21:48 +0530)]
iio: Add ABI documentation for scaled voltage

This patch adds an entry in ABI documentation for in_voltage-voltage_scale.
It has at least one user driver, adis16220, in accel driver.

Signed-off-by: Darshana Padmadas <darshanapadmadas@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
10 years agoiio:pressure:bmp280: fix pressure calculation
Hartmut Knaack [Fri, 31 Oct 2014 01:22:00 +0000 (01:22 +0000)]
iio:pressure:bmp280: fix pressure calculation

According to the datasheet and as defined in struct bmp280_comp_press, dig_p1 is
of type u16, while dig_p2 to dig_p9 are of type s16. In
bmp280_read_compensation_press(), values read from the device were treated as
the wrong type.
In bmp280_read_press() the fractional part of the measured pressure is
calculated wrong. A better way is to use *val for the raw pressure and *val2 for
the quotient and let the core do the proper conversion using IIO_VAL_FRACTIONAL.

Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
Acked-by: Vlad Dogaru <vlad.dogaru@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
10 years agoiio: adc: exynos_adc: Add support for exynos7
Abhilash Kesavan [Sat, 1 Nov 2014 04:00:43 +0000 (09:30 +0530)]
iio: adc: exynos_adc: Add support for exynos7

The ADC on exynos7 is quite similar to ADCv2. The differences are as
follows:
- exynos7-adc has 8 input channels (as against 10 in ADCv2).
- exynos7 does not include an ADC PHY control register.
- Some ADC_CON2 register bits being used in ADCv2 are listed as
  reserved in exynos7-adc. This results in a different init_hw
  function for exynos7.

Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
10 years agoARM: dts: exynos: Add sysreg phandle to ADC node
Naveen Krishna Chatradhi [Tue, 16 Sep 2014 08:58:00 +0000 (09:58 +0100)]
ARM: dts: exynos: Add sysreg phandle to ADC node

Instead of using the ADC_PHY register base address, use sysreg phandle
in ADC node to control ADC_PHY configuration register.

This patch adds syscon node for Exynos3250, Exynos4x12, Exynos5250,
and Exynos5420, Exynos5800.

Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
To: linux-samsung-soc@vger.kernel.org
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
10 years agoDocumentation: dt-bindings: update exynos-adc.txt with syscon handle
Naveen Krishna Chatradhi [Tue, 16 Sep 2014 08:58:00 +0000 (09:58 +0100)]
Documentation: dt-bindings: update exynos-adc.txt with syscon handle

This patch updates the DT bindings for ADC in exynos-adc.txt with the
syscon phandle to the ADC nodes.

Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
To: devicetree@vger.kernel.org
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
10 years agoiio: exyno-adc: use syscon for PMU register access
Naveen Krishna Chatradhi [Tue, 16 Sep 2014 08:58:00 +0000 (09:58 +0100)]
iio: exyno-adc: use syscon for PMU register access

This patch updates the IIO based ADC driver to use syscon and regmap
APIs to access and use PMU registers instead of remapping the PMU
registers in the driver.

Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
To: linux-iio@vger.kernel.org
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
10 years agostaging: iio: Add notrigger mode for generic_buffer
Karol Wrona [Tue, 4 Nov 2014 14:29:39 +0000 (15:29 +0100)]
staging: iio: Add notrigger mode for generic_buffer

Some IIO devices do not use the triggers. This patch makes trigger setting
conditional so generic_buffer can be used when triggers are disabled.

Signed-off-by: Karol Wrona <k.wrona@samsung.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
10 years agoiio: as3935: Remove unnecessary semicolons
George McCollister [Fri, 31 Oct 2014 15:44:23 +0000 (10:44 -0500)]
iio: as3935: Remove unnecessary semicolons

Signed-off-by: George McCollister <george.mccollister@gmail.com>
Acked-by: Hartmut Knaack <knaack.h@gmx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
10 years agostaging: rtl8188eu: Fix coding style space related ERROR problems
Jia He [Tue, 4 Nov 2014 01:39:58 +0000 (09:39 +0800)]
staging: rtl8188eu: Fix coding style space related ERROR problems

This fixes space related ERROR reports by checkpatch.pl
Generated by $ git ls-files "drivers/staging/rtl8188eu/*.[ch]" | \
  xargs ./scripts/checkpatch.pl -f --fix-inplace --strict --types=SPACING
Already checked by text comparasion
$git diff -w
and binary comparasion of r8188eu.ko
$objdiff diff <old_commit> <new_commit>

Signed-off-by: Jia He <hejianet@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: ft1000: Logging message neatening
Joe Perches [Tue, 4 Nov 2014 00:25:44 +0000 (16:25 -0800)]
staging: ft1000: Logging message neatening

Use a more common logging style.

o Convert DEBUG macros to pr_debug
o Add pr_fmt
o Remove embedded function names from pr_debug
o Convert printks to pr_<level>
o Coalesce formats and align arguments
o Add missing terminating newlines

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: ft1000: Whitespace neatening
Joe Perches [Tue, 4 Nov 2014 00:25:43 +0000 (16:25 -0800)]
staging: ft1000: Whitespace neatening

Use normal kernel style, indentation and alignment.

git diff -w shows no difference

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: drivers: comedi_bond.c: Remove unneeded #define
Rickard Strandqvist [Sun, 2 Nov 2014 22:12:04 +0000 (23:12 +0100)]
staging: comedi: drivers: comedi_bond.c: Remove unneeded #define

Remove unneeded #define. This was previously included in a patch set
two but patchset one was taken by mistake.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: ni_at_a2150: use sample manipulation helpers
H Hartley Sweeten [Fri, 31 Oct 2014 19:04:36 +0000 (12:04 -0700)]
staging: comedi: ni_at_a2150: use sample manipulation helpers

Use the recently added sample manipulation helpers to remove the hardcoded
assumption of the sample size.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: hwdrv_apci3120: use sample manipulation helpers
H Hartley Sweeten [Fri, 31 Oct 2014 19:04:35 +0000 (12:04 -0700)]
staging: comedi: hwdrv_apci3120: use sample manipulation helpers

Use the recently added sample manipulation helpers to remove the hardcoded
assumption of the sample size.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: adl_pci9111: use sample manipulation helpers
H Hartley Sweeten [Fri, 31 Oct 2014 19:04:34 +0000 (12:04 -0700)]
staging: comedi: adl_pci9111: use sample manipulation helpers

Use the recently added sample manipulation helpers to remove the hardcoded
assumption of the sample size.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: adl_pci9118: use sample manipulation helpers
H Hartley Sweeten [Fri, 31 Oct 2014 19:04:33 +0000 (12:04 -0700)]
staging: comedi: adl_pci9118: use sample manipulation helpers

Use the recently added sample manipulation helpers to remove the hardcoded
assumption of the sample size.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: adv_pci1710: use sample manipulation helpers
H Hartley Sweeten [Fri, 31 Oct 2014 19:04:32 +0000 (12:04 -0700)]
staging: comedi: adv_pci1710: use sample manipulation helpers

Use the recently added sample manipulation helpers to remove the hardcoded
assumption of the sample size.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: das16: use sample manipulation helpers
H Hartley Sweeten [Fri, 31 Oct 2014 19:04:31 +0000 (12:04 -0700)]
staging: comedi: das16: use sample manipulation helpers

Use the recently added sample manipulation helpers to remove the hardcoded
assumption of the sample size.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: das1800: use sample manipulation helpers
H Hartley Sweeten [Fri, 31 Oct 2014 19:04:30 +0000 (12:04 -0700)]
staging: comedi: das1800: use sample manipulation helpers

Use the recently added sample manipulation helpers to remove the hardcoded
assumption of the sample size.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: ni_mio_common: use sample manipulation helpers
H Hartley Sweeten [Fri, 31 Oct 2014 19:04:29 +0000 (12:04 -0700)]
staging: comedi: ni_mio_common: use sample manipulation helpers

Use the recently added sample manipulation helpers to remove the hardcoded
assumption of the sample size.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: remove use of 'bytes_per_sample()'
H Hartley Sweeten [Fri, 31 Oct 2014 19:04:28 +0000 (12:04 -0700)]
staging: comedi: remove use of 'bytes_per_sample()'

This inline helper function has been replaced with comedi_bytes_per_sample().
The same commit (bf33eb4b4f57) introduced a couple other related helper
functions a manipulate the sample size.

Use the new helper functions to remove the use of 'bytes_per_sample()' and
remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: amplc_pci230: remove private data 'ai_scan_pos'
H Hartley Sweeten [Fri, 31 Oct 2014 16:49:32 +0000 (09:49 -0700)]
staging: comedi: amplc_pci230: remove private data 'ai_scan_pos'

This member of the private data is replicating what the comedi_async
'cur_chan' member is used for. Use that instead and remove the private
data member.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: drivers: move comedi_async 'cur_chan' tracking into the core
H Hartley Sweeten [Fri, 31 Oct 2014 16:49:31 +0000 (09:49 -0700)]
staging: comedi: drivers: move comedi_async 'cur_chan' tracking into the core

The commedi_async 'cur_chan' member is used to track the current position
in the chanlist for a scan. Currently only a couple comedi drivers use
this member.

For aeshtetics, move the 'cur_chan' tracking into the core for non-SDF_PACKED
subdevices. The 'cur_chan' will be updated after reading or writing samples
to the async buffer by comedi_inc_scan_progress(). All non-SDF_PACKED subdevices
will then automatiaclly track the 'cur_chan'.

Some of the drivers use the 'cur_chan' to detect the end of scan event when
counting scans. The COMEDI_CB_EOS event is automatically added by the core
when the end of scan is detected. The drivers just need to check if the
'cur_chan' is 0 to count the number of scans completed.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: ni_mio_common: remove unused variable in ni_ao_fifo_load()
H Hartley Sweeten [Fri, 31 Oct 2014 16:49:30 +0000 (09:49 -0700)]
staging: comedi: ni_mio_common: remove unused variable in ni_ao_fifo_load()

The local variable 'range' is set but never used. Remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: icp_multi: correct insn_bits returned data for DO
Ian Abbott [Fri, 31 Oct 2014 14:32:27 +0000 (14:32 +0000)]
staging: comedi: icp_multi: correct insn_bits returned data for DO

For some unfathomable reason, the Comedi `insn_bits` handler for the
digital output subdevice (`icp_multi_insn_bits_do()`) writes the digital
output register and reads back the unrelated digital input register.
Read back the current state of the outputs (held in `s->state`) instead.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: rtd520: remove private data 'chan_is_bipolar' member
H Hartley Sweeten [Thu, 30 Oct 2014 18:32:29 +0000 (11:32 -0700)]
staging: comedi: rtd520: remove private data 'chan_is_bipolar' member

Currently this driver uses a bitmap in the private data to keep track of
the unipolar/bipolar range for each channel. This is needed to determine
if the data needs to be munged for bipolar samples.

Remove this member from the private data and use the comedi core helper
function comedi_range_is_bipolar() to determine if the data needs to be
munged.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: rtd520: fix ai_read_n() async->cur_chan use
H Hartley Sweeten [Thu, 30 Oct 2014 18:32:28 +0000 (11:32 -0700)]
staging: comedi: rtd520: fix ai_read_n() async->cur_chan use

This functions uses the async->cur_chan to determine if the current channel
is using a bipolar range and the sample needs to be munged. The cur_chan is
never incremented so all the samples are munged based on the fist channel
in the cmd->chanlist.

Bump the cur_chan after writing each sample. This fixes the code so that
the munging will be done correctly.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: drivers do not need to reset the async->cur_chan
H Hartley Sweeten [Thu, 30 Oct 2014 18:21:54 +0000 (11:21 -0700)]
staging: comedi: drivers do not need to reset the async->cur_chan

The comedi core calls comedi_buf_reset() before starting an async command
(*do_cmd) and after returning a subdevice to an idle state (*cancel).

The drivers do not need to reset the async->cur_chan in those functions.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: drivers: digital output subdevices do not need SDF_READABLE
H Hartley Sweeten [Thu, 30 Oct 2014 18:19:36 +0000 (11:19 -0700)]
staging: comedi: drivers: digital output subdevices do not need SDF_READABLE

The SDF_READABLE flag is not necessary for digital output subdevices. For
consistency, remove this flag from the comedi drivers that set it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: drivers: remove inappropriate SDF_* flags from subdevices
H Hartley Sweeten [Thu, 30 Oct 2014 18:19:35 +0000 (11:19 -0700)]
staging: comedi: drivers: remove inappropriate SDF_* flags from subdevices

The SDF_GROUND, SDF_COMMON, SDF_DIFF, and SDF_OTHER flags are only useful
with the analog input and output subdevices.

Remove these flags from the other subdevice types in the comedi drivers.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: drivers: replace SDF_WRITEABLE with SDF_WRITABLE
H Hartley Sweeten [Thu, 30 Oct 2014 18:19:34 +0000 (11:19 -0700)]
staging: comedi: drivers: replace SDF_WRITEABLE with SDF_WRITABLE

As indicated in the comedi.h uapi header, SDF_WRITEABLE was a spelling
error in the API, SDF_WRITABLE is prefered.

For aesthetics, replace all the SDF_WRITEABLE uses with SDF_WRITABLE.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: check actual data direction for COMEDI_BUFINFO ioctl
Ian Abbott [Thu, 30 Oct 2014 12:42:32 +0000 (12:42 +0000)]
staging: comedi: check actual data direction for COMEDI_BUFINFO ioctl

`do_bufinfo_ioctl()` handled the `COMEDI_BUFINFO` ioctl.  It is supposed
to update the read or write positions in the buffer depending on the
direction of data transfer set up by the asynchronous command.
Currently it checks the `SDF_CMD_READ` and `SDF_CMD_WRITE` subdevice
flags.  That's fine for most subdevices - the ones that only support one
direction, but is incorrect for those subdevices that allow the command
to be set up in either direction.  Since we now set the `CMDF_WRITE`
flag according to the data transfer direction of the current command
running on the subdevice, check that flag instead.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: check command direction in poll() file operation
Ian Abbott [Thu, 30 Oct 2014 12:42:31 +0000 (12:42 +0000)]
staging: comedi: check command direction in poll() file operation

`comedi_poll()` handles the poll() file operation for comedi devices.

If no asynchronous command has been set up on the current "read"
subdevice, it sets the `POLLIN` and `POLLRDNORM` bits in the return
value to indicate that the read() file operation would not block as it
would return an error.  Add a check so it also does that if the
asynchronous command has been set up in the "write" direction as that
also causes the read() file operation to return an error.

Similarly, if no asynchronous command has need set up on the current
"write" subdevice, it sets the `POLLOUT` and `POLLWRNORM` bits in the
return value to indicate that the write() file operation would not block
as it would return an error.  Add a check so it also does that if the
asynchronous command has been set up in the "read" direction as that
also causes the write() file operation to return an error.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: don't allow write() on async command set up for "read"
Ian Abbott [Thu, 30 Oct 2014 12:42:30 +0000 (12:42 +0000)]
staging: comedi: don't allow write() on async command set up for "read"

If a Comedi asynchronous command has been set up for data transfer in
the "read" direction on the current "write" subdevice (for those
subdevices that support both directions), don't allow the "write" file
operation as that would mess with the data in the comedi data buffer
that is written by the low-level comedi hardware driver.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: don't allow read() on async command set up for "write"
Ian Abbott [Thu, 30 Oct 2014 12:42:29 +0000 (12:42 +0000)]
staging: comedi: don't allow read() on async command set up for "write"

If a Comedi asynchronous command has been set up for data transfer in
the "write" direction on the current "read" subdevice (for those
subdevices that support both directions), don't allow the "read" file
operation as that would mess with the data in the comedi data buffer
that is read by the low-level comedi hardware driver.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: ni_mio_common: don't change CMDF_WRITE flag
Ian Abbott [Thu, 30 Oct 2014 12:42:28 +0000 (12:42 +0000)]
staging: comedi: ni_mio_common: don't change CMDF_WRITE flag

There is no need for `ni_ai_cmdtest()` or `ni_ao_cmdtest()` to set the
`CMDF_WRITE` flag to the correct state as it has already been done by
the core comedi module.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: me4000: don't clobber command flags
Ian Abbott [Thu, 30 Oct 2014 12:42:27 +0000 (12:42 +0000)]
staging: comedi: me4000: don't clobber command flags

The low-level Comedi drivers shouldn't change the `flags` member of
`struct comedi_cmd` as the Comedi core also uses some of those flags.
They should just ignore the flags they don't understand.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: maybe force CMDF_WRITE command flag
Ian Abbott [Thu, 30 Oct 2014 12:42:26 +0000 (12:42 +0000)]
staging: comedi: maybe force CMDF_WRITE command flag

Most comedi subdevices that support asynchronous commands only support
data transfer in either the "read" or "write" direction, as indicated by
the `SDF_CMD_READ` and `SDF_CMD_WRITE` subdevice flags, although a few
support both directions on the same subdevice (though not
simultaneously).  The `struct comedi_cmd` structure passed via ioctl
call to set up the command contains a `CMDF_WRITE` flag that can be used
to choose the direction if the subdevice supports both directions, but
the flag is optional if the subdevice only supports data transfer in one
direction.

If the subdevice only supports asynchronous data transfer in a sing
direction, set the `CMDF_WRITE` flag to the correct state so that Comedi
can make use of it later.  In the case of the `COMEDI_CMDTEST` ioctl,
the updated flag will be written back to the `struct comedi_cmd` in
user-space.  In the case of the `COMEDI_CMD` ioctl, the flag only gets
written back if an error is detected while testing the command, or if
the `CMDF_BOGUS` command flag is set.  Since `__comedi_get_user_cmd()`
is called for both ioctls, that's a good place to set the flag.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: dgap: re-arrange functions for removing forward declarations
Daeseok Youn [Fri, 31 Oct 2014 01:20:37 +0000 (10:20 +0900)]
staging: dgap: re-arrange functions for removing forward declarations

Re-arrange the functions for removing forward declarations.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Tested-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostating: rtl8723au: Eliminate write-only struct xmit_priv->txirp_cnt
Jes Sorensen [Fri, 10 Oct 2014 19:41:30 +0000 (21:41 +0200)]
stating: rtl8723au: Eliminate write-only struct xmit_priv->txirp_cnt

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>