platform/kernel/linux-rpi.git
7 years agostaging: lustre: ptlrpc: set proper mbits for EINPROGRESS resend
Niu Yawei [Sun, 29 Jan 2017 00:04:35 +0000 (19:04 -0500)]
staging: lustre: ptlrpc: set proper mbits for EINPROGRESS resend

Set mbits for EINPROGRESS resend in ptl_send_rpc().

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8193
Reviewed-on: http://review.whamcloud.com/20377
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: lustre: clio: revise readahead to support 16MB IO
Jinshan Xiong [Sun, 29 Jan 2017 00:04:34 +0000 (19:04 -0500)]
staging: lustre: clio: revise readahead to support 16MB IO

Read ahead currently doesn't handle 16MB RPC packets correctly
by assuming the packets are a default size instead of querying
the size. This work adjust the read ahead policy to issue
read ahead RPC by the underlying RPC size.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Signed-off-by: Gu Zheng <gzheng@ddn.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7990
Reviewed-on: http://review.whamcloud.com/19368
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Li Xi <lixi@ddn.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: lustre: mdc: quiet console message for known -EINTR
Andreas Dilger [Sun, 29 Jan 2017 00:04:32 +0000 (19:04 -0500)]
staging: lustre: mdc: quiet console message for known -EINTR

If a user process is waiting for MDS recovery during close, but the
process is interrupted, the file is still closed but it prints a
message on the console. Quiet the console message for -EINTR, since
this is expected behaviour.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6627
Reviewed-on: http://review.whamcloud.com/14911
Reviewed-by: Frank Zago <fzago@cray.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: lustre: clio: add cl_page LRU shrinker
Bobi Jam [Sun, 29 Jan 2017 00:04:31 +0000 (19:04 -0500)]
staging: lustre: clio: add cl_page LRU shrinker

Register cache shrinker to reclaim memory from cl_page LRU list.

Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6842
Reviewed-on: http://review.whamcloud.com/15630
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: lustre: statahead: drop support for remote entry
Lai Siyao [Sun, 29 Jan 2017 00:04:30 +0000 (19:04 -0500)]
staging: lustre: statahead: drop support for remote entry

This patch dropped support for remote entry statahead, because it
needs 2 async RPCs to fetch both LOOKUP lock from parent MDT and
UPDATE lock from client MDT, which is complicated. Plus not
supporting remote entry statahead won't cause any issue.

* pack child fid in statahead request.
* lmv_intent_getattr_async() will compare parent and child MDT,
  if child is remote, return -ENOTSUPP.

Signed-off-by: Lai Siyao <lai.siyao@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6578
Reviewed-on: http://review.whamcloud.com/15767
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: lustre: llite: Remove access of stripe in ll_setattr_raw
Jinshan Xiong [Sun, 29 Jan 2017 00:04:29 +0000 (19:04 -0500)]
staging: lustre: llite: Remove access of stripe in ll_setattr_raw

In ll_setattr_raw(), it needs to know if a file is released
when the file is being truncated. It used to get this information
by accessing lov_stripe_md. This turns out not necessary. This
patch removes the access of lov_stripe_md and solves the problem
in lov_io_init_released().

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5823
Reviewed-on: http://review.whamcloud.com/13514
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Henri Doreau <henri.doreau@cea.fr>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: rtl8188eu: remove not necessary braces {} (checkpatch fix)
Martin Karamihov [Tue, 31 Jan 2017 19:24:56 +0000 (21:24 +0200)]
staging: rtl8188eu: remove not necessary braces {} (checkpatch fix)

This is checkpatch fix for hal/bb_cfg.c file:
remove not necessary braces {}

Signed-off-by: Martin Karamihov <martinowar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: greybus: Remove duplicate include file
Masanari Iida [Wed, 1 Feb 2017 11:05:07 +0000 (20:05 +0900)]
staging: greybus: Remove duplicate include file

This patch removed duplicated include line.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: rts5208: remove unncessary result set and check, just return SUCCESS
Colin Ian King [Thu, 2 Feb 2017 12:12:02 +0000 (12:12 +0000)]
staging: rts5208: remove unncessary result set and check, just return SUCCESS

Minor clean up, there is no need to assign result to zero, then
check if it is less than zero. Just return SUCCESS.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: rts5208: remove redundant retval status check
Colin Ian King [Thu, 2 Feb 2017 12:12:01 +0000 (12:12 +0000)]
staging: rts5208: remove redundant retval status check

The retval status checks in the proceeding do loop return out
of function ms_read_attritbute_info if there is an error
condition,  thus we never reach the end of the loop with
retval failed status.  Therefore, the retval status check
at end of the do loop is redundant and can be removed.

Detected with CoverityScan, CID#143000 ("Logically dead code")

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: fbtft: change 'gamma' array to u32
Arnd Bergmann [Thu, 2 Feb 2017 14:43:42 +0000 (15:43 +0100)]
staging: fbtft: change 'gamma' array to u32

Having a local variable of 1024 bytes on 64-bit architectures is a bit
too much, and I ran into this warning while trying to see what functions
use the largest stack:

drivers/staging/fbtft/fbtft-sysfs.c: In function 'store_gamma_curve':
drivers/staging/fbtft/fbtft-sysfs.c:132:1: warning: the frame size of 1032 bytes is larger than 1024 bytes [-Wframe-larger-than=]

