]> git.kernelconcepts.de Git - karo-tx-linux.git/log
karo-tx-linux.git
9 years agoiio: accel: kxcjk-1013: Set adjustable range
Srinivas Pandruvada [Thu, 8 May 2014 21:58:00 +0000 (22:58 +0100)]
iio: accel: kxcjk-1013: Set adjustable range

This chip can support 3 different ranges. Allowing range specification.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: accel: kxcjk-1013: support runtime pm
Srinivas Pandruvada [Thu, 8 May 2014 21:58:00 +0000 (22:58 +0100)]
iio: accel: kxcjk-1013: support runtime pm

In an effort to improve raw read performance and at the same time enter
low power state at every possible chance.
For raw reads, it will keep the system powered on for a default or user
specified time, via autosuspend_delay attribute of device power.
This will help read multiple samples without power on/off sequence.
For triggers it will keep the system on till, requested to be turned
off by trigger state by utilizing run time PM usage counters.

When runtime pm is not enabled, then it keeps the chip in operation
mode always.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agostaging: iio: adis16060: Fix coding style problem
Oussama Jabbari [Sun, 8 Jun 2014 17:06:00 +0000 (18:06 +0100)]
staging: iio: adis16060: Fix coding style problem

This patch fixes a warning from checkpatch.pl script :
"WARNING: Missing a blank line after declarations"

Signed-off-by: Oussama Jabbari <oussama.jabbari@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: fix error return code
Julia Lawall [Sun, 8 Jun 2014 20:12:00 +0000 (21:12 +0100)]
iio: fix error return code

Convert a zero return value on error to a negative one, as returned
elsewhere in the function.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
(
if@p1 (\(ret < 0\|ret != 0\))
 { ... return ret; }
|
ret@p1 = 0
)
... when != ret = e1
    when != &ret
*if(...)
{
  ... when != ret = e2
      when forall
 return ret;
}

// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agostaging: iio: accel: Add blank lines between declarations and code
Murilo Opsfelder Araujo [Tue, 8 Jul 2014 00:22:00 +0000 (01:22 +0100)]
staging: iio: accel: Add blank lines between declarations and code

This patch adds missing blank lines between declarations and code and
fixes lines starting by spaces, satisfying checkpatch.pl.

Signed-off-by: Murilo Opsfelder Araujo <mopsfelder@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agostaging: iio: accel: sca3000_core.c: Adjust code to fit 80-chars limit
Murilo Opsfelder Araujo [Tue, 8 Jul 2014 00:22:00 +0000 (01:22 +0100)]
staging: iio: accel: sca3000_core.c: Adjust code to fit 80-chars limit

Signed-off-by: Murilo Opsfelder Araujo <mopsfelder@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agostaging: iio: adis16240: fix sparse warnings regarding incorrect argument type
Teodora Baluta [Mon, 28 Jul 2014 11:18:00 +0000 (12:18 +0100)]
staging: iio: adis16240: fix sparse warnings regarding incorrect argument type

Silence the following sparse warnings by changing cast from u16 to
__be16:

  CHECK   drivers/staging/iio/accel/adis16240_core.c
drivers/staging/iio/accel/adis16240_core.c:128:51: warning: incorrect
type in argument 3 (different signedness)
drivers/staging/iio/accel/adis16240_core.c:128:51:    expected unsigned
short [usertype] *val
drivers/staging/iio/accel/adis16240_core.c:128:51:    got signed short
*<noident>
drivers/staging/iio/accel/adis16240_core.c:142:51: warning: incorrect
type in argument 3 (different signedness)
drivers/staging/iio/accel/adis16240_core.c:142:51:    expected unsigned
short [usertype] *val
drivers/staging/iio/accel/adis16240_core.c:142:51:    got signed short
*<noident>

