Commit Graph

826038 Commits

Author SHA1 Message Date
Sidong Yang 7be2b288be staging: pi433: add dependency to PA0, 1, 2 setting for output power level
When setting output power level called, the power level should be
checked by power amplifier level register and high power option. There
was todo about it. Add some variables for checking power level range.
The values that used for checking high power or minimum power are from
rf69 datasheets. The maximum power level is always same regardless of
mode.

Signed-off-by: Sidong Yang <realwakka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-16 13:44:30 +02:00
Madhumitha Prabakaran fb56386074 Staging: vc04_services: bcm2835-camera: Remove an exceptional &
Remove an exceptional & on function names, otherwise they are used as
pointers without &.

Issue suggested using Coccinelle.

Signed-off-by: Madhumitha Prabakaran <madhumithabiw@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-16 13:44:30 +02:00
Cesar Santos 9fdb04e9cc staging: vt6655: upc: remove double blank lines
Fix checkpatch warning "CHECK: Please don't use multiple blank lines"
on upc.h

Signed-off-by: Cesar Santos <dev.cmsantos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-16 13:44:30 +02:00
Antti Keränen 94f99bceda staging: mt7621-pci-phy: prevent use of uninitialized variable
Do not use uninitialized variable 'port' when printing an error message

Signed-off-by: Antti Keränen <detegr@gmail.com>
Reviewed-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-16 13:44:30 +02:00
Gustavo A. R. Silva e291fa1237 staging: ralink-gdma: Use struct_size() in kzalloc()
One of the more common cases of allocation size calculations is finding
the size of a structure that has a zero-sized array at the end, along
with memory for some number of elements for that array. For example:

struct foo {
    int stuff;
    struct boo entry[];
};

size = sizeof(struct foo) + count * sizeof(struct boo);
instance = kzalloc(size, GFP_KERNEL)

Instead of leaving these open-coded and prone to type mistakes, we can
now use the new struct_size() helper:

size = struct_size(instance, entry, count);

or

instance = kzalloc(struct_size(instance, entry, count), GFP_KERNEL)

Based on the above, replace gdma_dma_alloc_desc() with kzalloc() and
use the new struct_size() helper.

This code was detected with the help of Coccinelle.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-16 13:44:30 +02:00
Madhumitha Prabakaran 3b706841c2 Staging: rtlwifi: Cleanup crc16_ccitt()
crc16_ccitt() function does "BIT(0) << i" instead of "BIT(i)".
Using !! is slightly shorter than "foo ? 1: 0" and remove unnecessary
parentheses to make the code simple.

Issue suggested by Coccinelle.

Signed-off-by: Madhumitha Prabakaran <madhumithabiw@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-16 13:44:30 +02:00
Madhumitha Prabakaran d5d682270f Staging: rtlwifi: Remove & on function name
Function name is otherwise used as pointers without &.

Issue suggested by Coccinelle.

Signed-off-by: Madhumitha Prabakaran <madhumithabiw@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-16 13:44:30 +02:00
YueHaibing e7cc9eba71 staging: rtlwifi: base: Remove set but not used variables
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/staging/rtlwifi/base.c: In function 'rtl_tx_agg_stop':
drivers/staging/rtlwifi/base.c:1733:23: warning:
 variable 'tid_data' set but not used [-Wunused-but-set-variable]

drivers/staging/rtlwifi/base.c: In function 'rtl_check_beacon_key':
drivers/staging/rtlwifi/base.c:2474:5: warning:
 variable 'ds_param_len' set but not used [-Wunused-but-set-variable]

drivers/staging/rtlwifi/base.c:2472:5: warning:
 variable 'ht_oper_len' set but not used [-Wunused-but-set-variable]

drivers/staging/rtlwifi/base.c:2470:5: warning:
 variable 'ht_cap_len' set but not used [-Wunused-but-set-variable]

They are never used and can be removed.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-16 13:44:30 +02:00
Gabriela Bittencourt 8eee2c467d Staging: hal: hal_com_phycfg: fixed a coding style issue
Added a blank line after declarations.

Signed-off-by: Gabriela Bittencourt <gabrielabittencourt00@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-16 13:44:30 +02:00
Bartlomiej Zolnierkiewicz 031ba1fd91 staging: remove redundant 'default n' from Kconfig
'default n' is the default value for any bool or tristate Kconfig
setting so there is no need to write it explicitly.