As there is no need for 64-bit gamma values (on 32-bit architectures,
we don't use those either), I'm changing the type from 'unsigned long'
to 'u32' here, which cuts the required space in half everywhere.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: rtl8192u: move stats_IndicateArray off stack
Arnd Bergmann [Thu, 2 Feb 2017 14:38:24 +0000 (15:38 +0100)]
staging: rtl8192u: move stats_IndicateArray off stack

Putting 128 pointers on the stack is rather wasteful, in particular
on 64-bit architectures:

drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c: In function 'RxPktPendingTimeout':
drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c:92:1: warning: the frame size of 1072 bytes is larger than 1024 bytes [-Wframe-larger-than=]

The rtl8192e driver has the exact same function, except that stores the
array in its 'ieee' structure. Let's do it the same way here for consistency.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: bcm2835: don't mark 'bcm2835_v4l2_debug' as static
Arnd Bergmann [Thu, 2 Feb 2017 12:15:32 +0000 (13:15 +0100)]
staging: bcm2835: don't mark 'bcm2835_v4l2_debug' as static

This one unfortunately slipped through my own build testing, my patch
caused a new build error:

bcm2835-camera.c:53:12: error: static declaration of 'bcm2835_v4l2_debug' follows non-static declaration

We want the symbol to be global as it is indeed used in more than one
file and declared 'extern' in a header.

Fixes: 757b9bd074 ("staging: bcm2835: mark all symbols as 'static'")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: rtl8192e: Aligning the * on each line in block comments
Arushi [Wed, 1 Feb 2017 19:19:42 +0000 (00:49 +0530)]
staging: rtl8192e: Aligning the * on each line in block comments

This patch fixes the issue by aligning the * on each line in block comments.

Signed-off-by: Arushi <arushisinghal19971997@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: unisys: visorbus: get rid of unused payload info
David Kershner [Wed, 1 Feb 2017 22:39:00 +0000 (17:39 -0500)]
staging: unisys: visorbus: get rid of unused payload info

We no longer send payloads back to the s-Par firmware, we can get rid of
the initialize and destroy functions since they weren't actually being
used just created and destroyed.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: David Binder <david.binder@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: unisys: visorbus: remove putfile data structures
David Kershner [Wed, 1 Feb 2017 22:38:59 +0000 (17:38 -0500)]
staging: unisys: visorbus: remove putfile data structures

There were several unused data structures dealing with putfile that are no
longer being used. So get rid of them.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: unisys: visornic: prevent hang doing 'modprobe -r visornic'
Tim Sell [Wed, 1 Feb 2017 22:38:58 +0000 (17:38 -0500)]
staging: unisys: visornic: prevent hang doing 'modprobe -r visornic'

A stray+extraneous 'netif_napi_add()' that we were doing in
visornic_probe() was causing havoc when we got into visornic_remove(),
called during 'modprobe -r visornic'. The symptom was a processor busy-wait
loop on the modprobe process, which '/proc/<pid>/stack' would show looping
doing napi things.

Presumably the stray line got there as a result of some merging snafoo, and
has been deleted to fix the problem. With this patch 'modprobe -r visornic'
and a subsequent 'modprobe visornic' both complete successfully, and result
in an operational network.

Signed-off-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: unisys: visorbus: Consolidate kobject functions
David Binder [Wed, 1 Feb 2017 22:38:56 +0000 (17:38 -0500)]
staging: unisys: visorbus: Consolidate kobject functions

Simplifies kobject usage in visorchipset.c by combining pairs of functions
that are better expressed combined.

Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: unisys: visorbus: Check controlvm message payload size
David Binder [Wed, 1 Feb 2017 22:38:55 +0000 (17:38 -0500)]
staging: unisys: visorbus: Check controlvm message payload size

Checks the controlvm message's payload size before copying it into a
parser_context struct's name region.

Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: unisys: visorbus: Remove unused struct in visorchannel.c
David Binder [Wed, 1 Feb 2017 22:38:54 +0000 (17:38 -0500)]
staging: unisys: visorbus: Remove unused struct in visorchannel.c

Removes struct safe_uis_queue, which is within struct visorchannel. The
struct is not used anywhere in the s-Par drivers.

Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: bcm2835-audio: fix style problem in vc_vchi_audioserv_defs.h
Miquel Raynal [Tue, 31 Jan 2017 13:32:08 +0000 (14:32 +0100)]
staging: bcm2835-audio: fix style problem in vc_vchi_audioserv_defs.h

Remove spaces around parenthesized expression to conform to the
kernel coding style. Issue found by checkpatch.pl script.

Signed-off-by: Miquel Raynal <raynal.miquel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: bcm2835-audio: use | instead of || otherwise result is just boolean 1
Colin Ian King [Wed, 1 Feb 2017 11:57:11 +0000 (11:57 +0000)]
staging: bcm2835-audio: use | instead of || otherwise result is just boolean 1

The incorrect or operator is being used resulting in cookies being
set to 1 (true) rather than the intended hex value.  Fix this by
using | instead of ||.

Issue found with static analysis with cppcheck

Fixes: 0cec463e391e05b807a ("staging: bcm2835-audio: Simplify callback structure for write data")

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: lustre: remove CLASSERT macro
Arnd Bergmann [Thu, 2 Feb 2017 11:26:51 +0000 (12:26 +0100)]
staging: lustre: remove CLASSERT macro

lustre uses a fake switch() statement as a compile-time assert, but unfortunately
each use of that causes a warning when building with clang:

drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c:2907:2: warning: no case matching constant switch condition '42'
drivers/staging/lustre/lnet/klnds/socklnd/../../../include/linux/libcfs/libcfs_private.h:294:36: note: expanded from macro 'CLASSERT'
 #define CLASSERT(cond) do {switch (42) {case (cond): case 0: break; } } while (0)

As Greg suggested, let's just kill off this macro completely instead of
fixing it. This replaces it with BUILD_BUG_ON(), which means we have
to negate all the conditions in the process.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: bcm2835: mark all symbols as 'static'
Arnd Bergmann [Thu, 2 Feb 2017 11:34:11 +0000 (12:34 +0100)]
staging: bcm2835: mark all symbols as 'static'

I got a link error in allyesconfig:

drivers/staging/media/platform/bcm2835/bcm2835-camera.o: In function `vidioc_enum_framesizes':
bcm2835-camera.c:(.text.vidioc_enum_framesizes+0x0): multiple definition of `vidioc_enum_framesizes'
drivers/media/platform/vivid/vivid-vid-cap.o:vivid-vid-cap.c:(.text.vidioc_enum_framesizes+0x0): first defined here

While both drivers are equally at fault for this problem, the bcm2835 one was
just added and is easier to fix, as it is only one file, and none of its symbols
need to be globally visible. This marks the three global symbols as static.

Fixes: 7b3ad5abf027 ("staging: Import the BCM2835 MMAL-based V4L2 camera driver.")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: bcm2835-audio: fix empty-body warning
Arnd Bergmann [Wed, 1 Feb 2017 16:22:25 +0000 (17:22 +0100)]
staging: bcm2835-audio: fix empty-body warning

gcc-7 warns about debug statements being left out here:

drivers/staging/bcm2835-audio/bcm2835-vchiq.c: In function 'bcm2835_audio_set_ctls':
drivers/staging/bcm2835-audio/bcm2835-vchiq.c:572:54: error: suggest braces around empty body in an 'else' statement [-Werror=empty-body]

It's better to use no_printk(), which has the added advantage of checking
the format strings.

Fixes: 23b028c871e1 ("staging: bcm2835-audio: initial staging submission")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: bcm2835-audio: remove incorrect include path
Arnd Bergmann [Wed, 1 Feb 2017 16:21:19 +0000 (17:21 +0100)]
staging: bcm2835-audio: remove incorrect include path

The driver introduces a new instance of the missing-include-dirs warning that
is enabled at the "make W=1" level but has no other output:

cc1: error: /git/arm-soc/drivers/staging/vc04_services/interface/vcos/linuxkernel: No such file or directory [-Werror=missing-include-dirs]

In order to let us enable the warning by default in the future, we should
just remove the incorrect argument here.

Fixes: 23b028c871e1 ("staging: bcm2835-audio: initial staging submission")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: bcm2835-v4l: remove incorrect include path
Arnd Bergmann [Wed, 1 Feb 2017 16:15:06 +0000 (17:15 +0100)]
staging: bcm2835-v4l: remove incorrect include path

The driver introduces a new instance of the missing-include-dirs warning that
is enabled at the "make W=1" level but has no other output:

cc1: error: drivers/staging/vc04_services/interface/vcos/linuxkernel: No such file or directory [-Werror=missing-include-dirs]
cc1: all warnings being treated as errors
scripts/Makefile.build:307: recipe for target 'drivers/staging/media/platform/bcm2835/bcm2835-camera.o' failed

In order to let us enable the warning by default in the future, we should
just remove the incorrect argument here.

Fixes: 97b35807cc4d ("staging: bcm2835-v4l2: Add a build system for the module.")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: bcm2835/mmal-vchiq: Replace call to vchi_msg_queue with vchi_queue_kernel_me...
Michael Zoran [Wed, 1 Feb 2017 14:31:54 +0000 (06:31 -0800)]
staging: bcm2835/mmal-vchiq: Replace call to vchi_msg_queue with vchi_queue_kernel_message

The function vchi_msg_queue was made static in vc04_services
and replaced with vchi_queue_kernel_message.

Change the call to vchi_msg_queue to vchi_queue_kernel_message

Signed-off-by: Michael Zoran <mzoran@crowfest.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: bcm2835-audio: Replace call to vchi_msg_queue with vchi_queue_kernel_message
Michael Zoran [Wed, 1 Feb 2017 14:31:53 +0000 (06:31 -0800)]
staging: bcm2835-audio: Replace call to vchi_msg_queue with vchi_queue_kernel_message

The function vchi_msg_queue was made static in vc04_services
and replaced with vchi_queue_kernel_message.

Change the call to vchi_msg_queue to vchi_queue_kernel_message

Signed-off-by: Michael Zoran <mzoran@crowfest.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoMerge tag 'iio-for-4.11c' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23...
Greg Kroah-Hartman [Thu, 2 Feb 2017 10:26:23 +0000 (11:26 +0100)]
Merge tag 'iio-for-4.11c' of git://git./linux/kernel/git/jic23/iio into staging-next

Jonathan writes:

Third set of new device support, features and cleanups for IIO in the 4.11 cycle

This also involves a merge of the ib-mid-iio-pwm-4.11 branch from mfd to
bring in support for the stm32 timer triggers needed for the buffered
features in the stm32 adc driver.

New device support:
* Amligic Meson SAR ADC
  - new driver and bindings
* cros_ec barometer
  - new driver
* max5481 digital potentiometers
  - new driver for 5481, 5482, 5483 and 5484
* Renesas GyroADC - a very specific spi offload engine for ADCs
  - new driver and bindings.
* srf08 ultrasonic ranger
  - new driver, bindings and ABI docs,

New features
* Qualcomm PM8xxx ADC bindings.
  - due to a trivial build issues the driver will be following shortly.
* stm32 ADC
  - Triggered buffer mode
  - Allow use of stm32 timer triggers
  - Add trigger polarity control
  - Optional DMA support with bindings update
* stx104
  - add support for gpio names
  - support set_multiple callback
* tmp007
  - optional interrupt support

Cleanups
* ad7150
  - alignment fix.
* ad7816
  - octal rather than symbolic permissions.
* lsm6dsx
  - allow selection of data ready pin via device tree bindings.
* ssp_sensors
  - use devm_iio_device_register to handle unregister automatically.
* stx104
  - use devm functions in probe allowing removal or the remove function.
  - drop unneeded struct stx104_dev
* tmp007
  - fix the name attribute to be a meaninful description of the part.

7 years agoiio: stx104: Add GPIO set_multiple callback function support
William Breathitt Gray [Thu, 19 Jan 2017 15:06:16 +0000 (10:06 -0500)]
iio: stx104: Add GPIO set_multiple callback function support

The Apex Embedded Systems STX104 series provides a digital output
register where 4 lines may be set at a time. This patch add support for
the set_multiple callback function, thus allowing multiple digital
output lines to be set more efficiently in groups.

Cc: Jonathan Cameron <jic23@kernel.org>
Cc: Hartmut Knaack <knaack.h@gmx.de>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Cc: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
7 years agoiio: adc: add device tree bindings for Qualcomm PM8xxx ADCs
Linus Walleij [Tue, 17 Jan 2017 14:25:13 +0000 (15:25 +0100)]
iio: adc: add device tree bindings for Qualcomm PM8xxx ADCs

This adds the device tree bindings for the Qualcomm PM8xxx
ADCs. This is based on the existing DT bindings for the
SPMI ADC so there are hopefully no controversial features.

Cc: devicetree@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-arm-msm@vger.kernel.org
Cc: Ivan T. Ivanov <iivanov.xz@gmail.com>
Cc: Andy Gross <andy.gross@linaro.org>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Rama Krishna Phani A <rphani@codeaurora.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
7 years agoiio: stx104: Add support for GPIO names
William Breathitt Gray [Mon, 30 Jan 2017 17:16:04 +0000 (12:16 -0500)]
iio: stx104: Add support for GPIO names

This patch sets the gpio_chip names option with an array of GPIO line
names that match the manual documentation for the Apex Embedded Systems
STX104. This should make it easier for users to identify which GPIO line
corresponds to a respective GPIO pin on the device.

Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
7 years agostaging: vc04_services: Make vchi_msg_queue static
Michael Zoran [Mon, 30 Jan 2017 07:31:11 +0000 (23:31 -0800)]
staging: vc04_services: Make vchi_msg_queue static

The vchi_msg_queue function which is used by other drivers
to queue a message is difficult to understand and overly
generic.

Make the function static and remove it from the exported
symbols.

Signed-off-by: Michael Zoran <mzoran@crowfest.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: vc04_services: Add vchi_queue_user_message function
Michael Zoran [Mon, 30 Jan 2017 07:31:10 +0000 (23:31 -0800)]
staging: vc04_services: Add vchi_queue_user_message function

The vchi_msg_queue function which is used by other drivers
to queue a message is difficult to understand and overly
generic.

Add a new function which is a wrapper on top of vchi_msg_queue
that is specifically for queuing a message located in user
address space.

int
vchi_queue_user_message(VCHI_SERVICE_HANDLE_T handle,
                        void __user *data,
                        unsigned int size)

Signed-off-by: Michael Zoran <mzoran@crowfest.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: vc04_services: Add vchi_queue_kernel_message function
Michael Zoran [Mon, 30 Jan 2017 07:31:09 +0000 (23:31 -0800)]
staging: vc04_services: Add vchi_queue_kernel_message function

The vchi_msg_queue function which is used by other drivers
to queue a message is difficult to understand and overly
generic.

Add a new function which is a wrapper on top of vchi_msg_queue
that is specifically for queuing a message located in kernel
address space.

int
vchi_queue_kernel_message(VCHI_SERVICE_HANDLE_T handle,
  void *data,
  unsigned int size)

Signed-off-by: Michael Zoran <mzoran@crowfest.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: bcm2835-audio: Simplify callback structure for write data
Michael Zoran [Sun, 29 Jan 2017 05:39:45 +0000 (21:39 -0800)]
staging: bcm2835-audio: Simplify callback structure for write data

The device sends data to the audio devices by sending a message with
the data through VC04_SERVICES/VCHIQ.  This message contains a
callback pointer that is always filled in with the same function.
This is prone to corruption issues.

Instead fill the callback fields with a fixed cookie value to perforam
some validation on the message response and call the handler function
directly instead of through the callback pointer.

Signed-off-by: Michael Zoran <mzoran@crowfest.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: bcm2835-audio: Remove code for non device tree init
Michael Zoran [Sun, 29 Jan 2017 05:39:44 +0000 (21:39 -0800)]
staging: bcm2835-audio: Remove code for non device tree init

The bcm2835-audio driver has a legacy code path for initializing
devices without a device tree.  Delete this code path and remove
the non device tree devices.

Signed-off-by: Michael Zoran <mzoran@crowfest.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: bcm2835-audio: Add TODO list
Michael Zoran [Sun, 29 Jan 2017 14:39:09 +0000 (06:39 -0800)]
staging: bcm2835-audio: Add TODO list

Add a TODO list of possible cleanup items.

Signed-off-by: Michael Zoran <mzoran@crowfest.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: bcm2835-v4l2: Apply spelling fixes from checkpatch.
Eric Anholt [Fri, 27 Jan 2017 21:55:03 +0000 (13:55 -0800)]
staging: bcm2835-v4l2: Apply spelling fixes from checkpatch.

Generated with checkpatch.pl --fix-inplace and git add -p out of the
results.

Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: bcm2835-v4l2: Apply many whitespace fixes from checkpatch.
Eric Anholt [Fri, 27 Jan 2017 21:55:02 +0000 (13:55 -0800)]
staging: bcm2835-v4l2: Apply many whitespace fixes from checkpatch.

Generated with checkpatch.pl --fix-inplace, some manual fixes for
cases where checkpatch fixed one out of multiple lines of mis-indented
function parameters, and then git add -p out of the results.

I skipped some fixes that should probably instead be replaced with the
BIT() macro.

Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: bcm2835-v4l2: Add a TODO file for improvements we need.
Eric Anholt [Fri, 27 Jan 2017 21:55:01 +0000 (13:55 -0800)]
staging: bcm2835-v4l2: Add a TODO file for improvements we need.

Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: bcm2835-v4l2: Add a build system for the module.
Eric Anholt [Fri, 27 Jan 2017 21:55:00 +0000 (13:55 -0800)]
staging: bcm2835-v4l2: Add a build system for the module.

This is derived from the downstream tree's build system, but with just
a single Kconfig option.

For now the driver only builds on 32-bit arm -- the aarch64 build
breaks due to the driver using arm-specific cache flushing functions.

Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: bcm2835-v4l2: Update the driver to the current VCHI API.
Eric Anholt [Fri, 27 Jan 2017 21:54:59 +0000 (13:54 -0800)]
staging: bcm2835-v4l2: Update the driver to the current VCHI API.

49bec49fd7f2 ("staging: vc04_services: remove vchiq_copy_from_user")
removed the flags/msg_handle arguments, which were unused, and pushed
the implementation of copying using memcpy vs copy_from_user to the
caller.

Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: Import the BCM2835 MMAL-based V4L2 camera driver.
Eric Anholt [Fri, 27 Jan 2017 21:54:58 +0000 (13:54 -0800)]
staging: Import the BCM2835 MMAL-based V4L2 camera driver.

- Supports raw YUV capture, preview, JPEG and H264.
- Uses videobuf2 for data transfer, using dma_buf.
- Uses 3.6.10 timestamping
- Camera power based on use
- Uses immutable input mode on video encoder

This code comes from the Raspberry Pi kernel tree (rpi-4.9.y) as of
a15ba877dab4e61ea3fc7b006e2a73828b083c52.

Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: unisys: visornic: Fix typo in visornic_main.c
Masanari Iida [Mon, 30 Jan 2017 03:32:31 +0000 (12:32 +0900)]
staging: unisys: visornic: Fix typo in visornic_main.c

This patch fix some spelling typos found in visornic_main.c

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Acked-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: wlan-ng: add missing byte order conversion
Igor Pylypiv [Tue, 31 Jan 2017 05:39:54 +0000 (21:39 -0800)]
staging: wlan-ng: add missing byte order conversion

Conversion macros le16_to_cpu was removed and that caused new sparse warning

sparse output:
drivers/staging/wlan-ng/p80211netdev.c:241:44: warning: incorrect type in argument 2 (different base types)
drivers/staging/wlan-ng/p80211netdev.c:241:44:    expected unsigned short [unsigned] [usertype] fc
drivers/staging/wlan-ng/p80211netdev.c:241:44:    got restricted __le16 [usertype] fc

Fixes: 7ad82572348c ("staging:wlan-ng:Fix sparse warning")
Signed-off-by: Igor Pylypiv <igor.pylypiv@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoStaging: speakup: speakup_bns: fix comment
Vitali Liaukovich [Sat, 28 Jan 2017 11:02:40 +0000 (13:02 +0200)]
Staging: speakup: speakup_bns: fix comment

Fixed comment formatting issue.

Signed-off-by: Vitali Liaukovich <vitali.liaukovich@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoStaging: speakup - syle fix permissions to octal
Derek Robson [Sat, 28 Jan 2017 06:35:01 +0000 (19:35 +1300)]
Staging: speakup - syle fix permissions to octal

A style fix across whole driver.
changed permissions to octal style, found using checkpatch

Signed-off-by: Derek Robson <robsonde@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoiio: tmp007: Fix `name` attribute ABI
Lars-Peter Clausen [Mon, 30 Jan 2017 10:18:25 +0000 (11:18 +0100)]
iio: tmp007: Fix `name` attribute ABI

The IIO ABI specifies the name field of the IIO device as:

Description of the physical chip / device for device X.
Typically a part number.

The tmp007 driver currently uses the name of the parent device instead.
Change this to the part name to be in accordance with the ABI.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
7 years agoiio: stx104: Remove unneeded struct stx104_dev code
William Breathitt Gray [Mon, 30 Jan 2017 13:58:50 +0000 (08:58 -0500)]
iio: stx104: Remove unneeded struct stx104_dev code

The stx104_dev structure was used to hold private data for use in the
stx104_remove function. Now that the stx104_remove function is gone, the
stx104_dev structure and relevant code is no longer needed. This patch
removes the unnecessary code.

Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
7 years agoiio: adc: stm32: add optional dma support
Fabrice Gasnier [Thu, 26 Jan 2017 14:28:33 +0000 (15:28 +0100)]
iio: adc: stm32: add optional dma support

Add DMA optional support to STM32 ADC, as there is a limited number DMA
channels (request lines) that can be assigned to ADC. This way, driver
may fall back using interrupts when all DMA channels are in use for
other IPs.
Use dma cyclic mode with two periods. Allow to tune period length by
using watermark. Coherent memory is used for dma (max buffer size is
fixed to PAGE_SIZE).

Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
7 years agoDocumentation: dt: iio: stm32-adc: optional dma support
Fabrice Gasnier [Thu, 26 Jan 2017 14:28:32 +0000 (15:28 +0100)]
Documentation: dt: iio: stm32-adc: optional dma support

STM32 ADC can use dma. Add dt documentation for optional dma support.

Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
7 years agoiio: adc: stm32: add trigger polarity extended attribute
Fabrice Gasnier [Thu, 26 Jan 2017 14:28:31 +0000 (15:28 +0100)]
iio: adc: stm32: add trigger polarity extended attribute

Define extended attribute so that user may choose rising, falling or both
edges for external trigger sources.
Default to rising edge in case it isn't set.

Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
7 years agoiio: adc: stm32: Enable use of stm32 timer triggers
Fabrice Gasnier [Thu, 26 Jan 2017 14:28:30 +0000 (15:28 +0100)]
iio: adc: stm32: Enable use of stm32 timer triggers

STM32 ADC has external timer trigger sources. Use stm32 timer triggers
API (e.g. is_stm32_timer_trigger()) with local ADC lookup table to
validate a trigger can be used.
This also provides correct trigger selection value (e.g. extsel).

Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
7 years agoiio: adc: stm32: add support for triggered buffer mode
Fabrice Gasnier [Thu, 26 Jan 2017 14:28:29 +0000 (15:28 +0100)]
iio: adc: stm32: add support for triggered buffer mode

STM32 ADC conversions can be launched using hardware triggers.
It can be used to start conversion sequences (group of channels).
Selected channels are select via sequence registers.
Trigger source is selected via 'extsel' (external trigger mux).
Trigger polarity is set to rising edge by default.

Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
7 years agoMerge tag 'ib-mfd-iio-pwm-4.11' into test
Jonathan Cameron [Sat, 28 Jan 2017 18:21:49 +0000 (18:21 +0000)]
Merge tag 'ib-mfd-iio-pwm-4.11' into test

Immutable branch between MFD, IIO and PWM due for the v4.11 merge window

Pulled into IIO to allow follow up series of triggered capture for the
STM32 ADCs.

7 years agoiio: distance: srf08: add driver ABI documentation
Andreas Klinger [Wed, 25 Jan 2017 19:07:47 +0000 (20:07 +0100)]
iio: distance: srf08: add driver ABI documentation

Add sysfs-bus-iio-distance-srf08 for individual attributes of the driver,
especially:
 - sensitivity which the device documentation calls gain for amplifying the
   signal
 - max_range for limiting the maximum distance for expected echos and
   therefore limiting the time waiting for telegrams

Signed-off-by: Andreas Klinger <ak@it-klinger.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
7 years agoiio: distance: srf08: add IIO driver for us ranger
Andreas Klinger [Wed, 25 Jan 2017 19:07:19 +0000 (20:07 +0100)]
iio: distance: srf08: add IIO driver for us ranger

This is the IIO driver for devantech srf08 ultrasonic ranger which can be
used to measure the distances to an object.

The sensor supports I2C with some registers.

Supported Features include:
 - read the distance in ranging mode in centimeters
 - output of the driver is directly the read value
 - together with the scale the driver delivers the distance in meters
 - only the first echo of the nearest object is delivered
 - set sensitivity as analog value in the range of 0-31  means setting
   gain register on device
 - set range registers; userspace enters max. range in millimeters in
   43 mm steps

Features not supported by this driver:
 - ranging mode in inches or in microseconds
 - ANN mode
 - change I2C address through this driver
 - light sensor

The driver was added in the directory "proximity" of the iio subsystem and
the menu in den config is now called "Proximity and distance sensors"

Signed-off-by: Andreas Klinger <ak@it-klinger.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
7 years agoiio: distance: srf08: add trivial DT binding
Andreas Klinger [Wed, 25 Jan 2017 19:06:48 +0000 (20:06 +0100)]
iio: distance: srf08: add trivial DT binding

 - Add DT binding for devantech,srf08
 - Add vendor devantech to vendor list

Signed-off-by: Andreas Klinger <ak@it-klinger.de>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
7 years agoiio: cros_ec: Add cros_ec barometer driver
Gwendal Grignou [Tue, 24 Jan 2017 13:41:41 +0000 (14:41 +0100)]
iio: cros_ec: Add cros_ec barometer driver

Handle the barometer sensor presented by the ChromeOS EC Sensor hub.

Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Signed-off-by: Enric Balletbo Serra <enric.balletbo@collabora.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
7 years agoiio: stx104: Utilize devm_ functions in driver probe callback
William Breathitt Gray [Tue, 24 Jan 2017 20:26:17 +0000 (15:26 -0500)]
iio: stx104: Utilize devm_ functions in driver probe callback

The devm_ resource manager functions allow memory to be automatically
released when a device is unbound. This patch takes advantage of the
resource manager functions and replaces the gpiochip_add_data call and
iio_device_register call with the devm_gpiochip_add_data call and
devm_iio_device_register call respectively. In addition, the
stx104_remove function has been removed as no longer necessary due to
the use of the relevant devm_ resource manager functions.

Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
7 years agoDocumentation: dt: iio: imu: st_lsm6dsx: add st,drdy-int-pin property
Lorenzo Bianconi [Sun, 22 Jan 2017 18:32:25 +0000 (19:32 +0100)]
Documentation: dt: iio: imu: st_lsm6dsx: add st,drdy-int-pin property

Add st,drdy-int-pin property to select interrupt pin of the package

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@st.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
7 years agoiio: imu: st_lsm6dsx: add possibility to select drdy pin
Lorenzo Bianconi [Sun, 22 Jan 2017 18:32:24 +0000 (19:32 +0100)]
iio: imu: st_lsm6dsx: add possibility to select drdy pin

Add capability to route data ready signal on pin 1 or pin 2 of the package

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@st.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
7 years agoiio: adc: add a driver for the SAR ADC found in Amlogic Meson SoCs
Martin Blumenstingl [Sun, 22 Jan 2017 18:17:13 +0000 (19:17 +0100)]
iio: adc: add a driver for the SAR ADC found in Amlogic Meson SoCs

This adds support for the SAR (Successive Approximation Register) ADC
on the Amlogic Meson SoCs.

The code is based on the public S805 (Meson8b) and S905 (GXBB)
datasheets (see [0] and [1]), as well as by reading (various versions
of) the vendor driver and by inspecting the registers on the vendor
kernels of my testing-hardware.

Currently the GXBB, GXL and GXM SoCs are supported. GXBB hardware has
10-bit ADC resolution, while GXL and GXM have 12-bit ADC resolution.
The code was written to support older SoCs (Meson8 and Meson8b) as well,
but due to lack of actual testing-hardware no of_device_id was added for
these.

Two "features" from the vendor driver are currently missing:
- the vendor driver uses channel #7 for calibration (this improves the
  accuracy of the results - in my tests the results were less than 3%
  off without calibration compared to the vendor driver). Adding support
  for this should be easy, but is not required for most applications.
