summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* staging: lustre: ptlrpc: set proper mbits for EINPROGRESS resendNiu Yawei2017-02-032-4/+8
| | | | | | | | | | | | | 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>
* staging: lustre: clio: revise readahead to support 16MB IOJinshan Xiong2017-02-035-112/+114
| | | | | | | | | | | | | | | | | 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>
* staging: lustre: mdc: quiet console message for known -EINTRAndreas Dilger2017-02-031-16/+13
| | | | | | | | | | | | | | | | 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>
* staging: lustre: clio: add cl_page LRU shrinkerBobi Jam2017-02-035-0/+120
| | | | | | | | | | | | | 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>
* staging: lustre: statahead: drop support for remote entryLai Siyao2017-02-036-84/+68
| | | | | | | | | | | | | | | | | | | | 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>
* staging: lustre: llite: Remove access of stripe in ll_setattr_rawJinshan Xiong2017-02-038-79/+68
| | | | | | | | | | | | | | | | | | 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>
* staging: rtl8188eu: remove not necessary braces {} (checkpatch fix)Martin Karamihov2017-02-031-2/+1
| | | | | | | | 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>
* staging: greybus: Remove duplicate include fileMasanari Iida2017-02-031-1/+0
| | | | | | | This patch removed duplicated include line. Signed-off-by: Masanari Iida <standby24x7@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rts5208: remove unncessary result set and check, just return SUCCESSColin Ian King2017-02-031-4/+2
| | | | | | | | 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>
* staging: rts5208: remove redundant retval status checkColin Ian King2017-02-031-6/+0
| | | | | | | | | | | | | 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>
* staging: fbtft: change 'gamma' array to u32Arnd Bergmann2017-02-0322-26/+26
| | | | | | | | | | | | | | | | 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>
* staging: rtl8192u: move stats_IndicateArray off stackArnd Bergmann2017-02-032-3/+3
| | | | | | | | | | | | | | 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>
* staging: bcm2835: don't mark 'bcm2835_v4l2_debug' as staticArnd Bergmann2017-02-021-1/+1
| | | | | | | | | | | | | | 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>
* staging: rtl8192e: Aligning the * on each line in block commentsArushi2017-02-021-1/+1
| | | | | | | 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>
* staging: unisys: visorbus: get rid of unused payload infoDavid Kershner2017-02-021-98/+3
| | | | | | | | | | 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>
* staging: unisys: visorbus: remove putfile data structuresDavid Kershner2017-02-021-54/+0
| | | | | | | | | 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>
* staging: unisys: visornic: prevent hang doing 'modprobe -r visornic'Tim Sell2017-02-021-4/+1
| | | | | | | | | | | | | | | | | 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>
* staging: unisys: visorbus: Consolidate kobject functionsDavid Binder2017-02-021-45/+31
| | | | | | | | | | 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>
* staging: unisys: visorbus: Check controlvm message payload sizeDavid Binder2017-02-021-0/+4
| | | | | | | | | | 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>
* staging: unisys: visorbus: Remove unused struct in visorchannel.cDavid Binder2017-02-021-6/+0
| | | | | | | | | 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>
* staging: bcm2835-audio: fix style problem in vc_vchi_audioserv_defs.hMiquel Raynal2017-02-021-1/+1
| | | | | | | | 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>
* staging: bcm2835-audio: use | instead of || otherwise result is just boolean 1Colin Ian King2017-02-021-2/+2
| | | | | | | | | | | | | 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>
* staging: lustre: remove CLASSERT macroArnd Bergmann2017-02-0229-285/+269
| | | | | | | | | | | | | | | | 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>
* staging: bcm2835: mark all symbols as 'static'Arnd Bergmann2017-02-021-3/+3
| | | | | | | | | | | | | | | | 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>
* staging: bcm2835-audio: fix empty-body warningArnd Bergmann2017-02-021-3/+3
| | | | | | | | | | | | | | 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>
* staging: bcm2835-audio: remove incorrect include pathArnd Bergmann2017-02-021-1/+1
| | | | | | | | | | | | | | 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>
* staging: bcm2835-v4l: remove incorrect include pathArnd Bergmann2017-02-021-1/+0
| | | | | | | | | | | | | | | | 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>
* staging: bcm2835/mmal-vchiq: Replace call to vchi_msg_queue with ↵Michael Zoran2017-02-021-15/+8
| | | | | | | | | | | | 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>
* staging: bcm2835-audio: Replace call to vchi_msg_queue with ↵Michael Zoran2017-02-021-12/+3
| | | | | | | | | | | | 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>
* Merge tag 'iio-for-4.11c' of ↵Greg Kroah-Hartman2017-02-0252-115/+4673
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/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.
| * iio: stx104: Add GPIO set_multiple callback function supportWilliam Breathitt Gray2017-02-011-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * iio: adc: add device tree bindings for Qualcomm PM8xxx ADCsLinus Walleij2017-01-311-0/+149
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * iio: stx104: Add support for GPIO namesWilliam Breathitt Gray2017-01-311-1/+7
| | | | | | | | | | | | | | | | | | | | | | 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>
| * iio: tmp007: Fix `name` attribute ABILars-Peter Clausen2017-01-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * iio: stx104: Remove unneeded struct stx104_dev codeWilliam Breathitt Gray2017-01-301-19/+0
| | | | | | | | | | | | | | | | | | | | 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>
| * iio: adc: stm32: add optional dma supportFabrice Gasnier2017-01-294-14/+219
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * Documentation: dt: iio: stm32-adc: optional dma supportFabrice Gasnier2017-01-281-0/+7
| | | | | | | | | | | | | | | | 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>
| * iio: adc: stm32: add trigger polarity extended attributeFabrice Gasnier2017-01-282-1/+63
| | | | | | | | | | | | | | | | | | 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>
| * iio: adc: stm32: Enable use of stm32 timer triggersFabrice Gasnier2017-01-282-0/+67
| | | | | | | | | | | | | | | | | | | | 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>
| * iio: adc: stm32: add support for triggered buffer modeFabrice Gasnier2017-01-282-21/+298
| | | | | | | | | | | | | | | | | | | | | | 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>
| * Merge tag 'ib-mfd-iio-pwm-4.11' into testJonathan Cameron2017-01-2815-0/+1118
| |\ | | | | | | | | | | | | | | | | | | 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.
| | * iio: Add STM32 timer trigger driverBenjamin Gaignard2017-01-255-0/+443
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * iio: Add bindings for STM32 timer trigger driverBenjamin Gaignard2017-01-251-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * pwm: Add driver for STM32 plaftormBenjamin Gaignard2017-01-253-0/+407
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * dt-bindings: pwm: Add STM32 bindingsBenjamin Gaignard2017-01-231-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * mfd: Add STM32 Timers driverBenjamin Gaignard2017-01-234-0/+164
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * dt-bindings: mfd: Add bindings for STM32 Timers driverBenjamin Gaignard2017-01-231-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | iio: distance: srf08: add driver ABI documentationAndreas Klinger2017-01-281-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | iio: distance: srf08: add IIO driver for us rangerAndreas Klinger2017-01-283-1/+411
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | iio: distance: srf08: add trivial DT bindingAndreas Klinger2017-01-282-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | - 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>