Commit graph

842223 commits

Author SHA1 Message Date
Dave Stevenson
a1120db357 staging: bcm2835-camera: Do not bulk receive from service thread
vchi_bulk_queue_receive will queue up to a default of 4
bulk receives on a connection before blocking.
If called from the VCHI service_callback thread, then
that thread is unable to service the VCHI_CALLBACK_BULK_RECEIVED
events that would enable the queue call to succeed.

Add a workqueue to schedule the call vchi_bulk_queue_receive
in an alternate context to avoid the lock up.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Acked-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-01 09:09:06 +02:00
Dave Stevenson
8dedab2903 staging: bcm2835-camera: Replace spinlock protecting context_map with mutex
The commit "staging: bcm2835-camera: Replace open-coded idr with a struct idr."
replaced an internal implementation of an idr with the standard functions
and a spinlock. idr_alloc(GFP_KERNEL) can sleep whilst calling kmem_cache_alloc
to allocate the new node, but this is not valid whilst in an atomic context
due to the spinlock.

There is no need for this to be a spinlock as a standard mutex is
sufficient.

Fixes: 950fd867c6 ("staging: bcm2835-camera: Replace open-coded idr with a struct idr.")
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Acked-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-01 09:09:06 +02:00
Dave Stevenson
557897fea0 staging: bcm2835-camera: Check the error for REPEAT_SEQ_HEADER
When handling for V4L2_CID_MPEG_VIDEO_REPEAT_SEQ_HEADER was added
the firmware would reject the setting if H264 hadn't already been
selected. This was fixed in the firmware at that point, but to
enable backwards compatibility the returned error was ignored.

That was Dec 2013, so the chances of having a firmware that still
has that issue is so close to zero that the workaround can be
removed.

Link: https://github.com/raspberrypi/linux/pull/2782/
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Acked-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-01 09:09:06 +02:00
Hariprasad Kelam
690a993f10 staging/rtl8188eu/os_dep: Remove unneeded variable ret
Below list of functions returns 0 in success and -EINVAL in failure. So
directly return 0 on Success.

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-01 09:07:03 +02:00
Nishka Dasgupta
01bc283e81 staging: rtl8188eu: Remove declarations of unused functions
Remove the declarations of the following unused functions from
rtw_eeprom.h:
- eeprom_write16
- eeprom_read16
- eeprom_read_sz
- read_eeprom_content
- read_eeprom_content_by_attrib.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-01 09:07:03 +02:00
Nishka Dasgupta
c41ee96b3b staging: rtl8188eu: hal: Replace function ODM_TXPowerTrackingCheck()
Remove function ODM_TXPowerTrackingCheck as all it does is call
odm_TXPowerTrackingCheckCE.
Rename odm_TXPowerTrackingCheckCE to ODM_TXPowerTrackingCheck for
compatibility with call sites.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-01 09:07:03 +02:00
Nishka Dasgupta
2995c182f8 staging: rtl8188eu: hal: Replace function odm_TXPowerTrackingInit()
Remove function odm_TXPowerTrackingInit as all it does is call
odm_TXPowerTrackingThermalMeterInit.
Rename odm_TXPowerTrackingThermalMeterInit to odm_TXPowerTrackingInit
for compatibility with call sites.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-01 09:07:03 +02:00
Nishka Dasgupta
1f22b8f1bd staging: rtl8188eu: os_dep: Remove return variable
Remove return variable as its value is not altered between
initialisation and return.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-01 09:07:03 +02:00
Hariprasad Kelam
5d32630f17 staging: netlogic: Change GFP_ATOMIC to GFP_KERNEL
Below is data path of xlr_config_spill
xlr_net_probe
  -->xlr_config_fifo_spill_area
  --->xlr_config_spill

We can use GFP_KERNEL as this function is getting called from
xlr_net_probe and there are no locks.

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-01 09:07:03 +02:00
Tobias Nießen
321cab4b5e staging: rts5208: Simplify boolean expression to improve code style
This bitwisen / boolean expression can be made more readable while
reducing the line lengths at the same time. This commit uses the
fact that

    a & (b | c) == (b | c)

evaluates to true if and only if

    (a & b) && (a & c)

is true. Since b and c are constants with relatively long names,
using the second form makes the code much more readable and shorter.