- channel #6 is connected to the SoCs internal temperature sensor.
  Adding support for this is probably not so easy since (based on the
  u-boot sources) most SoC versions are using different registers and
  algorithms for the conversion from "ADC value" to temperature.

Supported by the hardware but currently not supported by the driver:
- reading multiple channels at the same time (the hardware has a FIFO
  buffer which stores multiple results)
- continuous sampling (this would require a way to enable this
  individually because otherwise the ADC would be drawing power
  constantly)
- interrupt support (similar to the vendor driver this new driver is
  polling the results. It is unclear if the IRQ-mode is supported on
  older (Meson6 or Meson8) hardware as well or if there are any errata)

[0]
http://dn.odroid.com/S805/Datasheet/S805_Datasheet%20V0.8%2020150126.pdf
[1] http://dn.odroid.com/S905/DataSheet/S905_Public_Datasheet_V1.1.4.pdf

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Tested-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
7 years agoDocumentation: dt-bindings: add the Amlogic Meson SAR ADC documentation
Martin Blumenstingl [Sun, 22 Jan 2017 18:17:12 +0000 (19:17 +0100)]
Documentation: dt-bindings: add the Amlogic Meson SAR ADC documentation

This adds the devicetree binding documentation for the SAR ADC found in
Amlogic Meson SoCs.
Currently only the GXBB, GXL and GXM SoCs are supported.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Tested-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
7 years agoStaging: iio: adc: ad7816: fix symbolic permissions coding style issue
Julián de Gortari [Mon, 23 Jan 2017 18:08:29 +0000 (12:08 -0600)]
Staging: iio: adc: ad7816: fix symbolic permissions coding style issue