Signed-off-by: Teodora Baluta <teodora.baluta@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agostaging: iio: isl29018: fix sparse warning regarding incorrect type (different signed...
Teodora Baluta [Mon, 28 Jul 2014 11:18:00 +0000 (12:18 +0100)]
staging: iio: isl29018: fix sparse warning regarding incorrect type (different signedness)

Fix the following sparse warning:

drivers/staging/iio/light/isl29018.c:508:50: warning: incorrect type in
argument 3 (different signedness)
drivers/staging/iio/light/isl29018.c:508:50:    expected unsigned int
*conf_adc_bit
drivers/staging/iio/light/isl29018.c:508:50:    got int *<noident>

Signed-off-by: Teodora Baluta <teodora.baluta@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agostaging: iio: hmc5843_core: fix sparse warnings
Teodora Baluta [Mon, 28 Jul 2014 11:18:00 +0000 (12:18 +0100)]
staging: iio: hmc5843_core: fix sparse warnings

Fix the following sparse warnings:

 CHECK   drivers/staging/iio/magnetometer/hmc5843_core.c
drivers/staging/iio/magnetometer/hmc5843_core.c:138:70: warning:
incorrect type in argument 3 (different signedness)
drivers/staging/iio/magnetometer/hmc5843_core.c:138:70:    expected
unsigned int *val
drivers/staging/iio/magnetometer/hmc5843_core.c:138:70:    got int
*<noident>
drivers/staging/iio/magnetometer/hmc5843_core.c:215:64: warning:
incorrect type in argument 3 (different signedness)
drivers/staging/iio/magnetometer/hmc5843_core.c:215:64:    expected
unsigned int *val
drivers/staging/iio/magnetometer/hmc5843_core.c:215:64:    got int
*<noident>
drivers/staging/iio/magnetometer/hmc5843_core.c:354:72: warning:
incorrect type in argument 3 (different signedness)
drivers/staging/iio/magnetometer/hmc5843_core.c:354:72:    expected
unsigned int *val
drivers/staging/iio/magnetometer/hmc5843_core.c:354:72:    got int
*<noident>
drivers/staging/iio/magnetometer/hmc5843_core.c:362:72: warning:
incorrect type in argument 3 (different signedness)
drivers/staging/iio/magnetometer/hmc5843_core.c:362:72:    expected
unsigned int *val
drivers/staging/iio/magnetometer/hmc5843_core.c:362:72:    got int
*<noident>

Signed-off-by: Teodora Baluta <teodora.baluta@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: buffer: Coalesce adjacent demux table entries
Lars-Peter Clausen [Thu, 17 Jul 2014 15:59:00 +0000 (16:59 +0100)]
iio: buffer: Coalesce adjacent demux table entries

When copying multiple multiple samples that are adjacent in both the source as
well as the destination buffer, instead of creating a new demux table entry for
each sample just increase the length of the previous entry by the size of the
new sample. This makes the demuxing process slightly more efficient.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: buffer: Use roundup() instead of open-coding it
Lars-Peter Clausen [Thu, 17 Jul 2014 15:59:00 +0000 (16:59 +0100)]
iio: buffer: Use roundup() instead of open-coding it

Makes the code slightly shorter and a bit easier to understand.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agostaging: iio: ad5933: fix sparse warnings
Teodora Baluta [Fri, 25 Jul 2014 08:50:00 +0000 (09:50 +0100)]
staging: iio: ad5933: fix sparse warnings

Fix the following sparse warnings:

  CHECK   drivers/staging/iio/impedance-analyzer/ad5933.c
drivers/staging/iio/impedance-analyzer/ad5933.c:241:17: warning:
incorrect type in assignment (different base types)
drivers/staging/iio/impedance-analyzer/ad5933.c:241:17:    expected
unsigned int [unsigned] [usertype] d32
drivers/staging/iio/impedance-analyzer/ad5933.c:241:17:    got
restricted __be32 [usertype] <noident>
drivers/staging/iio/impedance-analyzer/ad5933.c:263:13: warning:
incorrect type in assignment (different base types)
drivers/staging/iio/impedance-analyzer/ad5933.c:263:13:    expected
unsigned short [unsigned] dat
drivers/staging/iio/impedance-analyzer/ad5933.c:263:13:    got
restricted __be16 [usertype] <noident>
drivers/staging/iio/impedance-analyzer/ad5933.c:271:13: warning:
incorrect type in assignment (different base types)
drivers/staging/iio/impedance-analyzer/ad5933.c:271:13:    expected
unsigned short [unsigned] [addressable] dat
drivers/staging/iio/impedance-analyzer/ad5933.c:271:13:    got
restricted __be16 [usertype] <noident>
drivers/staging/iio/impedance-analyzer/ad5933.c:310:19: warning: cast to
restricted __be32
drivers/staging/iio/impedance-analyzer/ad5933.c:310:19: warning: cast to
restricted __be32
drivers/staging/iio/impedance-analyzer/ad5933.c:310:19: warning: cast to
restricted __be32
drivers/staging/iio/impedance-analyzer/ad5933.c:310:19: warning: cast to
restricted __be32
drivers/staging/iio/impedance-analyzer/ad5933.c:310:19: warning: cast to
restricted __be32
drivers/staging/iio/impedance-analyzer/ad5933.c:310:19: warning: cast to
restricted __be32
drivers/staging/iio/impedance-analyzer/ad5933.c:446:21: warning:
incorrect type in assignment (different base types)
drivers/staging/iio/impedance-analyzer/ad5933.c:446:21:    expected
unsigned short [unsigned] dat
drivers/staging/iio/impedance-analyzer/ad5933.c:446:21:    got
restricted __be16 [usertype] <noident>
drivers/staging/iio/impedance-analyzer/ad5933.c:454:21: warning:
incorrect type in assignment (different base types)
drivers/staging/iio/impedance-analyzer/ad5933.c:454:21:    expected
unsigned short [unsigned] [addressable] dat
drivers/staging/iio/impedance-analyzer/ad5933.c:454:21:    got
restricted __be16 [usertype] <noident>
drivers/staging/iio/impedance-analyzer/ad5933.c:548:23: warning: cast to
restricted __be16
drivers/staging/iio/impedance-analyzer/ad5933.c:548:23: warning: cast to
restricted __be16
drivers/staging/iio/impedance-analyzer/ad5933.c:548:23: warning: cast to
restricted __be16
drivers/staging/iio/impedance-analyzer/ad5933.c:548:23: warning: cast to
restricted __be16

Signed-off-by: Teodora Baluta <teodora.baluta@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: add support of the max5821
Philippe Reynes [Fri, 25 Jul 2014 21:43:00 +0000 (22:43 +0100)]
iio: add support of the max5821

Signed-off-by: Philippe Reynes <tremyfr@yahoo.fr>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: hid-sensor-magn-3d: Fix build warning
Reyad Attiyat [Fri, 25 Jul 2014 21:14:00 +0000 (22:14 +0100)]
iio: hid-sensor-magn-3d: Fix build warning

Fix build warning, sizeof() called on dynamically
sized pointer, by removing the call and the dependent
function parameter. It is not needed or used in this
driver, when pushing values to an iio buffer.

Changes from v1
- Fix mistake in varible name

Signed-off-by: Reyad Attiyat <reyad.attiyat@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agostaging: gdm724x: fix misplaced open braces
Cihangir Akturk [Sun, 27 Jul 2014 00:21:15 +0000 (03:21 +0300)]
staging: gdm724x: fix misplaced open braces

This patch fixes the following checkpatch.pl issues in gdm_usb.c:
ERROR: that open brace { should be on the previous line

Signed-off-by: Cihangir Akturk <cakturk@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: Fix static symbol sparse warnings
Jeff Oczek [Fri, 25 Jul 2014 00:19:43 +0000 (20:19 -0400)]
staging: rtl8188eu: Fix static symbol sparse warnings

Fix sparse warnings:
drivers/staging/rtl8188eu/core/rtw_cmd.c:52:5: warning:
  symbol '_rtw_enqueue_cmd' was not declared. Should it be static?
drivers/staging/rtl8188eu/core/rtw_wlan_util.c:1225:5: warning:
  symbol 'wifirate2_ratetbl_inx' was not declared. Should it be static?
drivers/staging/rtl8188eu/hal/HalPhyRf_8188e.c:25:4: warning:
  symbol 'ODM_GetRightChnlPlaceforIQK' was not declared. Should it be static?
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3109:5: warning:
  symbol 'rtw_ioctl' was not declared. Should it be static?

Signed-off-by: Jeff Oczek <jeffoczek@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6656: use test_bit to check flags status
Malcolm Priestley [Thu, 24 Jul 2014 20:13:20 +0000 (21:13 +0100)]
staging: vt6656: use test_bit to check flags status

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6656: Remove unused macro MP_TEST_FLAGS
Malcolm Priestley [Thu, 24 Jul 2014 20:13:19 +0000 (21:13 +0100)]
staging: vt6656: Remove unused macro MP_TEST_FLAGS

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6656: use clear_bit to remove device flag
Malcolm Priestley [Thu, 24 Jul 2014 20:13:18 +0000 (21:13 +0100)]
staging: vt6656: use clear_bit to remove device flag

Replacing MP_CLEAR_FLAG

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6656: use set_bit to set flags
Malcolm Priestley [Thu, 24 Jul 2014 20:13:17 +0000 (21:13 +0100)]
staging: vt6656: use set_bit to set flags

Replacing MP_SET_FLAG

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6656: struct vnt_private merge flag and macros
Malcolm Priestley [Thu, 24 Jul 2014 20:13:16 +0000 (21:13 +0100)]
staging: vt6656: struct vnt_private merge flag and macros

merge u32 flag into unsigned long Flags

Replacing fMP_DISCONNECTED with DEVICE_FLAGS_DISCONNECTED

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6656: Remove unsed macro DEVICE_FLAGS_OPENED
Malcolm Priestley [Thu, 24 Jul 2014 20:13:15 +0000 (21:13 +0100)]
staging: vt6656: Remove unsed macro DEVICE_FLAGS_OPENED

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6656: remove macro MP_IS_READY
Malcolm Priestley [Thu, 24 Jul 2014 20:13:14 +0000 (21:13 +0100)]
staging: vt6656: remove macro MP_IS_READY

Just test FLag and remove not.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6656: Remove flags fMP_POST_READS and fMP_POST_WRITES
Malcolm Priestley [Thu, 24 Jul 2014 20:13:13 +0000 (21:13 +0100)]
staging: vt6656: Remove flags fMP_POST_READS and fMP_POST_WRITES

MP_IS_READY(fMP_DISCONNECTED) is used to block thread in vnt_tx_context

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: vt6655: remove redundant comments from bssdb.h
Igor Bezukh [Thu, 24 Jul 2014 18:45:03 +0000 (21:45 +0300)]
Staging: vt6655: remove redundant comments from bssdb.h

Removed redundant comments from bssdb.h header file.

Signed-off-by: Igor Bezukh <igbzkh@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: vt6655: remove redundant comments from baseband.h
Igor Bezukh [Thu, 24 Jul 2014 18:39:08 +0000 (21:39 +0300)]
Staging: vt6655: remove redundant comments from baseband.h

Removed redundant comments in baseband.h header file.

Signed-off-by: Igor Bezukh <igbzkh@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: ABI documentation for new sysfs entries
Benjamin Romer [Thu, 24 Jul 2014 18:11:47 +0000 (14:11 -0400)]
staging: unisys: ABI documentation for new sysfs entries

This patch adds a documentation file for all of the interfaces that were moved
to sysfs by the other patches in this set.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: clean up diagdump proc entry code
Benjamin Romer [Thu, 24 Jul 2014 18:08:44 +0000 (14:08 -0400)]
staging: unisys: clean up diagdump proc entry code

Remove remnant code left over from the diagdump proc entry.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: move chipsetready to sysfs
Benjamin Romer [Thu, 24 Jul 2014 18:08:43 +0000 (14:08 -0400)]
staging: unisys: move chipsetready to sysfs

Move the chipsetready proc entry to sysfs under a new directory guest. This
entry is used by Unisys application software on the guest to acknowledge
completion of specific events for integration purposes, but these
acknowledgements are not required for the guest to operate correctly.

The store function is simplified as well, to use scanf() instead of copying
the buffer and using strsep().

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: move installer to sysfs and split fields
Benjamin Romer [Thu, 24 Jul 2014 18:08:42 +0000 (14:08 -0400)]
staging: unisys: move installer to sysfs and split fields

The installer entry in /proc/visorchipset/installer was composed of three
separate fields as one entry. This patch removes the proc entry and associated
functions, and creates new fields with distinct entries under sysfs in the
visorchipset/install directory. The fields are:

textid: used to send the ID of a string that should be displayed on
s-Par's automatic installation progress screen. Setting this
field when not in installation mode (boottotool was set on
the previous guest boot) has no effect.

remaining_steps: used to set the value of the progress bar on the
s-Par automatic installation progress screen. This field has
no effect if not in installation mode.

error: used to send the ID of a string that should be displayed on
s-Par's automatic installation progress screen when an error
is encountered during installation. This field has no effect
if not in installation mode.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: et131x: Remove trailing semicolon from macros in et131x.h
Masanari Iida [Thu, 24 Jul 2014 10:46:52 +0000 (19:46 +0900)]
staging: et131x: Remove trailing semicolon from macros in et131x.h

This patch removes trailing semicolon from macros within et131x.h

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: et131x: Fix typo in et131x
Masanari Iida [Thu, 24 Jul 2014 10:46:51 +0000 (19:46 +0900)]
staging: et131x: Fix typo in et131x

This patch fix spelling typos in comments and printk
within et131x.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: usbduxfast: adding missing break in case statement
Bernd Porr [Thu, 24 Jul 2014 13:34:32 +0000 (14:34 +0100)]
staging: comedi: usbduxfast: adding missing break in case statement

Added a missing "break" which forced the board to acquire 16
channels even when only 3 had been requested.
Thanks for Hartley Sweeten to spot this bug.

Signed-off-by: Bernd Porr <mail@berndporr.me.uk>
Reported-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: dgnc: Fix space required after that ','
Seunghun Lee [Thu, 24 Jul 2014 15:26:53 +0000 (00:26 +0900)]
staging: dgnc: Fix space required after that ','

This patch fixes checkpatch errors:
"space required after that ','"

Signed-off-by: Seunghun Lee <waydi1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: obdclass: fix sparse warnings about static declaration
Andrey Skvortsov [Thu, 24 Jul 2014 07:52:43 +0000 (11:52 +0400)]
staging: lustre: obdclass: fix sparse warnings about static declaration

Signed-off-by: Andrey Skvortsov <Andrej.Skvortzov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: ni_65xx: disable edge detection on initialization
Ian Abbott [Wed, 23 Jul 2014 09:41:21 +0000 (10:41 +0100)]
staging: comedi: ni_65xx: disable edge detection on initialization

When the hardware is being initialized, the edge detection interrupts
are cleared and disabled.  Also disable edge detection for all channels
at this time so they start off in a known state.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: ni_65xx: support INSN_CONFIG_DIGITAL_TRIG
Ian Abbott [Wed, 23 Jul 2014 09:41:20 +0000 (10:41 +0100)]
staging: comedi: ni_65xx: support INSN_CONFIG_DIGITAL_TRIG

The "edge detection interrupt" subdevice supports the
`INSN_CONFIG_CHANGE_NOTIFY` comedi instruction which is only supported
by one other driver.  It is limited to the first 32 channels, but boards
supported by this driver support edge detection on all digital I/O,
digital input and digital output channels.  The
`INSN_CONFIG_DIGITAL_TRIG` comedi instruction is more flexible as it
supports more than 32 channels (with multiple instructions).  It can
also support level detection, but the hardware does not support that.

Add partial support for the `INSN_CONFIG_DIGITAL_TRIG` instruction, but
only for edge detection.

Since `INSN_CONFIG_CHANGE_NOTIFY` can only deal with 32 channels, make
it disable edge detection for any remaining channels.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: ni_65xx: refactor edge detection configuration
Ian Abbott [Wed, 23 Jul 2014 09:41:19 +0000 (10:41 +0100)]
staging: comedi: ni_65xx: refactor edge detection configuration

Refactor the code that updates the rising and falling edge detection
registers into new function `ni_65xx_update_edge_detection()`.  This
updates the rising and falling edge detection registers for up to 32
channels starting at an arbitrary channel.  Call it from the code that
handles the `INSN_CONFIG_CHANGE_NOTIFY` instruction, which is limited to
the first 32 channels.

(For the purposes of edge detection, the channels are in the natural
port order of the board, 8 channels per port.  In practice, this is all
the digital I/O channels (if any), followed by all the digital input
channels (if any), followed by all the digital output channels (if any).

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: ni_65xx: add ni_65xx_num_ports()
Ian Abbott [Wed, 23 Jul 2014 09:41:18 +0000 (10:41 +0100)]
staging: comedi: ni_65xx: add ni_65xx_num_ports()

Add a function to return the total number of digital I/O, digital input,
and digital output ports on the board.  Each port has 8 channels (bits).

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: quickstart: remove driver
Kristina Martšenko [Thu, 24 Jul 2014 18:58:46 +0000 (21:58 +0300)]
staging: quickstart: remove driver

The driver hasn't been cleaned up and it doesn't look like anyone is
working on it anymore (including the original author). So remove the
driver from the kernel. If someone wants to work on cleaning it up and
moving it out of staging, this commit can be reverted.

Signed-off-by: Kristina Martšenko <kristina.martsenko@gmail.com>
Cc: Angelo Arrifano <miknix@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: phison: remove driver
Kristina Martšenko [Thu, 24 Jul 2014 17:52:57 +0000 (20:52 +0300)]
staging: phison: remove driver

The driver hasn't been cleaned up and it doesn't look like anyone is
working on it anymore (including the original author). So remove the
driver from the kernel. If someone wants to work on cleaning it up and
moving it out of staging, this commit can be reverted.

Signed-off-by: Kristina Martšenko <kristina.martsenko@gmail.com>
Cc: Evan Ko <evan_ko@phison.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoMerge tag 'iio-for-3.17d' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23...
Greg Kroah-Hartman [Thu, 24 Jul 2014 21:57:19 +0000 (14:57 -0700)]
Merge tag 'iio-for-3.17d' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next

Jonathan writes:

Fourth round of IIO new drivers, functionality and cleanups for the 3.17 cycle

New functionality
* A new modifier to indicate that a rotation is relative to either
  true or magnetic north.  This is to be used by some magnetometers
  that provide data in this way.
* hid magnetometer now supports output rotations from various variants on
  North
* HMC5843 driver converted to regmap and reworked to allow easy support
  of other similar devices.  Support for HMC5983 added via both i2c and SPI.
* Rework of Exynos driver to simplify extension to support more devices.
* Addition of support for the Exynos3250 ADC (which requires an additional
  clock)  Support for quite a few more devices on its way.

Cleanups
* ad7997 - a number of cleanups and tweaks to how the events are controlled
  to make it more intuitive.
* kxcjk - cleanups and minor fixes for this new driver.

9 years agostaging: keucr: remove driver
Kristina Martšenko [Thu, 24 Jul 2014 01:34:38 +0000 (04:34 +0300)]
staging: keucr: remove driver

The driver hasn't been fully cleaned up and it doesn't look like anyone
is working on it anymore (including the original author). So remove the
driver and all references to it. If someone wants to finish cleaning
the driver up and moving it out of staging, this commit can be reverted.

Signed-off-by: Kristina Martšenko <kristina.martsenko@gmail.com>
Cc: Cho, Yu-Chen <acho@novell.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: frontier: remove driver
Kristina Martšenko [Wed, 23 Jul 2014 22:35:00 +0000 (01:35 +0300)]
staging: frontier: remove driver

The driver hasn't been cleaned up and it doesn't look like anyone is
working on it anymore (including the original author). So remove the
driver from the kernel. If someone wants to work on cleaning it up and
moving it out of staging, this commit can be reverted.

Signed-off-by: Kristina Martšenko <kristina.martsenko@gmail.com>
Cc: David Täht <d@teklibre.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: ced1401: remove driver
Kristina Martšenko [Wed, 23 Jul 2014 21:38:01 +0000 (00:38 +0300)]
staging: ced1401: remove driver

The state of the driver hasn't improved much since it was added to
staging, and no one with the hardware is currently working on it, so
remove it. This commit can be reverted if someone wants to clean the
driver up and move it to its proper place in the kernel.

Signed-off-by: Kristina Martšenko <kristina.martsenko@gmail.com>
Cc: Greg Smith <greg@ced.co.uk>
Cc: Alois Schlögl <alois.schloegl@ist.ac.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: bcm: nvm.c: Don't pass the index
Matthias Beyer [Wed, 23 Jul 2014 11:31:00 +0000 (13:31 +0200)]
Staging: bcm: nvm.c: Don't pass the index

The variable 'i' does not need to be passed, as we set it to 0 (zero)
anyways when starting the iteration here.

Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: bcm: nvm.c: Fixed variable type
Matthias Beyer [Wed, 23 Jul 2014 11:30:59 +0000 (13:30 +0200)]
Staging: bcm: nvm.c: Fixed variable type

The variable type of the local variable 'j' should be 'int' instead of
'unsigned int'.

Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging:bcm:Transmit.c:coding style:line over 80 char
Sudip Mukherjee [Wed, 23 Jul 2014 14:49:12 +0000 (20:19 +0530)]
staging:bcm:Transmit.c:coding style:line over 80 char

Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vme: removed useless breaks in vme_user.c
Tom Jorquera [Wed, 23 Jul 2014 16:17:58 +0000 (18:17 +0200)]
staging: vme: removed useless breaks in vme_user.c

vme_user.c contained unnecessary breaks after gotos, which increased
code size and caused code style warning. This is now fixed.

Signed-off-by: Tom Jorquera <tom.jorquera@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agodrivers/staging/bcm/Misc.c: fix a check
Andrey Utkin [Wed, 23 Jul 2014 10:47:33 +0000 (13:47 +0300)]
drivers/staging/bcm/Misc.c: fix a check

The issue was reported by static analysis.
The value holding flags was &-ed with 0x02, being compared to 0x01
(TRUE) after that. Such comparsion is always false.

Resolution: drop the comparsion to TRUE in the condition.

&-ing with 0x02 is right, according to result variable name
(reporting_mode) and description in drivers/staging/bcm/target_params.h
("bit 1 = 1: CINR reporting in Idlemode Msg").

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=80801
Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Andrey Utkin <andrey.krieger.utkin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging/goldfish/goldfish_audio: fix a sparse warning
Robin Schroer [Wed, 23 Jul 2014 06:16:39 +0000 (08:16 +0200)]
staging/goldfish/goldfish_audio: fix a sparse warning

Fix a pointer check to use NULL instead of 0

Warning:
drivers/staging/goldfish/goldfish_audio.c:300:34: warning: Using plain
integer as NULL pointer

Signed-off-by: Robin Schroer <sulamiification@gmail.com>
Acked-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoARM: dts: Fix wrong compatible string for Exynos3250 ADC
Chanwoo Choi [Tue, 22 Jul 2014 02:04:00 +0000 (03:04 +0100)]
ARM: dts: Fix wrong compatible string for Exynos3250 ADC

This patchset fix wrong compatible string for Exynos3250 ADC. Exynos3250 SoC
need to control only special clock for ADC. Exynos SoC except for Exynos3250
has not included special clock for ADC. The exynos ADC driver can control
special clock if compatible string is 'exynos3250-adc-v2'.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: devicetree: Add DT binding documentation for Exynos3250 ADC
Chanwoo Choi [Tue, 22 Jul 2014 02:04:00 +0000 (03:04 +0100)]
iio: devicetree: Add DT binding documentation for Exynos3250 ADC

This patch add DT binding documentation for Exynos3250 ADC IP. Exynos3250 has
special clock ('sclk_adc') for ADC which provide clock to internal ADC.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Reviewed-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: adc: exynos_adc: Control special clock of ADC to support Exynos3250 ADC
Chanwoo Choi [Tue, 22 Jul 2014 02:04:00 +0000 (03:04 +0100)]
iio: adc: exynos_adc: Control special clock of ADC to support Exynos3250 ADC

This patch control special clock for ADC in Exynos series's FSYS block.
If special clock of ADC is registerd on clock list of common clk framework,
Exynos ADC drvier have to control this clock.

Exynos3250/Exynos4/Exynos5 has 'adc' clock as following:
- 'adc' clock: bus clock for ADC

Exynos3250 has additional 'sclk_adc' clock as following:
- 'sclk_adc' clock: special clock for ADC which provide clock to internal ADC

Exynos 4210/4212/4412 and Exynos5250/5420 has not included 'sclk_adc' clock
in FSYS_BLK. But, Exynos3250 based on Cortex-A7 has only included 'sclk_adc'
clock in FSYS_BLK.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agoiio: adc: exynos_adc: Add exynos_adc_data structure to improve readability
Chanwoo Choi [Tue, 22 Jul 2014 02:04:00 +0000 (03:04 +0100)]
iio: adc: exynos_adc: Add exynos_adc_data structure to improve readability

This patchset add 'exynos_adc_data' structure which includes some functions
to control ADC operation and specific data according to ADC version (v1 or v2).

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Reviewed-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agostaging:iio:hmc5843: Add support for spi hmc5983
Josef Gajdusek [Tue, 22 Jul 2014 15:03:00 +0000 (16:03 +0100)]
staging:iio:hmc5843: Add support for spi hmc5983

This patch adds support for the hmc5983 spi interface.
This chip is almost identical to the hmc5883. The difference being added
temperature compensation, additional available sample rate (220Hz) and an SPI
interface.

Signed-off-by: Josef Gajdusek <atx@atx.name>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agostaging:iio:hmc5843: Add support for i2c hmc5983
Josef Gajdusek [Tue, 22 Jul 2014 15:02:00 +0000 (16:02 +0100)]
staging:iio:hmc5843: Add support for i2c hmc5983

This patch adds support for the hmc5983 i2c interface.
This chip is almost identical to the hmc5883. The difference being added
temperature compensation, additional available sample rate (220Hz) and an SPI
interface.

Signed-off-by: Josef Gajdusek <atx@atx.name>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agostaging:iio:hmc5843: register <-> value arrays now can have different lengths
Josef Gajdusek [Tue, 22 Jul 2014 15:02:00 +0000 (16:02 +0100)]
staging:iio:hmc5843: register <-> value arrays now can have different lengths

Changed structure of struct hmc5843_chip_info to include length of translation
arrays. Code previously using #defined constant has been changed accordingly.
This allows to integrate devices which do have different amounts of available
rates/scales.

Signed-off-by: Josef Gajdusek <atx@atx.name>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agostaging:iio:hmc5843: Split hmc5843.c to multiple files
Josef Gajdusek [Tue, 22 Jul 2014 15:01:00 +0000 (16:01 +0100)]
staging:iio:hmc5843: Split hmc5843.c to multiple files

This patch splits hmc5843.c to multiple files - the interface-agnostic
hmc5843_core.c, i2c specific hmc5843_i2c.c and header file hmc5843.h. This is
another step to add support of SPI-enabled hmc5983.

Signed-off-by: Josef Gajdusek <atx@atx.name>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agostaging:iio:hmc5843: Added regmap support
Josef Gajdusek [Tue, 22 Jul 2014 15:00:00 +0000 (16:00 +0100)]
staging:iio:hmc5843: Added regmap support

This patch changes hmc5843.c to use regmap. This provides transparent caching
to the code as well as abstraction necessary to add support for SPI-based
hmc5983.

Signed-off-by: Josef Gajdusek <atx@atx.name>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
9 years agostaging: vt6656: struct vnt_tx_short_buf_head change base type of fifo_ctl to __le16
Malcolm Priestley [Tue, 22 Jul 2014 21:49:49 +0000 (22:49 +0100)]
staging: vt6656: struct vnt_tx_short_buf_head change base type of fifo_ctl to __le16

Base type is always little endian.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6656: struct vnt_tx_fifo_head fifo_ctl change base type to __le16
Malcolm Priestley [Tue, 22 Jul 2014 21:49:48 +0000 (22:49 +0100)]
staging: vt6656: struct vnt_tx_fifo_head fifo_ctl change base type to __le16

Endian is always little add correction in vnt_tx_packet.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6656: struct vnt_beacon_buffer replace byType with type
Malcolm Priestley [Tue, 22 Jul 2014 21:49:47 +0000 (22:49 +0100)]
staging: vt6656: struct vnt_beacon_buffer replace byType with type

Removing camel case

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6656: vnt_tx_buffer replace byType with type
Malcolm Priestley [Tue, 22 Jul 2014 21:49:46 +0000 (22:49 +0100)]
staging: vt6656: vnt_tx_buffer replace byType with type

Removing camel case

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6656: struct vnt_beacon_buffer replace byPKTNO with pkt_no
Malcolm Priestley [Tue, 22 Jul 2014 21:49:45 +0000 (22:49 +0100)]
staging: vt6656: struct vnt_beacon_buffer replace byPKTNO with pkt_no

removing camel case.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6656: struct vnt_tx_buffer replace byPKTNO with pkt_no
Malcolm Priestley [Tue, 22 Jul 2014 21:49:44 +0000 (22:49 +0100)]
staging: vt6656: struct vnt_tx_buffer replace byPKTNO with pkt_no

Replacing camel case

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6656: vnt_tx_fifo_head rename wFIFOCtl to fifo_ctl
Malcolm Priestley [Tue, 22 Jul 2014 21:49:43 +0000 (22:49 +0100)]
staging: vt6656: vnt_tx_fifo_head rename wFIFOCtl to fifo_ctl

Removing prefix and camel case.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: fix and remove virthba comments
Erik Arfvidson [Tue, 22 Jul 2014 14:50:23 +0000 (10:50 -0400)]
staging: unisys: fix and remove virthba comments

This patch fixes formatting and cleans up unneeded comments

Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: move boottotool out of proc to sysfs
Benjamin Romer [Tue, 22 Jul 2014 13:56:26 +0000 (09:56 -0400)]
staging: unisys: move boottotool out of proc to sysfs

Move the proc entry controlling the boottotool flag to procfs. The field
appears in /sys/devices/platform/visorchipset/install/boottotool.

The boottotool flag controls s-Par behavior on the next boot of this guest.
Setting the flag will cause the guest to boot from the utility and installation
image, which will use the value in the toolaction field to determine what
operation is being requested.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: add toolaction to sysfs
Benjamin Romer [Tue, 22 Jul 2014 13:56:25 +0000 (09:56 -0400)]
staging: unisys: add toolaction to sysfs

Move the proc entry for controlling the toolaction field to sysfs. The field
appears in /sys/devices/platform/visorchipset/install/toolaction.

This field is used to tell s-Par which type of recovery tool action to perform
on the next guest boot-up. The meaning of the value is dependent on the type
of installation software used to commission the guest.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: Fix typo in rtl8723au/core
Masanari Iida [Tue, 22 Jul 2014 14:42:53 +0000 (23:42 +0900)]
staging: rtl8723au: Fix typo in rtl8723au/core

This patch fix spelling typo in comments within
rtl8723au/core.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: Fix typo in rtw_ap.c
Masanari Iida [Tue, 22 Jul 2014 14:42:45 +0000 (23:42 +0900)]
staging: rtl8723au: Fix typo in rtw_ap.c

This patch fix spelling typo in comments within rtw_ap.c

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: Fix typo in rtw_xmit.c
Masanari Iida [Tue, 22 Jul 2014 14:42:37 +0000 (23:42 +0900)]
staging: rtl8723au: Fix typo in rtw_xmit.c

This patch fix spelling typo in comments within rtw_xmit.c

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: Fix typo in rtw_mlme.c
Masanari Iida [Tue, 22 Jul 2014 14:42:24 +0000 (23:42 +0900)]
staging: rtl8723au: Fix typo in rtw_mlme.c

This patch fix spelling typo in comments within rtw_mlme.c

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: gdm724x: Use NLMSG_HDRLEN
Himangi Saraogi [Tue, 22 Jul 2014 18:12:28 +0000 (23:42 +0530)]
staging: gdm724x: Use NLMSG_HDRLEN

Replace use of  NLMSG_SPACE(0) with NLMSG_HDRLEN as they are equivalent
and NLMSG_SPACE seems to be deprecated.

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: dgnc: Remove all C99 comments
Seunghun Lee [Tue, 22 Jul 2014 15:21:57 +0000 (00:21 +0900)]
staging: dgnc: Remove all C99 comments

This patch fixes the following checkpatch error:

ERROR: do not use C99 // comments

CC: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Seunghun Lee <waydi1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: ni_6527: reset edge detection registers
Ian Abbott [Mon, 21 Jul 2014 16:29:06 +0000 (17:29 +0100)]
staging: comedi: ni_6527: reset edge detection registers

`ni6527_reset()` is called to reset various registers when the device is
being initialized or deinitialized.  The edge detection interrupt is
disabled by this function, but the rising and falling edge detection
registers are currently left alone.  Call `ni6527_set_edge_detection()`
to set them to a known, disabled state.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: ni_6527: support INSN_CONFIG_DIGITAL_TRIG
Ian Abbott [Mon, 21 Jul 2014 16:29:05 +0000 (17:29 +0100)]
staging: comedi: ni_6527: support INSN_CONFIG_DIGITAL_TRIG

The "edge detection interrupt" subdevice supports the
`INSN_CONFIG_CHANGE_NOTIFY` comedi instruction which is only supported
by one other driver.  The `INSN_CONFIG_DIGITAL_TRIG` comedi instruction
is more flexible as it supports both edge and level detection, but is
not currently supported by this driver.

Add partial support for `INSN_CONFIG_DIGITAL_TRIG`, but only for edge
detection.  Make use of the `ni6527_set_edge_detection()` used for
`INSN_CONFIG_CHANGE_NOTIFY`, but add a parameter holding a mask of the
rising and falling edges to be updated and preserve the unmasked edges
when updating.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: ni_65xx: don't invert outputs by default
Ian Abbott [Mon, 21 Jul 2014 13:53:31 +0000 (14:53 +0100)]
staging: comedi: ni_65xx: don't invert outputs by default

This driver currently inverts the outputs for the DO (digital output)
subdevice for some of the boards it supports, indicated by the
`invert_outputs` member in the board-specific data being initialized to
1.  It seems this driver shouldn't really be inverting outputs for these
boards at all, but has done so since the driver was first written back
in October 2006.  I've had confirmation that for the PCI-6515 at least,
the output voltage levels are opposite to the values set by the user
program.

The driver by Jon Grierson originally supported only PCI-6514 and
PXI-6514 (and was originally called "ni_6514").  The driver was based on
"ni_6527", which is where the inversion of outputs appears to have come
from.  Over a period of a few days, the driver was enhanced by Frank
Mori Hess to support other boards.  Some of these plainly didn't require
inverted outputs and some guesswork was used to decide which boards
should have inverted outputs.  Some of the boards in question are
described in the manual as having "Sink Outputs" and others are
described as having "Source Outputs", but this does not correspond in
any way with which boards are marked as having inverted outputs, so the
criterion that Frank used is a bit of a mystery!

Change the driver so it doesn't invert the outputs of these by boards by
default, but add a module parameter, "legacy_invert_outputs", that can
be set to 'true' to restore the old behaviour.  Also rename the
`invert_outputs` member of `struct ni_65xx_board` to `legacy_invert`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: Fix typo in rtw_mlme_ext.c
Masanari Iida [Tue, 22 Jul 2014 14:42:13 +0000 (23:42 +0900)]
staging: rtl8723au: Fix typo in rtw_mlme_ext.c

This patch fix spelling typo in comments within rtw_mlme_ext.c

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: gdm724x: gdm_usb.c: fix missing blank line after variable declaration
Kiran Padwal [Tue, 22 Jul 2014 07:08:25 +0000 (12:38 +0530)]
Staging: gdm724x: gdm_usb.c: fix missing blank line after variable declaration

Checkpatch fix - Add missing blank line after variable declaration

Signed-off-by: Kiran Padwal <kiran.padwal21@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: comedi: amcc_s5933: a style issue fixed
Sam Asadi [Tue, 22 Jul 2014 02:51:23 +0000 (05:51 +0300)]
Staging: comedi: amcc_s5933: a style issue fixed

A 'line over 80 characters' fixed by removing comment to the previous
line.

Signed-off-by: Sam Asadi <asadi.samuel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: comedi: amcc_s5933: a line over 80 fixed
Sam Asadi [Tue, 22 Jul 2014 02:51:22 +0000 (05:51 +0300)]
Staging: comedi: amcc_s5933: a line over 80 fixed

A 'line over 80 characters' fixed by removing comment to
previous line.

Signed-off-by: Sam Asadi <asadi.samuel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: comedidev.h: remove 'new_size' param from subdevice (*buf_change)
H Hartley Sweeten [Mon, 21 Jul 2014 18:48:32 +0000 (11:48 -0700)]
staging: comedi: comedidev.h: remove 'new_size' param from subdevice (*buf_change)

This parameter is never used by any of the comedi drivers that provide a
(*buf_change) callback. If the 'new_size' is needed in the callback it can
be found from the 's->async->prealloc_bufsz' as done in the ni_pcidio driver.

Remove the unused parameter.

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>
9 years agostaging: comedi: comedidev.h: remove unused callbacks from comedi_subdevice
H Hartley Sweeten [Mon, 21 Jul 2014 18:01:27 +0000 (11:01 -0700)]
staging: comedi: comedidev.h: remove unused callbacks from comedi_subdevice

The 'do_lock' and 'do_unlock' callbacks are not used be any of the comedi
drivers or the comedi core. Just remove them.

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>
9 years agostaging: comedi: comedi_fops: remove disabled subdevice lock/unlock callback
H Hartley Sweeten [Mon, 21 Jul 2014 18:01:26 +0000 (11:01 -0700)]
staging: comedi: comedi_fops: remove disabled subdevice lock/unlock callback

According to Ian Abbott, this code was added in comedi-0.7.6 back in June 1999
and has always been disabled.

The 'lock_f' and 'unlock' members don't even exist in the comedi_subdevice.
Just remove the disabled code.

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>
9 years agoStaging: vt6655: remove redundant comments from 80211hdr.h
Igor Bezukh [Tue, 22 Jul 2014 12:25:18 +0000 (15:25 +0300)]
Staging: vt6655: remove redundant comments from 80211hdr.h

Removed redundant comments from 80211hdr.h header file

Signed-off-by: Igor Bezukh <igbzkh@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: vt6655: Removed redundant comments and newlines
Igor Bezukh [Tue, 22 Jul 2014 12:36:10 +0000 (15:36 +0300)]
Staging: vt6655: Removed redundant comments and newlines

Removed redundant comments and newlines from 80211mgr.h header file.

Signed-off-by: Igor Bezukh <igbzkh@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: vt6655: removed redundant comments from aes_ccmp.h
Igor Bezukh [Tue, 22 Jul 2014 12:40:05 +0000 (15:40 +0300)]
Staging: vt6655: removed redundant comments from aes_ccmp.h

Removed redundant comments from aes_ccmp.h header file

Signed-off-by: Igor Bezukh <igbzkh@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6655: Fix unused function warning
Guillaume Clement [Tue, 22 Jul 2014 20:08:30 +0000 (22:08 +0200)]
staging: vt6655: Fix unused function warning

Sparse reports that MimeThread is not used. Actually, it can be used
if THREAD is defined. By enclosing the MimeThread function into the
same #ifdef as the caller of MimeThread, this fixes the sparse
warnings.

Signed-off-by: Guillaume Clement <gclement@baobob.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6655: remove unused functions
Guillaume Clement [Tue, 22 Jul 2014 20:08:29 +0000 (22:08 +0200)]
staging: vt6655: remove unused functions

The IEEE11hbMgrRxAction is not exported and never used. Deleting it
allows to delete other functions that were only used by
IEEE11hbMgrRxAction.

This allows to fix several warnings reported by sparse.

Signed-off-by: Guillaume Clement <gclement@baobob.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6655: statify some variables
Guillaume Clement [Tue, 22 Jul 2014 20:08:28 +0000 (22:08 +0200)]
staging: vt6655: statify some variables

Some variables are used only in the context of their .c file, which
gives warnings with sparse.

Signed-off-by: Guillaume Clement <gclement@baobob.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6655:fix warning for unexported non-static functions
Guillaume Clement [Tue, 22 Jul 2014 20:08:27 +0000 (22:08 +0200)]
staging: vt6655:fix warning for unexported non-static functions

There is one function in aes_ccmp.c which is exported, but sparse sees
it unexported because it doesn't include the header that exports it.

Signed-off-by: Guillaume Clement <gclement@baobob.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6655: change type of PortOffset to void __iomem *
Guillaume Clement [Tue, 22 Jul 2014 20:08:26 +0000 (22:08 +0200)]
staging: vt6655: change type of PortOffset to void __iomem *

PortOffset was an unsigned long, but used as an pointer to io
memory. Sometimes it was not properly cast before use, which caused
many warning by sparse.

By updating its type to void __iomem *, and reflecting the changes
where it is needed, this removes most of those warnings.

Signed-off-by: Guillaume Clement <gclement@baobob.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: Fix sparse warnings
Matt Kurz [Tue, 22 Jul 2014 20:10:33 +0000 (06:10 +1000)]
staging: lustre: Fix sparse warnings

Declare several functions and variables as static in order
to address the following sparse warnings

drivers/staging/lustre/lnet/lnet/acceptor.c:49:3: warning: symbol 'lnet_acceptor_state' was not declared. Should it be static?
drivers/staging/lustre/lnet/lnet/acceptor.c:79:1: warning: symbol 'lnet_acceptor_get_tunables' was not declared. Should it be static?
drivers/staging/lustre/lnet/lnet/acceptor.c:211:1: warning: symbol 'lnet_accept' was not declared. Should it be static?
drivers/staging/lustre/lnet/lnet/acceptor.c:333:1: warning: symbol 'lnet_acceptor' was not declared. Should it be static?

Tested by compilation only.

Signed-off-by: Matt Kurz <matt@ninezulu.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: llite: rw.c: remove gfp_mask
Guillaume Morin [Tue, 22 Jul 2014 02:22:26 +0000 (04:22 +0200)]
staging: lustre: llite: rw.c: remove gfp_mask

sparse reported that gfp_mask was of the wrong type to store gfp flags.  The
variable is not used so it can be removed.

Signed-off-by: Guillaume Morin <guillaume@morinfr.org>
Suggested-by: gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6656: usbpipe.c clean up USB_CTL_WAIT
Malcolm Priestley [Mon, 21 Jul 2014 21:40:47 +0000 (22:40 +0100)]
staging: vt6656: usbpipe.c clean up USB_CTL_WAIT

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6656: usbpipe remove unneeded comments
Malcolm Priestley [Mon, 21 Jul 2014 21:40:46 +0000 (22:40 +0100)]
staging: vt6656: usbpipe remove unneeded comments

We know what the endpoints are

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6656: Remove ununsed macro URB_ASYNC_UNLINK
Malcolm Priestley [Mon, 21 Jul 2014 21:40:45 +0000 (22:40 +0100)]
staging: vt6656: Remove ununsed macro URB_ASYNC_UNLINK

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6656: remove static declaration vnt_tx_context_complete
Malcolm Priestley [Mon, 21 Jul 2014 21:40:44 +0000 (22:40 +0100)]
staging: vt6656: remove static declaration vnt_tx_context_complete

Moving vnt_tx_context in visibility of vnt_tx_context_complete

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>