Signed-off-by: Tobias Nießen <tobias.niessen@stud.uni-hannover.de>
Signed-off-by: Sabrina Gaube <sabrina-gaube@web.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-01 09:05:21 +02:00
Tobias Nießen
34a49d9edf staging: rts5208: Rewrite redundant if statement to improve code style
This commit uses the fact that

    if (a) {
            if (b) {
                    ...
            }
    }

can instead be written as

    if (a && b) {
            ...
    }

without any change in behavior, allowing to decrease the indentation
of the contained code block and thus reducing the average line length.

Signed-off-by: Tobias Nießen <tobias.niessen@stud.uni-hannover.de>
Signed-off-by: Sabrina Gaube <sabrina-gaube@web.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-01 09:05:21 +02:00
Ajay Singh
7ff9f78ea6 staging: wilc1000: rename 'host_interface' source and header
Rename 'host_interface' source and header file to include the 'wilc_'
prefix in its name.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-01 09:01:41 +02:00
Ajay Singh
93592a65ad staging: wilc1000: remove extra argument passing to wilc_send_config_pkt()
Cleanup patch to remove the passing of driver handler, get the 'idx'
value inside the called function.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-01 09:01:41 +02:00
Ajay Singh
39cf54fc6a staging: wilc1000: remove use of 'src_addr' element in 'wilc_vif' struct
Remove use of 'src_addr' element in wilc_vif, as the same information
already copied to net_device->dev_addr.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-01 09:01:41 +02:00
Ajay Singh
264a472d29 staging: wilc1000: remove unnecessary loop to traverse vif interfaces
Cleanup patch to avoid loop to traverse the interfaces instead make use
of vif received from net_device priv data.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-01 09:01:41 +02:00
Ajay Singh
2f5e568b28 staging: wilc1000: remove use of driver_handler_id & ifc_id
Removed the 'driver_handler_id' & 'ifc_id' elements and used 'idx' to
identify the handler.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-01 09:01:41 +02:00
Ajay Singh
9bc061e880 staging: wilc1000: added support to dynamically add/remove interfaces
Removed the use of two hardcoded interfaces and added support to
add/remove the network interfaces dynamically.
Now the driver will have single default interface with name 'wlan0' and
later other interface can be added from user space application e.g
using 'iw add' command.
Also taken care to maintain 'wilc_vif' as part of 'net_device'
private data and 'wilc' struct as 'wiphy' private data.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-01 09:01:41 +02:00
Ajay Singh
6419f818ab staging: wilc1000: fix error path cleanup in wilc_wlan_initialize()
For the error path in wilc_wlan_initialize(), the resources are not
cleanup in the correct order. Reverted the previous changes and use the
correct order to free during error condition.

Fixes: b46d68825c ("staging: wilc1000: remove COMPLEMENT_BOOT")
Cc: <stable@vger.kernel.org>
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-01 09:01:40 +02:00
Ajay Singh
424a61122c staging: wilc1000: handle p2p operations in caller context
Moved the handling of p2p related operation in the caller context instead
of using workqueue.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-01 09:01:06 +02:00
Alexander Dahl
95392b0260 staging: rtl8188eu: Add 'rtl8188eufw.bin' to MODULE_FIRMWARE list
This is the file loaded by the code anyway, but now you can use
'modinfo' to determine the needed firmware file for this module.

Spotted when packaging firmware files for the fli4l Linux router
distribution, where a script uses the information from 'modinfo' to
collect all needed firmware files to package.

Cc: Christoph Schulz <mail@kristov.de>
Signed-off-by: Alexander Dahl <post@lespocky.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-01 08:58:21 +02:00
Sergio Paracuellos
0ae0cf509d staging: mt7621-pci: fix PCIE_FTS_NUM_LO macro
Add missing parenthesis to PCIE_FTS_NUM_LO macro to do the
same it was being done in original code.