Octal permissions should be used instead of symbolic ones for easier
reading.

Signed-off-by: Julián de Gortari <kiototeko@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
7 years agodrivers:staging:iio:cdc: Style fix.
Anthony Brandon [Mon, 23 Jan 2017 13:14:12 +0000 (14:14 +0100)]
drivers:staging:iio:cdc: Style fix.

Align parameters to parentheses.

Signed-off-by: Anthony Brandon <anthony@amarulasolutions.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
7 years agoiio: common: ssp_sensors: gyro: use devm_iio_device_register()
Wei Yongjun [Sun, 22 Jan 2017 17:15:06 +0000 (17:15 +0000)]
iio: common: ssp_sensors: gyro: use devm_iio_device_register()

Use devm_iio_device_register() for IIO subsystem device
registration and delete the remove function since there
is no need after this change.

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
7 years agoiio: common: ssp_sensors: accel: use devm_iio_device_register()
Wei Yongjun [Sun, 22 Jan 2017 16:36:12 +0000 (16:36 +0000)]
iio: common: ssp_sensors: accel: use devm_iio_device_register()

Use devm_iio_device_register() for IIO subsystem device
registration and delete the remove function since there
is no need after this change.

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
7 years agoiio: max5481: Add support for Maxim digital potentiometers
Matt Weber [Thu, 26 Jan 2017 20:26:15 +0000 (21:26 +0100)]
iio: max5481: Add support for Maxim digital potentiometers