Also since commit f467c5640c ("kconfig: only write '# CONFIG_FOO
is not set' for visible symbols") the Kconfig behavior is the same
regardless of 'default n' being present or not:

    ...
    One side effect of (and the main motivation for) this change is making
    the following two definitions behave exactly the same:

        config FOO
                bool

        config FOO
                bool
                default n

    With this change, neither of these will generate a
    '# CONFIG_FOO is not set' line (assuming FOO isn't selected/implied).
    That might make it clearer to people that a bare 'default n' is
    redundant.
    ...

Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-16 13:39:01 +02:00
Moses Christopher 827ad2c7b3 staging: axis-fifo: Add elaborate description in Kconfig
- The Xilinx AXI-Stream FIFO IP core driver description is elaborated.
  - References: Xilinx PG080 document, axis-fifo.txt

Signed-off-by: Moses Christopher <moseschristopherb@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-16 13:38:15 +02:00
Madhumitha Prabakaran affbeba3a2 Staging: rtl8723bs: Remove typedef in struct sdio_data
Remove typedef in struct sdio_data and make the respective changes in
associated files, as the struct that has elements that can reasonably
be directly accessed should never be a typedef.

Signed-off-by: Madhumitha Prabakaran <madhumithabiw@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-16 13:32:19 +02:00
Daniel Junho e00fd8ecaa staging: rtl8192e: remove a blank line
Fix the checkpath error:
CHECK: Blank lines aren't necessary after an open brace '{'

Signed-off-by: Daniel Junho <djunho@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-16 13:32:19 +02:00
Gabriela Bittencourt 08ce43b9c5 staging: rtl8192e: Remove a not necessary blank line before a close brace '}'
Fix a coding style issue.

Signed-off-by: Gabriela Bittencourt <gabrielabittencourt00@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-16 13:32:18 +02:00
YueHaibing 52927d97d8 staging: rtl8192e: Remove set but not used variable 'VenderID'
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/staging/rtl8192e/rtl8192e/rtl_pci.c: In function 'rtl92e_check_adapter':
drivers/staging/rtl8192e/rtl8192e/rtl_pci.c:36:6: warning:
 variable 'VenderID' set but not used [-Wunused-but-set-variable]
  u16 VenderID;
      ^

It's never used and can be removed.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-16 13:31:59 +02:00
YueHaibing 94be357fe6 staging: rtlwifi: rtl8822be: Remove set but not used variable 'curtxbw_40mhz'
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/staging/rtlwifi/rtl8822be/hw.c: In function 'rtl8822be_update_hal_rate_mask':
drivers/staging/rtlwifi/rtl8822be/hw.c:2144:5: warning:
 variable 'curtxbw_40mhz' set but not used [-Wunused-but-set-variable]

It's never used and can be removed.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-16 13:31:58 +02:00
William Tustumi c8ab348df0 staging: rtl8723bs: add space after enum declaration
Add space between "enum TXDESC_SC" and '{' at line 86.

Fix the following error from checkpatch.pl

WARNING: missing space after enum definition
+enum TXDESC_SC{

Signed-off-by: William Tustumi <whatust@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-16 13:31:58 +02:00
Caio Salvador Rohwedder cd62878c9d staging: rtl8192u: ieee80211: add space around '==' and before '('
Fix checkpatch coding style errors on rtl819x_TSProc.c
- space required before the open parenthesis '('
- spaces required around that '=='

Signed-off-by: Caio Salvador Rohwedder <caiosalvador96@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-16 13:31:58 +02:00
Gabriel Siqueira 9e6aac6796 staging: rtl8192u: Add missing space
Fix checkpatch error: "ERROR: space required after that close brace '}'".

Signed-off-by: Gabriel Siqueira <gabriel.gabrielhs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-16 13:31:58 +02:00
Beatriz Martins de Carvalho e4d7efbb91 staging: rtl8723bs: hal: replace spaces by tabs.
Fix checkpatch error "ERROR: code indent should use tabs where possible"
in hal_com_phycfg.c:1726.

Signed-off-by: Beatriz Martins de Carvalho <martinsdecarvalhobeatriz@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-16 13:31:58 +02:00
Michael Straube 307e07486a staging: rtl8188eu: make sta2sta_data_frame() static
Function sta2sta_data_frame() is only used in rtw_recv.c.
So make it static.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-16 13:31:58 +02:00
Michael Straube 7e894d1086 staging: rtl8188eu: remove unnecessary declaration
The declaration of sta2sta_data_frame() is directly above
the function definition. Remove the unnecessary declaration.

This also clears a checkpatch issue.
CHECK: Lines should not end with a '('

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-16 13:31:58 +02:00
Himadri Pandya 391f544e35 staging: rtl8712: remove unnecessary NULL check
List wlan_network is built properly with init_list_head and
list_add_tail which cancels out its probability of being NULL because of
the precence of list_head at the top of this structure. Hence, the NULL
test can be omitted.

Signed-off-by: Himadri Pandya <himadri18.07@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-16 13:31:58 +02:00
Vincent Stehlé 060ea4271a staging: android: vsoc: fix copy_from_user overrun
The `np->permission' structure is smaller than the `np' structure but
sizeof(*np) worth of data is copied in there. Fix the size passed to
copy_from_user() to avoid overrun.

Fixes: 3d2ec9dcd5 ("staging: Android: Add 'vsoc' driver for cuttlefish.")
Signed-off-by: Vincent Stehlé <vincent.stehle@laposte.net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-16 13:31:58 +02:00
Christian Gromm deaf3b7155 staging: most: Documentation: update driver documentation
This patch updates the driver documentation files to reflect the
latest changes regarding configfs.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
v2:
	- changed kernel version to 5.2
v3:
v4:

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-16 13:25:18 +02:00
Christian Gromm 1a89eb0a8f staging: most: configfs: add code for link removal
This patch adds code that cleans up established links whenever the destroy
attribute is set or if the config_item (directory) is being removed.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-16 13:25:18 +02:00
Christian Gromm a15f465caf staging: most: configfs: make create attributes write-only
Reading the create attribute that triggers the creation of a link to
a certain channel is not necessary. Hence, it is being removed.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-16 13:25:18 +02:00
Christian Gromm acdbb89753 staging: most: allow speculative configuration
This patch makes the driver accept a link configuration eventhough no
device is attached to the bus. Instead the configuration is being applied
as soon as a device is being registered with the core.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-16 13:25:18 +02:00
Christian Gromm a1ee286d5a staging: most: core: remove attribute add_link
This patch removes the driver attribute add_link. It is not needed, because
the link management is now done via configfs.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-16 13:25:18 +02:00
Christian Gromm 5b082c2e07 staging: most: usb: remove prefix from description tag
This patch cuts off the usb_device prefix of the description string.
It is not needed, as the interface type is already available with the
interface attribute of a channel.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-16 13:25:17 +02:00
Christian Gromm 787105b30f staging: most: core: make sysfs attributes read-only
This patch changes the access flags of the channel attributes to
read-only. This is needed, because configuration is done via configfs.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-16 13:25:17 +02:00
Christian Gromm 919c03ae11 staging: most: enable configfs support
This patch enables the configfs functionality of the driver by
registering the configfs subsystems and compiling the configfs
part of the sources.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-16 13:25:17 +02:00
Christian Gromm 9640baca34 staging: most: sound: introduce new sound adapter management
This patch adapts the sound card management to the configfs changes.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-16 13:24:58 +02:00
Christian Gromm 3d89b2731b staging: most: core: add configfs interface functions
This patch adds the core's interface to configfs file.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-16 13:24:58 +02:00
Christian Gromm dfee92dd50 staging: most: change signature of function probe_channel
This patch adds the param argument to the function parameter of
the call-back probe_channel. This parameter is needed to configure
the channels of an attached device.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-16 13:24:58 +02:00
Christian Gromm 2bfde34887 staging: most: add new file configfs.c
This patch adds the file configfs.c to the driver directory. The file
registers the necessary subsystems with configfs in order to move the
driver configuration from sysfs to configfs.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-16 13:24:58 +02:00
Johan Hovold 47830c1127 staging: greybus: power_supply: fix prop-descriptor request size
Since moving the message buffers off the stack, the dynamically
allocated get-prop-descriptor request buffer is incorrectly sized due to
using the pointer rather than request-struct size when creating the
operation.

Fortunately, the pointer size is always larger than this one-byte
request, but this could still cause trouble on the remote end due to the
unexpected message size.

Fixes: 9d15134d06 ("greybus: power_supply: rework get descriptors")
Cc: stable <stable@vger.kernel.org>     # 4.9
Cc: Rui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-16 13:22:51 +02:00
Madhumitha Prabakaran 740a998d58 Staging: gasket: Use DIV_ROUND_UP
Use DIV_ROUND_UP in-kernel function to make code simple and more
understandable.

Issue found using Coccinelle.

Signed-off-by: Madhumitha Prabakaran <madhumithabiw@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-16 13:22:50 +02:00
Colin Ian King e2e89d4a73 staging: wilc1000: fix spelling mistake "dissconect" -> "disconnect"
There is a spelling mistake in a netdev_err error message, fix it.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-16 13:15:54 +02:00
Nicholas Mc Guire c901556a43 staging: wilc1000: give usleep_range a range
usleep_range() is called in non-atomic context so there is little point
in setting min==max as the jitter of hrtimer is determined by interruptions
anyway. usleep_range can only perform the intended coalescence if some
room for placing the hrtimer is provided. Given the range of milliseconds
the delay will be 2+ anyway - so make it 2-2.5 ms which gives hrtimers
space to optimize without negatively impacting performance.

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-16 13:15:54 +02:00
Tetsuo Handa ae26aa8446 staging: wilc1000: Avoid GFP_KERNEL allocation from atomic context.
Since wilc_set_multicast_list() is called with dev->addr_list_lock
spinlock held, we can't use GFP_KERNEL memory allocation.

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Fixes: e624c58cf8 ("staging: wilc1000: refactor code to avoid use of wilc_set_multicast_list global")
Cc: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Adham Abozaeid <adham.abozaeid@microchip.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-16 13:15:54 +02:00
Nicholas Mc Guire 8136eaa012 staging: wilc1000: drop explicit conversion to bool
As the expression evaluates to a boolean anyway (relational and logical
operators) conversion with the ternary operator is not needed here as
coccinelle notes (boolconv.cocci)

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Reviewed-by: Julian Calaby <julian.calaby@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-16 13:15:53 +02:00
Colin Ian King b368fa114a staging: comedi: adv_pci1710: fix spelling mistake: "droput" -> "dropout"
There is a spelling mistake in a dev_error message. Fix it.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-16 12:57:54 +02:00
Hariprasad Kelam 28f69ae49b staging: comedi: dt2811: Fix spelling mistake
changes interupts --> interrupts to fix warning reported by checkpatch
tool

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-16 12:57:53 +02:00
YueHaibing 3935a6fb4b staging: comedi: dyna_pci10xx: remove set but not used variables 'chan' and range'
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/staging/comedi/drivers/dyna_pci10xx.c: In function 'dyna_pci10xx_insn_write_ao':
drivers/staging/comedi/drivers/dyna_pci10xx.c:109:21: warning:
 variable 'range' set but not used [-Wunused-but-set-variable]
  unsigned int chan, range;

drivers/staging/comedi/drivers/dyna_pci10xx.c:109:15: warning:
 variable 'chan' set but not used [-Wunused-but-set-variable]
  unsigned int chan, range;

They are never used since introduction in commit 16a7373a8e ("Staging:
comedi: add dyna_pci10xx driver")

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-16 12:57:53 +02:00
Greg Kroah-Hartman 932f98922f First set of new device support, features and fixes for IIO in the 5.2 cycle
Staging graduations
 * ad7780
   - Move this ADC driver out of staging.  Included adding some new features
     along the way (see below). Also added DT bindings.
 
 New device support
 * adis16480
   - Support the ADIS16495 and ADIS16497 IMU devices making
     heavy use of refactoring of various aspects of the driver in precursor
     patches.
 * lsm6dsx
   - Support for the ASM330LHH 6-axis (accelerometer + gyro) sensor.
   - Support for the LSM6DS0X
 * matbotix mb1232
   - New driver for this ultrasound ranging device family. Including bindings.
   - Supports mb1202, mb1212, mb1222, mb1232, mb1242, mb7040 and mb7137.
 * max31856
   - New driver for this thermocouple temperature sensor.
 * meson saradc
   - Support the Meson-G12A (ID addition only).
 * stmpe-adc
   - New driver supporting generic ADC alongside touchscreen support which
     previously existed. Includes DT bindings.
 * vcnl4000
   - Support for the vcln4040 proximity and light sensor, including adding
     DT bindings for this and parts previously supported.
 
 Features
 * core
   - Allow reading of mount matrices from ACPI in addition to DT.
   - Common binding for theromcouple types.
 * ad5933
   - Add ABI docs as there are a few 'unsual' elements about this
     device - perhaps because it's our only impedance analyser.
 * ad7780
   - Add gain and filter gpio support + readback of current gain and filter.
 * adis16480
   - Allow selection fo the dataready pin to be used.
   - Device tree ID table and binding documentation.
   - Support external clock modes, including new bindings.
 * bma180
   - Mount matrix support.
 * bmc150
   - Mount matrix support.
 * bmg160
   - Mount matrix support.
   - DT id table and bindings doc.
 * bmp280
   - Put calibration data into the entropy pool.
 * hmc5843
   - Mount matrix support.
 * itg3200
   - Mount matrix support.
 * kxcjk1013
   - Device tree id table, and binding docs.
 * lpc32xx
   - Add scale when regulator specified including DT docs for regulator.
 * pms7003
   - Add device IDs for all supported parts to driver and binding.
 * stm32-dfsdm
   - Enable hw consumer support, scan mode control and a complex set of
     triggered buffer modes.
   - Power management.
 * stm32-lptimer-counter
   - power management.
   - Document the pinctrl sleep state binding.
 * ti-ads7950
   - GPIO pin support.
 
 Cleanups, minor fixes
 * core
   - Use bitmap_zalloc to make it explicit that is what we are doing.
   - Tidy up all the Kconfig files (which had slowly gotten messy)
   - Fix a forwards definition missing issue in iio/driver.h
 * ad sigma delta core
   - Improve handling of SPI bus locking vs CS assertion.  This has been
     wrong a long time so not rushing this in.
 * ad5064
   - Mlock to local lock.
 * ad5933 (staging cleanup)
   - Multiline comment fixes.
   - Include ordering.
   - SPDX.
   - Tidy up Kconfig help which was a bit missleading.
   - Change some non standard attributes to ABI defined ones.
 * ad7124
   - White space fix.
 * ad7192
   - White space.
   - Use DT clock binding.
   - Improve error reporting.
   - Platform data to DT conversion.
   - Use read_avail callback, mostly to avoid the endless series of
     patches from new contributors trying to falsely put spaces around
     the negative sign.
 * ad7280a
   - Add brackets to macros to avoid potential precedence isseus.
   - Add temp vars for event codes to reduce indent and improved readability.
   - Clean out som CamelCase notation.
   - White space.
 * ad7606
   - Fix broken file naming in MAINTAINERS.
 * ad7780
   - Missing switch defaults to supress warnings and harden the code slightly.
   - Set pattern masks more directly.
   - Add ID values and masks for all supported chips.
   - SPDX + add Renato as a copyright holder as he has done a lot of work on
     this driver.
   - Add brackets to macros to avoid potential precedence issues.
 * ad7923
   - White space fixes.
   - Use BIT macro to improve readability.
   - Add brackets to macros to avoid potential precedence issues.
   - Tidy up a null comparisom.
 * ad9523
   - Fix a typo in naming of variables.
 * adis16400
   - Combine trigger file into main code as no advantage in separate files.
     Rename core file to just adis16400.
   - Squash the header into the c file now there is only one file.
   - Generalize burst mode to support new variants.
 * ak8975
   - Local variable to improve readability around mount matrix support.
 * as3935
   - Avoid potential race by ensuring remove does exact opposite of
     probe rather than a slightly different order.
 * cross_ec
   - Drop some unnecessary includes.
   - Fix some warning and the slightly 'unusual' code.
   - Add some docs for non obvious function.
   - SPDX
 * hmc5843
   - Potential unhandled error case.
 * iio trigger core
   - Print an error if there is no available irq due to max consumers per
     trigger being set to low.
 * iio loop trigger
   - Drop an unlikely on IS_ERR as IS_ERR already has the annotation.
 * ingenic-adc
   - Drop a redundant dev_err call as devm_ioremap_resource reports the same
     internally.
 * lmp91000
   - Drop some unncessary parentheses and white space tidy up.
   - Invert and if statement to improve readability.
   - Fix a wrong error message.
 * lpc32xx
   - Header sorting + drop some unused ones.
 * mma8542
   - Mark a switch fallthrough.
 * mpu6050
   - Add a local variable to improve code readability around mount matrix
     support.
 * mxs-lradc-adc
   - Handle devm_iio_trigger_alloc failure.
 * sps30
   - Fix up a kernel version in the ABI docs.
 * srf04
   - DT binding doc converted to yaml.
 * ssp_sensors
   - Supress a clang build warning due to lack of visibility of conditional
     within a iio_push_to_buffers_with_timestamp.  (reasonable false warning!)
 * st_accel
   - Drop pointless less than 0 comparisom of unsigned int.
 * stm32-dfsdm
   - Improve accuracy of spi_master_frequency calculation.
   - Improve calculation fo sampling frequency.
   - Rework various internals to simplify adding triggered buffer support.
   - Claim direct mode to avoid racing around read_raw and being in buffered
     mode.
 * stmpe
   - Fix a clang false positive warning.
 * ti-ads7950
   - Use local lock rather than using the core mlock when not locking around
     the device mode.
 * vcnl4000
   - Use word writes instead of byte writes.  It seems byte writes are fine
     for some parts (undocument) but not others that the driver will shortly
     support.
 
 Other
 * mailmap
   - Add email address change for Sean Nyekjaer.  Update in relevant drivers
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCAAvFiEEbilms4eEBlKRJoGxVIU0mcT0FogFAlymX7ERHGppYzIzQGtl
 cm5lbC5vcmcACgkQVIU0mcT0FogLdw//TC1JMzZMly5KsPc+kBj+sgStPrCs933B
 dCmxaae0dd5Kr3MYzy3EQ2Nl95CxjemYt7/Bj+eSsAA0coDnqnc5aIgwQWIl36oS
 tDAxtYO6zsqLputmymSpiKXE/SRONwmYXcv2XdopBDnE2V9rEAx7Ihu6yxpqCMVt
 HDu0ArwtAxkPqZREAyPI/GjCWAbqS7Nlzp8cyiPpEzrByVJA0+M6a0V+aNWblL/U
 i0NQRrzb8UfaRiCE+/UqBaiBWUXM4NHGoAj6DRYn0YLX7ryswdZ8kYnNbkc3Nlvm
 eZLZykL0xqijBRHLkSppkT4MdY15XOB6/d1BRSWcg4Yk2nJwBbqfg3p6ROEJj0nG
 H6wF09P5sbo42lFEZZAQkd5j2mvTl/94Y/GhA5OxjmUQWSGmtKxW7XK/CPu/FrcR
 6f3xMV0qm/RfmFG/YwpV8GvMYnNWwG4uHN7oFNCC8Gza9RyNYmXyeJillwwHRwEu
 CHpc/sL76U707m5WBhLKgvBFrzemQDH11Z+3hYuro1TkWQVEhs/JvACvazDs6LGj
 5u2Q99U0/0XaygHO4mfr9vQAmIgRqQstu8rq85lzAxQ1xCmmomfWBq32cu/gaBIw
 swpPuAIVbJEH0u/avfikbSAX/YH890ynWvhXjjjJ6j6Zika8mucW0aNbe7wDyjdL
 I1cj5/1kXFU=
 =GnjE
 -----END PGP SIGNATURE-----

Merge tag 'iio-for-5.2a-2' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next

Jonathan writes:

First set of new device support, features and fixes for IIO in the 5.2 cycle

Staging graduations
* ad7780
  - Move this ADC driver out of staging.  Included adding some new features
    along the way (see below). Also added DT bindings.

New device support
* adis16480
  - Support the ADIS16495 and ADIS16497 IMU devices making
    heavy use of refactoring of various aspects of the driver in precursor
    patches.
* lsm6dsx
  - Support for the ASM330LHH 6-axis (accelerometer + gyro) sensor.
  - Support for the LSM6DS0X
* matbotix mb1232
  - New driver for this ultrasound ranging device family. Including bindings.
  - Supports mb1202, mb1212, mb1222, mb1232, mb1242, mb7040 and mb7137.
* max31856
  - New driver for this thermocouple temperature sensor.
* meson saradc
  - Support the Meson-G12A (ID addition only).
* stmpe-adc
  - New driver supporting generic ADC alongside touchscreen support which
    previously existed. Includes DT bindings.
* vcnl4000
  - Support for the vcln4040 proximity and light sensor, including adding
    DT bindings for this and parts previously supported.

Features
* core
  - Allow reading of mount matrices from ACPI in addition to DT.
  - Common binding for theromcouple types.
* ad5933
  - Add ABI docs as there are a few 'unsual' elements about this
    device - perhaps because it's our only impedance analyser.
* ad7780
  - Add gain and filter gpio support + readback of current gain and filter.
* adis16480
  - Allow selection fo the dataready pin to be used.
  - Device tree ID table and binding documentation.
  - Support external clock modes, including new bindings.
* bma180
  - Mount matrix support.
* bmc150
  - Mount matrix support.
* bmg160
  - Mount matrix support.
  - DT id table and bindings doc.
* bmp280
  - Put calibration data into the entropy pool.
* hmc5843
  - Mount matrix support.
* itg3200
  - Mount matrix support.
* kxcjk1013
  - Device tree id table, and binding docs.
* lpc32xx
  - Add scale when regulator specified including DT docs for regulator.
* pms7003
  - Add device IDs for all supported parts to driver and binding.
* stm32-dfsdm
  - Enable hw consumer support, scan mode control and a complex set of
    triggered buffer modes.
  - Power management.
* stm32-lptimer-counter
  - power management.
  - Document the pinctrl sleep state binding.
* ti-ads7950
  - GPIO pin support.

Cleanups, minor fixes
* core
  - Use bitmap_zalloc to make it explicit that is what we are doing.
  - Tidy up all the Kconfig files (which had slowly gotten messy)
  - Fix a forwards definition missing issue in iio/driver.h
* ad sigma delta core
  - Improve handling of SPI bus locking vs CS assertion.  This has been
    wrong a long time so not rushing this in.
* ad5064
  - Mlock to local lock.
* ad5933 (staging cleanup)
  - Multiline comment fixes.
  - Include ordering.
  - SPDX.
  - Tidy up Kconfig help which was a bit missleading.
  - Change some non standard attributes to ABI defined ones.
* ad7124
  - White space fix.
* ad7192
  - White space.
  - Use DT clock binding.
  - Improve error reporting.
  - Platform data to DT conversion.
  - Use read_avail callback, mostly to avoid the endless series of
    patches from new contributors trying to falsely put spaces around
    the negative sign.
* ad7280a
  - Add brackets to macros to avoid potential precedence isseus.
  - Add temp vars for event codes to reduce indent and improved readability.
  - Clean out som CamelCase notation.
  - White space.
* ad7606
  - Fix broken file naming in MAINTAINERS.
* ad7780
  - Missing switch defaults to supress warnings and harden the code slightly.
  - Set pattern masks more directly.
  - Add ID values and masks for all supported chips.
  - SPDX + add Renato as a copyright holder as he has done a lot of work on
    this driver.
  - Add brackets to macros to avoid potential precedence issues.
* ad7923
  - White space fixes.
  - Use BIT macro to improve readability.
  - Add brackets to macros to avoid potential precedence issues.
  - Tidy up a null comparisom.
* ad9523
  - Fix a typo in naming of variables.
* adis16400
  - Combine trigger file into main code as no advantage in separate files.
    Rename core file to just adis16400.
  - Squash the header into the c file now there is only one file.
  - Generalize burst mode to support new variants.
* ak8975
  - Local variable to improve readability around mount matrix support.
* as3935
  - Avoid potential race by ensuring remove does exact opposite of
    probe rather than a slightly different order.
* cross_ec
  - Drop some unnecessary includes.
  - Fix some warning and the slightly 'unusual' code.
  - Add some docs for non obvious function.
  - SPDX
* hmc5843
  - Potential unhandled error case.
* iio trigger core
  - Print an error if there is no available irq due to max consumers per
    trigger being set to low.
* iio loop trigger
  - Drop an unlikely on IS_ERR as IS_ERR already has the annotation.
* ingenic-adc
  - Drop a redundant dev_err call as devm_ioremap_resource reports the same
    internally.
* lmp91000
  - Drop some unncessary parentheses and white space tidy up.
  - Invert and if statement to improve readability.
  - Fix a wrong error message.
* lpc32xx
  - Header sorting + drop some unused ones.
* mma8542
  - Mark a switch fallthrough.
* mpu6050
  - Add a local variable to improve code readability around mount matrix
    support.
* mxs-lradc-adc
  - Handle devm_iio_trigger_alloc failure.
* sps30
  - Fix up a kernel version in the ABI docs.
* srf04
  - DT binding doc converted to yaml.
* ssp_sensors
  - Supress a clang build warning due to lack of visibility of conditional
    within a iio_push_to_buffers_with_timestamp.  (reasonable false warning!)
* st_accel
  - Drop pointless less than 0 comparisom of unsigned int.
* stm32-dfsdm
  - Improve accuracy of spi_master_frequency calculation.
  - Improve calculation fo sampling frequency.
  - Rework various internals to simplify adding triggered buffer support.
  - Claim direct mode to avoid racing around read_raw and being in buffered
    mode.
* stmpe
  - Fix a clang false positive warning.
* ti-ads7950
  - Use local lock rather than using the core mlock when not locking around
    the device mode.
* vcnl4000
  - Use word writes instead of byte writes.  It seems byte writes are fine
    for some parts (undocument) but not others that the driver will shortly
    support.

Other
* mailmap
  - Add email address change for Sean Nyekjaer.  Update in relevant drivers

* tag 'iio-for-5.2a-2' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (129 commits)
  iio: ad_sigma_delta: Properly handle SPI bus locking vs CS assertion
  iio: adc: stm32-dfsdm: add PM support
  iio: adc: stm32-dfsdm: improve sampling frequency accuracy
  staging: iio: adc: ad7280a: Tab alignment
  MAINTAINERS: Fix the link to ad7606 dt-bindings
  iio:temperature: Add MAX31856 thermocouple support
  iio:temperature:max31856:Add device tree bind info
  dt-bindings: iio/temperature: Add thermocouple types (and doc)
  devantech-srf04.yaml: transform DT binding to YAML
  iio: frequency: ad9523: Fix typo in ad9523_platform_data
  iio: Make possible to include driver.h first
  dt-bindings: iio: add Bosch BMG160 gyroscope sensor
  iio: gyro: bmg160: add device tree compatibility table
  staging: iio: adc: ad7192: Use read_avail for available attributes
  dt-bindings: iio: light: add vcnl4040 devicetree bindings
  iio: light: vcnl4000 add support for the VCNL4040 proximity and light sensor
  dt-bindings: iio: light: add vcnl4000 devicetree bindings
  iio: light: vcnl4000 add devicetree hooks
  iio: light: vcnl4000 use word writes instead of byte writes
  iio: adc: stm32-dfsdm: claim direct mode for raw read and settings
  ...
2019-04-04 22:25:29 +02:00
Lars-Peter Clausen df1d80aee9 iio: ad_sigma_delta: Properly handle SPI bus locking vs CS assertion
For devices from the SigmaDelta family we need to keep CS low when doing a
conversion, since the device will use the MISO line as a interrupt to
indicate that the conversion is complete.

This is why the driver locks the SPI bus and when the SPI bus is locked
keeps as long as a conversion is going on. The current implementation gets
one small detail wrong though. CS is only de-asserted after the SPI bus is
unlocked. This means it is possible for a different SPI device on the same
bus to send a message which would be wrongfully be addressed to the
SigmaDelta device as well. Make sure that the last SPI transfer that is
done while holding the SPI bus lock de-asserts the CS signal.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Alexandru Ardelean <Alexandru.Ardelean@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-04 20:21:15 +01:00
Fabrice Gasnier 6ec417d2f1 iio: adc: stm32-dfsdm: add PM support
Add PM and runtime PM support to STM32 DFSDM drivers:
- stm32-dfsdm-core: manage clocks.
- stm32-dfsdm-adc: restore channels configuration upon resume. Also stop
  restart everything in case of buffer mode.

Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-04 20:21:12 +01:00
Fabrice Gasnier 9f57110d2e iio: adc: stm32-dfsdm: improve sampling frequency accuracy
The sample frequency is driven using the oversampling ratio depending
on the SPI bus frequency.
Currently, oversampling ratio is computed by an entire division:
- spi_freq / sample_freq. This may result in inaccurate value.
Using DIV_ROUND_CLOSEST improves resulting sample frequency, which is
useful for audio that requests fixed rates (such as: 8, 16 or 32 kHz).
BTW, introduce new routine to re-factor sample frequency setting, and
move frequency accuracy message from warning to debug level.

Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-04 20:21:10 +01:00
Cristian Sicilia 65500c53aa staging: iio: adc: ad7280a: Tab alignment
Aligned some parameters.

Signed-off-by: Cristian Sicilia <sicilia.cristian@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-04 20:21:09 +01:00