Fixes: a4b2eb912b ("staging: mt7621-pci: rewrite RC FTS configuration")
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-01 08:58:21 +02:00
Stefan Wahren
f816db1dc1 staging: bcm2835-camera: Restore return behavior of ctrl_set_bitrate()
The commit 52c4dfcead ("Staging: vc04_services: Cleanup in
ctrl_set_bitrate()") changed the return behavior of ctrl_set_bitrate().
We cannot do this because of a bug in the firmware, which breaks probing
of bcm2835-camera:

    bcm2835-v4l2: mmal_init: failed to set all camera controls: -3
    Cleanup: Destroy video encoder
    Cleanup: Destroy image encoder
    Cleanup: Destroy video render
    Cleanup: Destroy camera
    bcm2835-v4l2: bcm2835_mmal_probe: mmal init failed: -3
    bcm2835-camera: probe of bcm2835-camera failed with error -3

So restore the old behavior, add an explaining comment and a debug message
to verify that the bug has been fixed in firmware.

Fixes: 52c4dfcead ("Staging: vc04_services: Cleanup in ctrl_set_bitrate()")
Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Cc: stable <stable@vger.kernel.org>
Acked-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-01 08:55:41 +02:00
Nishka Dasgupta
3c96993b18 staging: greybus: tools: Remove function log_csv_error()
Remove unused function log_csv_error.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Reviewed-by: Bryan O'Donoghue <pure.logic@nexus-software.ie>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-01 08:50:37 +02:00
Ian Abbott
b8336be66d staging: comedi: dt282x: fix a null pointer deref on interrupt
The interrupt handler `dt282x_interrupt()` causes a null pointer
dereference for those supported boards that have no analog output
support.  For these boards, `dev->write_subdev` will be `NULL` and
therefore the `s_ao` subdevice pointer variable will be `NULL`.  In that
case, the following call near the end of the interrupt handler results
in a null pointer dereference:

	comedi_handle_events(dev, s_ao);

Fix it by only calling the above function if `s_ao` is valid.

(There are other uses of `s_ao` by the interrupt handler that may or may
not be reached depending on values of hardware registers.  Trust that
they are reliable for now.)

Note:
commit 4f6f009b20 ("staging: comedi: dt282x: use comedi_handle_events()")
propagates an earlier error from
commit f21c74fa4c ("staging: comedi: dt282x: use cfc_handle_events()").

Fixes: 4f6f009b20 ("staging: comedi: dt282x: use comedi_handle_events()")
Cc: <stable@vger.kernel.org> # v3.19+
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-01 08:50:15 +02:00
Ian Abbott
7379e6baed staging: comedi: amplc_pci230: fix null pointer deref on interrupt
The interrupt handler `pci230_interrupt()` causes a null pointer
dereference for a PCI260 card.  There is no analog output subdevice for
a PCI260.  The `dev->write_subdev` subdevice pointer and therefore the
`s_ao` subdevice pointer variable will be `NULL` for a PCI260.  The
following call near the end of the interrupt handler results in the null
pointer dereference for a PCI260:

	comedi_handle_events(dev, s_ao);

Fix it by only calling the above function if `s_ao` is valid.

Note that the other uses of `s_ao` in the calls
`pci230_handle_ao_nofifo(dev, s_ao);` and `pci230_handle_ao_fifo(dev,
s_ao);` will never be reached for a PCI260, so they are safe.

Fixes: 39064f2328 ("staging: comedi: amplc_pci230: use comedi_handle_events()")
Cc: <stable@vger.kernel.org> # v3.19+
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-01 08:50:15 +02:00
Hans Verkuil
338d963736 staging/most/video: set device_caps in struct video_device
Instead of filling in the struct v4l2_capability device_caps
field, fill in the struct video_device device_caps field.

That way the V4L2 core knows what the capabilities of the
video device are.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-01 08:48:41 +02:00
Shobhit Kukreti
a9f69bd555 staging: erofs: Replace kzalloc(struct ..) with kzalloc(*ptr)
Resolve checkpatch warning:
Prefer kzalloc(sizeof(*ptr)...) over kzalloc(sizeof(struct ..)

Signed-off-by: Shobhit Kukreti <shobhitkukreti@gmail.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Reviewed-by: Gao Xiang <gaoxiang25@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-01 08:45:04 +02:00
Yue Hu
de3728dcd3 staging: erofs: don't check special inode layout
Currently, we will check if inode layout is compression or inline if
the inode is special in fill_inode(). Also set ->i_mapping->a_ops for
it. That is pointless since the both modes won't be set for special
inode when creating EROFS filesystem image. So, let's avoid it.

Signed-off-by: Yue Hu <huyue2@yulong.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-01 08:45:00 +02:00
Yue Hu
5545745930 staging: erofs: return the error value if fill_inline_data() fails
We should consider the error returned by fill_inline_data() when filling
last page in fill_inode(). If not getting inode will be successful even
though last page is bad. That is illogical. Also change -EAGAIN to 0 in
fill_inline_data() to stand for successful filling.

Signed-off-by: Yue Hu <huyue2@yulong.com>
Reviewed-by: Gao Xiang <gaoxiang25@huawei.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-01 08:45:00 +02:00
Arnd Bergmann
fbd6b25009 staging: rtl8712: reduce stack usage, again
An earlier patch I sent reduced the stack usage enough to get
below the warning limit, and I could show this was safe, but with
GCC_PLUGIN_STRUCTLEAK_BYREF_ALL, it gets worse again because large stack
variables in the same function no longer overlap:

drivers/staging/rtl8712/rtl871x_ioctl_linux.c: In function 'translate_scan.isra.2':
drivers/staging/rtl8712/rtl871x_ioctl_linux.c:322:1: error: the frame size of 1200 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]

Split out the largest two blocks in the affected function into two
separate functions and mark those noinline_for_stack.

Fixes: 8c5af16f79 ("staging: rtl8712: reduce stack usage")
Fixes: 81a56f6dcd ("gcc-plugins: structleak: Generalize to all variable types")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-28 14:54:45 +02:00
Bastien Nocera
208a68c839 iio: iio-utils: Fix possible incorrect mask calculation
On some machines, iio-sensor-proxy was returning all 0's for IIO sensor
values. It turns out that the bits_used for this sensor is 32, which makes
the mask calculation:

*mask = (1 << 32) - 1;

If the compiler interprets the 1 literals as 32-bit ints, it generates
undefined behavior depending on compiler version and optimization level.
On my system, it optimizes out the shift, so the mask value becomes

*mask = (1) - 1;

With a mask value of 0, iio-sensor-proxy will always return 0 for every axis.

Avoid incorrect 0 values caused by compiler optimization.

See original fix by Brett Dutro <brett.dutro@gmail.com> in
iio-sensor-proxy:
9615ceac7c

Signed-off-by: Bastien Nocera <hadess@hadess.net>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-06-27 20:38:19 +01:00
Stefan Popa
def914a4c3 iio: frequency: adf4371: Add support for output stage mute
Another feature of the ADF4371/ADF4372 is that the supply current to the
RF8P and RF8N output stage can shut down until the ADF4371 achieves lock
as measured by the digital lock detect circuitry. The mute to lock
detect bit (MUTE_LD) in REG25 enables this function.

Signed-off-by: Stefan Popa <stefan.popa@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-06-26 21:24:21 +01:00
Stefan Popa
84ed6482c6 dt-bindings: iio: frequency: Add ADF4372 PLL documentation
Document support for ADF4372 SPI Wideband Synthesizer.

Signed-off-by: Stefan Popa <stefan.popa@analog.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-06-26 21:24:21 +01:00
Stefan Popa
13a0af411a iio: frequency: adf4371: Add support for ADF4372 PLL
The ADF4372 is part of the same family with ADF4371, the main difference
is that it has only 3 channels instead of 4, as the frequency quadrupler
is missing. As a result, the ADF4372 allows frequencies from 62.5 MHz to
16 GHz to be generated.

Datasheet:
Link: https://www.analog.com/media/en/technical-documentation/data-sheets/adf4372.pdf

Signed-off-by: Stefan Popa <stefan.popa@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-06-26 21:24:21 +01:00
Mircea Caprioru
c444e956a2 dt-bindings: iio: adc: Add buffered input property
This patch adds the buffered mode device tree property for positive and
negative inputs. Each option can be enabled independently.

In buffered mode, the input channel feeds into a high impedance input stage
of the buffer amplifier. Therefore, the input can tolerate significant
source impedances and is tailored for direct connection to external
resistive type sensors such as strain gages or RTDs.

Signed-off-by: Mircea Caprioru <mircea.caprioru@analog.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-06-26 21:24:21 +01:00
Mircea Caprioru
26ae15e62d Convert AD7124 bindings documentation to YAML format.
Signed-off-by: Mircea Caprioru <mircea.caprioru@analog.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-06-26 21:24:21 +01:00
Mircea Caprioru
1478a388f4 iio: adc: ad7124: Shift to dynamic allocation for channel configuration
This patch changes the channel configuration member of the device
structure from a fixed size array to a dynamic allocated one with a size
equal to the number of channels specified in the device tree. This will
ensure a more flexibility for compatible devices.

Ex. ad7124-4 - can have 4 differential or 8 pseudo-differential channels
ad7124-8 - can have 8 differential or 16 pseudo-differential channels

Also the device can suspport any other combination of differential and
pseudo-differential channels base on the physical number of inputs
available.

Signed-off-by: Mircea Caprioru <mircea.caprioru@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-06-26 21:24:21 +01:00
Mircea Caprioru
0eaecea6e4 iio: adc: ad7124: Add buffered input support
This patch adds the option to enable the buffered mode for positive and
negative inputs. Each option can be enabled independently.

In buffered mode, the input channel feeds into a high impedance input stage
of the buffer amplifier. Therefore, the input can tolerate significant
source impedances and is tailored for direct connection to external
resistive type sensors such as strain gages or RTDs.

Signed-off-by: Mircea Caprioru <mircea.caprioru@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-06-26 21:24:21 +01:00
Mircea Caprioru
f1794fd7bd iio: adc: ad7124: Remove input number limitation
The driver limits the user to use only 4/8 differential inputs, but this
device has the option to use pseudo-differential channels. This will
increase the number of channels to be equal with the number of inputs so 8
channels for ad7124-4 and 16 for ad7124-8.

This patch removes the check between channel nodes and num_inputs value.

Signed-off-by: Mircea Caprioru <mircea.caprioru@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-06-26 21:24:21 +01:00
Alexandru Ardelean
6a8036862d MAINTAINERS: add ADIS IMU driver library entry
This change adds the ADIS driver library to the MAINTAINERS list, and adds
myself as the current maintainer of this library.

Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-06-26 21:24:20 +01:00
Alexandru Ardelean
10dd571c66 iio: adis162xx: fix low-power docs & reports
All current ADIS162XX drivers have incorrect values defined via comments.
Also, when an error is reported the printed value is incorrect.

The functionality itself isn't affected, so it's not a critical issue.

And since the change is trivial, it was included in a single patch that
fixes these in one go. All values were correlated with the ones specified
in the data-sheets.

Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-06-26 21:24:20 +01:00
Nishka Dasgupta
a5dedb5c98 staging: rtl8712: Change return values of r8712_setrfreg_cmd()
Change return values of function r8712_setrfreg_cmd from _SUCCESS/_FAIL
to 0/-ENOMEM respectively. Modify call site accordingly.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-26 10:00:09 +08:00
Nishka Dasgupta
da8e81205e staging: rtl8712: Remove r8712_setassocsta_cmd()
Remove function r8712_setassocsta_cmd as it is only called by
mp_start_joinbss, which was removed in the previous patch.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-26 10:00:09 +08:00
Nishka Dasgupta
a58cc341bb staging: rtl8712: Remove mp_start_joinbss()
Remove unused function mp_start_joinbss.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-26 10:00:09 +08:00
Nishka Dasgupta
162c0dfac5 staging: rtl8712: Replace r8712_find_network()
Remove function r8712_find_network as all it does is call
_r8712_find_network.
Rename _r8712_find_network to r8712_find_network for compatibility with
call sites.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-26 10:00:09 +08:00
Nishka Dasgupta
d2179f3e93 staging: rtl8712: Remove r8712_setrttbl_cmd()
Remove unused function r8712_setrttbl_cmd.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-26 10:00:09 +08:00
Nishka Dasgupta
dc0f139b2e staging: rtl8712: Replace r8712_free_evt_priv()
Remove function r8712_free_evt_priv as all it does is call
_free_evt_priv.
Rename _free_evt_priv to r8712_free_evt_priv to maintain compatibility
with call sites.
Change type of new r8712_free_evt_priv from static to non-static to
match old definition.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-26 10:00:08 +08:00
Nishka Dasgupta
03c05c470f staging: rtl8712: Replace r8712_free_cmd_priv()
Remove function r8712_free_cmd_priv as all it does is call
_free_cmd_priv.
Change type of new r8712_free_cmd_priv from static to non-static to
match definition of original r8712_free_cmd_priv.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-26 10:00:08 +08:00
Nishka Dasgupta
6257450f89 staging: rtl8712: Change return values of r8712_init_evt_priv()
Change return values of the function r8712_init_evt_priv from
_SUCCESS/_FAIL to 0/-ENOMEM. Modify call site accordingly.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-26 10:00:08 +08:00
Nishka Dasgupta
795eb36899 staging: rtl8712: Replace function r8712_init_evt_priv()
Remove function r8712_init_evt_priv as all it does is call
_init_evt_priv.
Rename _init_evt_priv to r8712_init_evt_priv to maintain compatibility
with call sites.
Change type of new r8712_init_evt_priv from static to non-static as
original r8712_init_evt_priv was non-static.
Change return type of new r8712_init_evt_priv to int as original had
return type u32 but new (formerly _init_evt_priv) had return type sint.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-26 10:00:08 +08:00