Add implementation for Maxim Integrated 5481, 5482, 5483,
and 5484 digital potentiometer devices.

Datasheet:
http://datasheets.maximintegrated.com/en/ds/MAX5481-MAX5484.pdf

Signed-off-by: Maury Anderson <maury.anderson@rockwellcollins.com>
Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com>
Signed-off-by: Slawomir Stepien <sst@poczta.fm>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
7 years agoDocumentation: dt-bindings: tmp007: Add optional interrupt support
Manivannan Sadhasivam [Mon, 23 Jan 2017 16:28:09 +0000 (21:58 +0530)]
Documentation: dt-bindings: tmp007: Add optional interrupt support

This patch adds optional interrupt binding support for TI TMP007 - IR thermopiler sensor

Signed-off-by: Manivannan Sadhasivam <manivannanece23@gmail.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
7 years agoiio: adc: Add Renesas GyroADC driver
Marek Vasut [Fri, 27 Jan 2017 23:08:37 +0000 (00:08 +0100)]
iio: adc: Add Renesas GyroADC driver

Add IIO driver for the Renesas RCar GyroADC block. This block is a
simple 4/8-channel ADC which samples 12/15/24 bits of data every
cycle from all channels.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Simon Horman <horms+renesas@verge.net.au>
Cc: Jonathan Cameron <jic23@kernel.org>
Cc: linux-renesas-soc@vger.kernel.org
Cc: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
7 years agoiio: adc: Add Renesas GyroADC bindings
Marek Vasut [Fri, 27 Jan 2017 23:08:36 +0000 (00:08 +0100)]
iio: adc: Add Renesas GyroADC bindings

Add DT bindings for the Renesas RCar GyroADC block. This block is
a simple 4/8-channel ADC which samples 12/15/24 bits of data every
cycle from all channels.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Simon Horman <horms+renesas@verge.net.au>
Cc: Jonathan Cameron <jic23@kernel.org>
Cc: linux-renesas-soc@vger.kernel.org
Cc: Wolfram Sang <wsa@the-dreams.de>
Cc: Rob Herring <robh@kernel.org>
Acked-by: Rob Herring <robh@kernel.org>
Cc: devicetree@vger.kernel.org
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
7 years agostaging: lustre: lnet: Fix coding style errors
Maxime Rossi Bellom [Fri, 27 Jan 2017 10:58:52 +0000 (11:58 +0100)]
staging: lustre: lnet: Fix coding style errors

Replace a mix of tabs and spaces indentation by tabs only.

Errors were reported by checkpatch.pl as
WARNING: Statements should start on a tabstop
WARNING: suspect code indent for conditional statement

Signed-off-by: Maxime Rossi Bellom <mrossibellom@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: rtl8188eu: Fix coding style issues
William Blough [Fri, 27 Jan 2017 18:54:26 +0000 (13:54 -0500)]
staging: rtl8188eu: Fix coding style issues

Convert leading spaces to tabs

Signed-off-by: William Blough <devel@blough.us>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: xgifb: XGI_main_26: Remove multiple assignments
sayli karnik [Fri, 27 Jan 2017 19:14:36 +0000 (00:44 +0530)]
staging: xgifb: XGI_main_26: Remove multiple assignments

This patch resolves the checkpatch issue:
multiple assignments should be avoided

Signed-off-by: sayli karnik <karniksayli1995@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: bcm2835-audio: initial staging submission
Michael Zoran [Thu, 26 Jan 2017 00:39:49 +0000 (16:39 -0800)]
staging: bcm2835-audio: initial staging submission

Initial cleanup of bcm2835-audio driver for the
bcm2535(Raspberry PI)

Driver provides HDMI audio through ALSA and is built
on top of the vc04_services driver.

Original version of the driver is available at:
http://www.github.com/raspberry/linux

Driver compiles without any build errors or warnings.

Tested on a RPI 3 running in ARM64 mode with the
vlc player and alsautils.

Signed-off-by: Michael Zoran <mzoran@crowfest.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging/rtl8192u: add endianness conversions
Colin Vidal [Thu, 26 Jan 2017 19:22:00 +0000 (20:22 +0100)]
staging/rtl8192u: add endianness conversions

Fields frag_size and playload_size of struct ieee80211_txb are encoded
as short little-endian. This patch adds conversions to / from cpu byte
order when copy / write these values in variables of architecture
independent byte order. It also avoid a sparse type warning.

Signed-off-by: Colin Vidal <colin@cvidal.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: rtl8192u: Adding space after ','
simran singhal [Thu, 26 Jan 2017 22:09:36 +0000 (03:39 +0530)]
staging: rtl8192u: Adding space after ','

This patch fixes the checkpatch issue by adding space after ','.

Signed-off-by: simran singhal <singhalsimran0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: rtl8192u: Adding space around '='
simran singhal [Thu, 26 Jan 2017 21:31:34 +0000 (03:01 +0530)]
staging: rtl8192u: Adding space around '='

This patch fixes the checkpatch issue by adding space around '='.

Signed-off-by: simran singhal <singhalsimran0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: vt6656: Add missing identifier names
=?UTF-8?q?Simon=20Sandstr=C3=B6m?= [Thu, 26 Jan 2017 21:29:48 +0000 (22:29 +0100)]
staging: vt6656: Add missing identifier names

Fix multiple checkpatch.pl warnings:
function definition argument '...' should also have an identifier name

Signed-off-by: Simon Sandström <simon@nikanor.nu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: lustre: llite: use octal permissions
Ernestas Kulik [Tue, 24 Jan 2017 17:40:50 +0000 (19:40 +0200)]
staging: lustre: llite: use octal permissions

Using octal permissions instead of symbolic ones is preferred.

Signed-off-by: Ernestas Kulik <ernestas.kulik@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: lustre: libcfs: use octal permissions
Ernestas Kulik [Tue, 24 Jan 2017 17:40:49 +0000 (19:40 +0200)]
staging: lustre: libcfs: use octal permissions

Using octal permissions instead of symbolic ones is preferred.

Signed-off-by: Ernestas Kulik <ernestas.kulik@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: lustre: ptlrpc: avoid warning on missing return
Arnd Bergmann [Wed, 25 Jan 2017 22:36:34 +0000 (23:36 +0100)]
staging: lustre: ptlrpc: avoid warning on missing return

The newly added function triggers a harmless warning:

drivers/staging/lustre/lustre/ptlrpc/pack_generic.c: In function 'lustre_shrink_msg':
drivers/staging/lustre/lustre/ptlrpc/pack_generic.c:472:1: error: control reaches end of non-void function [-Werror=return-type]

This probably happens because LASSERTF() contains an 'unlikely()' that
sometimes prevents gcc from analysing the control flow correctly.
Adding a return statement here seems harmless and lets us keep that
unlikely().

Fixes: 96049bd1ecd0 ("staging: lustre: ptlrpc: embed highest XID in each request")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: most: hdm-usb: fix symbolic permissions warning
Sebastian Haas [Wed, 25 Jan 2017 22:47:43 +0000 (23:47 +0100)]
staging: most: hdm-usb: fix symbolic permissions warning

Replace symbolic permissions with their octect representation to fix
checkpatch warnings.

Signed-off-by: Sebastian Haas <sehaas@deebas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: fbtft: fix unaligned parentheses
Umang Raghuvanshi [Thu, 26 Jan 2017 14:40:59 +0000 (14:40 +0000)]
staging: fbtft: fix unaligned parentheses

Fix the following formatting issues:
CHECK: Alignment should match open parenthesis

Signed-off-by: Umang Raghuvanshi <u@umangis.me>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: greybus: loopback: fix broken udelay
Johan Hovold [Thu, 26 Jan 2017 11:37:32 +0000 (12:37 +0100)]
staging: greybus: loopback: fix broken udelay

The loopback driver allows the user to set a minimum delay of up to one
second to be inserted between test iterations (i.e. request
submissions). The delay is currently specified in microseconds and is
implemented using udelay.

Busy looping for long periods is not just anti-social; udelay must not
be used for delays longer than a few milliseconds due to the risk of
integer overflow.

Replace the broken udelay with a usleep_range with a 100 us range for
short delays (< 20 ms) and otherwise revert to using msleep.

Fixes: b36f04fa9417 ("greybus: loopback: Convert thread delay to microseconds")
Signed-off-by: Johan Hovold <johan@kernel.org>
Cc: stable <stable@vger.kernel.org> # 4.9+
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: greybus: sdio: Prefer u32 over uint32_t
Franck Demathieu [Wed, 25 Jan 2017 17:38:01 +0000 (18:38 +0100)]
staging: greybus: sdio: Prefer u32 over uint32_t

It fixes the following issue reported by checkpatch.pl:
Prefer kernel type 'u32' over 'uint32_t'

Signed-off-by: Franck Demathieu <fdemathieu@gmail.com>
Acked-by: Rui Miguel Silva <rmfrfs@gmail.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: greybus: uart: fix TIOCGSERIAL flags
Johan Hovold [Wed, 25 Jan 2017 17:07:52 +0000 (18:07 +0100)]
staging: greybus: uart: fix TIOCGSERIAL flags

This driver does not have a low-latency mode and should not report
anything else.

Also drop the skip-test flag which isn't used either.

Signed-off-by: Johan Hovold <johan@kernel.org>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoiio: Add STM32 timer trigger driver
Benjamin Gaignard [Fri, 20 Jan 2017 09:15:07 +0000 (10:15 +0100)]
iio: Add STM32 timer trigger driver

Timers IPs can be used to generate triggers for other IPs like
DAC or ADC.
Each trigger may result of timer internals signals like counter enable,
reset or edge, this configuration could be done through "master_mode"
device attribute.

Since triggers could be used by DAC or ADC their names are defined
in include/ nux/iio/timer/stm32-timer-trigger.h and is_stm32_iio_timer_trigger
function could be used to check if the trigger is valid or not.

"trgo" trigger have a "sampling_frequency" attribute which allow to configure
timer sampling frequency.

version 8:
- change kernel version from 4.10 to 4.11 in ABI documentation

version 7:
- remove all iio_device related code
- move driver into trigger directory

version 5:
- simplify tables of triggers
- only create an IIO device when needed

version 4:
- get triggers configuration from "reg" in DT
- add tables of triggers
- sampling frequency is enable/disable when writing in trigger
  sampling_frequency attribute
- no more use of interruptions

version 3:
- change compatible to "st,stm32-timer-trigger"
- fix attributes access right
- use string instead of int for master_mode and slave_mode
- document device attributes in sysfs-bus-iio-timer-stm32

version 2:
- keep only one compatible
- use st,input-triggers-names and st,output-triggers-names
  to know which triggers are accepted and/or create by the device

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
7 years agoiio: Add bindings for STM32 timer trigger driver
Benjamin Gaignard [Fri, 20 Jan 2017 09:15:06 +0000 (10:15 +0100)]
iio: Add bindings for STM32 timer trigger driver

Define bindings for STM32 timer trigger

version 8:
- reword "reg" parameter description

version 4:
- remove triggers enumeration from DT
- add reg parameter

version 3:
- change file name
- add cross reference with mfd bindings

version 2:
- only keep one compatible
- add DT parameters to set lists of the triggers:
  one list describe the triggers created by the device
  another one give the triggers accepted by the device

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
7 years agopwm: Add driver for STM32 plaftorm
Benjamin Gaignard [Fri, 20 Jan 2017 09:15:05 +0000 (10:15 +0100)]
pwm: Add driver for STM32 plaftorm

This driver adds support for PWM driver on STM32 platform.
The SoC have multiple instances of the hardware IP and each
of them could have small differences: number of channels,
complementary output, auto reload register size...

version 9:
- fix commit message header
- remove one space MODULE_ALIAS

version 8:
- fix comments done by Thierry on version 7

version 6:
- change st,breakinput parameter to make it usuable for stm32f7 too.

version 4:
- detect at probe time hardware capabilities
- fix comments done on v2 and v3
- use PWM atomic ops

version 2:
- only keep one comptatible
- use DT parameters to discover hardware block configuration

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
7 years agostaging: fbtft: fix checkpatch decimal permissions error
Abdul Rauf [Tue, 24 Jan 2017 00:20:10 +0000 (00:20 +0000)]
staging: fbtft: fix checkpatch decimal permissions error

Fix the following errors:
Use 4 digit octal (0777) not decimal permissions

Signed-off-by: Abdul Rauf <abdulraufmujahid@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoStaging: rtl8712: fix spelling errors
Joseph Wright [Tue, 24 Jan 2017 08:17:18 +0000 (08:17 +0000)]
Staging: rtl8712: fix spelling errors

Found by checkpatch:
- s/cacluated/calculated/
- s/convertor/converter/
- s/psudo/pseudo/
- s/halfs/halves/

Signed-off-by: Joseph Wright <rjosephwright@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: fbtft: remove duplicate entries of ili9225
Amitesh Singh [Tue, 24 Jan 2017 17:46:14 +0000 (23:16 +0530)]
staging: fbtft: remove duplicate entries of ili9225

There are multiple entries for ili9225 display defined in
flexfb_chip_table array. remove duplicate entries and
keep single entry.

Signed-off-by: Amitesh Singh <singh.amitesh@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agodt-bindings: pwm: Add STM32 bindings
Benjamin Gaignard [Fri, 20 Jan 2017 09:15:04 +0000 (10:15 +0100)]
dt-bindings: pwm: Add STM32 bindings

Define bindings for pwm-stm32

version 9:
- change commit message header

version 8:
- reword st,breakinput description.

version 6:
- change st,breakinput parameter format to make it usuable on stm32f7 too.

version 2:
- use parameters instead of compatible of handle the hardware configuration

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>
Acked-by: Rob Herring <robh@kernel.org>
Acked-by: Thierry Reding <thierry.reding@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
7 years agomfd: Add STM32 Timers driver
Benjamin Gaignard [Fri, 20 Jan 2017 09:15:03 +0000 (10:15 +0100)]
mfd: Add STM32 Timers driver

This hardware block could at used at same time for PWM generation
and IIO timers.
PWM and IIO timer configuration are mixed in the same registers
so we need a multi fonction driver to be able to share those registers.

version 7:
- rebase on v4.10-rc2

version 6:
- rename files to stm32-timers
- rename functions to stm32_timers_xxx

version 5:
- fix Lee comments about detect function
- add missing dependency on REGMAP_MMIO

version 4:
- add a function to detect Auto Reload Register (ARR) size
- rename the structure shared with other drivers

version 2:
- rename driver "stm32-gptimer" to be align with SoC documentation
- only keep one compatible
- use of_platform_populate() instead of devm_mfd_add_devices()

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
7 years agodt-bindings: mfd: Add bindings for STM32 Timers driver
Benjamin Gaignard [Fri, 20 Jan 2017 09:15:02 +0000 (10:15 +0100)]
dt-bindings: mfd: Add bindings for STM32 Timers driver

Add bindings information for STM32 Timers

version 6:
- rename stm32-gtimer to stm32-timers
- change compatible
- add description about the IPs

version 2:
- rename stm32-mfd-timer to stm32-gptimer
- only keep one compatible string

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
7 years agostaging: media: lirc: use new parport device model
Sudip Mukherjee [Sat, 21 Jan 2017 00:55:54 +0000 (00:55 +0000)]
staging: media: lirc: use new parport device model

Modify lirc_parallel driver to use the new parallel port device model.

Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>