OSDN Git Service

uclinux-h8/linux.git
5 years agoiio: imu: st_lsm6dsx: introduce ST_LSM6DSX_ID_EXT sensor ids
Lorenzo Bianconi [Sun, 11 Nov 2018 14:15:31 +0000 (15:15 +0100)]
iio: imu: st_lsm6dsx: introduce ST_LSM6DSX_ID_EXT sensor ids

Add ST_LSM6DSX_ID_EXT{0,1,2} sensor ids as reference for slave devices
connected to st_lsm6dsx i2c controller. Moreover introduce odr dependency
between accel and ext devices since i2c embedded controller relies on the
accelerometer sensor as bus read/write trigger so we need to enable accel
device at odr = max(accel_odr, ext_odr) in order to properly communicate
with i2c slave devices

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
5 years agoiio: imu: st_lsm6dsx: remove static from st_lsm6dsx_set_watermark
Lorenzo Bianconi [Sun, 11 Nov 2018 14:15:30 +0000 (15:15 +0100)]
iio: imu: st_lsm6dsx: remove static from st_lsm6dsx_set_watermark

Remove static qualifier from st_lsm6dsx_set_watermark routine in
order to be reused supporting st_lsm6dsx i2c controller

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
5 years agoiio: imu: st_lsm6dsx: reload trimming parameter at bootstrap
Lorenzo Bianconi [Sun, 11 Nov 2018 14:15:29 +0000 (15:15 +0100)]
iio: imu: st_lsm6dsx: reload trimming parameter at bootstrap

Perform a complete device reset at bootstrap reloading trimming parameter
after sw reset is completed. Device sw reset/boot is explained here:
https://www.st.com/resource/en/application_note/dm00517282.pdf,
section 5.7

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
5 years agoiio: imu: st_lsm6dsx: introduce locked read/write utility routines
Lorenzo Bianconi [Sun, 11 Nov 2018 14:15:28 +0000 (15:15 +0100)]
iio: imu: st_lsm6dsx: introduce locked read/write utility routines

Add st_lsm6dsx_update_bits_locked, st_lsm6dsx_read_locked and
st_lsm6dsx_write_locked utility routines in order to guarantee
the bus access is atomic respect to reg page configuration.
This is a preliminary patch to add i2c sensor hub support since
i2c master registers are accessed through a reg page multiplexer

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
5 years agoiio: adc: sc27xx: Add ADC data conversion timeout
Freeman Liu [Fri, 9 Nov 2018 03:25:31 +0000 (11:25 +0800)]
iio: adc: sc27xx: Add ADC data conversion timeout

Sometimes the ADC controller met some problems, and it will not complete
the data conversion, that will can not wake up the read process any more
to block users. So we should add one maximum conversion time to avoid
this issue.

Signed-off-by: Freeman Liu <freeman.liu@unisoc.com>
Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
5 years agostaging: iio: ad7780: remove unnecessary stashed voltage value
Renato Lui Geh [Mon, 5 Nov 2018 19:16:14 +0000 (17:16 -0200)]
staging: iio: ad7780: remove unnecessary stashed voltage value

This patch removes the unnecessary field int_vref_mv in ad7780_state
referring to the device's voltage.

Signed-off-by: Renato Lui Geh <renatogeh@gmail.com>
Acked-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
5 years agostaging: iio: ad7780: update voltage on read
Renato Lui Geh [Mon, 5 Nov 2018 19:14:58 +0000 (17:14 -0200)]
staging: iio: ad7780: update voltage on read

The ad7780 driver previously did not read the correct device output, as
it read an outdated value set at initialization. It now updates its
voltage on read.

Signed-off-by: Renato Lui Geh <renatogeh@gmail.com>
Acked-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
5 years agoiio: magnetometer: Add driver support for PNI RM3100
Song Qiang [Thu, 8 Nov 2018 09:27:49 +0000 (17:27 +0800)]
iio: magnetometer: Add driver support for PNI RM3100

PNI RM3100 is a high resolution, large signal immunity magnetometer,
composed of 3 single sensors and a processing chip with a MagI2C
interface.

Following functions are available:
 - Single-shot measurement from
   /sys/bus/iio/devices/iio:deviceX/in_magn_{axis}_raw
 - Triggerd buffer measurement.
 - DRDY pin for data ready trigger.
 - Both i2c and spi interface are supported.
 - Both interrupt and polling measurement is supported, depends on if
   the 'interrupts' in DT is declared.

Signed-off-by: Song Qiang <songqiang1304521@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
5 years agoiio: magnetometer: Add DT support for PNI RM3100
Song Qiang [Thu, 8 Nov 2018 09:27:48 +0000 (17:27 +0800)]
iio: magnetometer: Add DT support for PNI RM3100

Signed-off-by: Song Qiang <songqiang1304521@gmail.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
5 years agodt-bindings: Add PNI to the vendor prefixes
Song Qiang [Thu, 8 Nov 2018 09:27:47 +0000 (17:27 +0800)]
dt-bindings: Add PNI to the vendor prefixes

Signed-off-by: Song Qiang <songqiang1304521@gmail.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
5 years agoiio: st-accel: add support for lis3de
Heiko Stuebner [Wed, 7 Nov 2018 15:45:21 +0000 (16:45 +0100)]
iio: st-accel: add support for lis3de

This commit add support for STMicroelectronics lis3de accelerometer.
Datasheet for this device can be found here:

https://www.st.com/resource/en/datasheet/lis3de.pdf

Signed-off-by: Heiko Stuebner <heiko.stuebner@bq.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
5 years agoiio: light: Add device tree binding for vishay vcnl4035
Parthiban Nallathambi [Wed, 7 Nov 2018 17:08:21 +0000 (18:08 +0100)]
iio: light: Add device tree binding for vishay vcnl4035

Adding device tree binding for vcnl4035 and vendor
prefix for Vishay Intertechnology

Signed-off-by: Parthiban Nallathambi <pn@denx.de>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
5 years agoiio: light: Add support for vishay vcnl4035
Parthiban Nallathambi [Wed, 7 Nov 2018 17:08:20 +0000 (18:08 +0100)]
iio: light: Add support for vishay vcnl4035

Add support for VCNL4035, which is capable of Ambient light
sensing (ALS) and proximity function. This patch adds support
only for ALS function

Signed-off-by: Parthiban Nallathambi <pn@denx.de>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
5 years agoiio: adc: rcar-gyroadc: convert to SPDX identifiers
Kuninori Morimoto [Thu, 8 Nov 2018 06:40:21 +0000 (06:40 +0000)]
iio: adc: rcar-gyroadc: convert to SPDX identifiers

This patch updates license to use SPDX-License-Identifier
instead of verbose license text.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
5 years agoiio: adc: max11100: convert to SPDX identifiers
Kuninori Morimoto [Thu, 8 Nov 2018 06:41:10 +0000 (06:41 +0000)]
iio: adc: max11100: convert to SPDX identifiers

This patch updates license to use SPDX-License-Identifier
instead of verbose license text.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
5 years agoiio: adc: max9611: convert to SPDX identifiers
Kuninori Morimoto [Thu, 8 Nov 2018 06:42:43 +0000 (06:42 +0000)]
iio: adc: max9611: convert to SPDX identifiers

This patch updates license to use SPDX-License-Identifier
instead of verbose license text.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
5 years agostaging: iio: ad7780: generates pattern_mask from PAT bits
Giuliano Belinassi [Thu, 8 Nov 2018 13:03:40 +0000 (11:03 -0200)]
staging: iio: ad7780: generates pattern_mask from PAT bits

Previously, all pattern_masks and patterns in the chip_info table were
hardcoded. Now they are generated using the PAT macros, as described in
the datasheets.

Signed-off-by: Giuliano Belinassi <giuliano.belinassi@usp.br>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
5 years agostaging: iio: ad7780: check if ad778x before gain update
Giuliano Belinassi [Thu, 8 Nov 2018 13:03:20 +0000 (11:03 -0200)]
staging: iio: ad7780: check if ad778x before gain update

Only the ad778x have the 'gain' status bit. Check it before updating
through a new variable is_ad778x in chip_info.

Signed-off-by: Giuliano Belinassi <giuliano.belinassi@usp.br>
Acked-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
5 years agostaging: iio: ad7816: Set RD/WR pin and CONVST pin as outputs.
Nishad Kamdar [Fri, 9 Nov 2018 07:37:18 +0000 (13:07 +0530)]
staging: iio: ad7816: Set RD/WR pin and CONVST pin as outputs.

The RD/WR pin and CONVST pin are logical inputs to the AD78xx
chip as per the datasheet. Hence convert them to outputs.

Signed-off-by: Nishad Kamdar <nishadkamdar@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
5 years agostaging: iio: ad7816: Do not use busy_pin in case of AD7818
Nishad Kamdar [Fri, 9 Nov 2018 07:36:24 +0000 (13:06 +0530)]
staging: iio: ad7816: Do not use busy_pin in case of AD7818

AD7818 does not support busy_pin functionality as per datasheet.
Hence drop busy_pin when AD7818 is used.

Signed-off-by: Nishad Kamdar <nishadkamdar@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
5 years agoiio: adc: meson-saradc: add support for the chip's temperature sensor
Martin Blumenstingl [Sat, 3 Nov 2018 23:10:24 +0000 (00:10 +0100)]
iio: adc: meson-saradc: add support for the chip's temperature sensor

Channel 6 of the SAR ADC can be switched between two inputs:
SAR_ADC_CH6 input (an actual pad on the SoC) and the signal from the
temperature sensor inside the SoC.

To get usable results from the temperature sensor we need to read the
corresponding calibration data from the eFuse and pass it to the SAR ADC
registers. If the temperature sensor is not calibrated (the eFuse data
contains a bit for this) then the driver will only register the
iio_chan_spec's for voltage measurements.

This only enables the temperature sensor for the Meson8 SoC. Meson8b and
Meson8m2 SoCs can be supported in the future as well but we first need
a way to pass the fifth TSC (temperature sensor coefficient) bit to the
HHI register area (apart from that the infrastructure as already
implemented for Meson8 can be used). On the 64-bit SoCs (GXBB, GXL and
GXM) the temperature sensor inside SAR ADC is firmware-controlled (by
BL30, we can simply use the SCPI hwmon driver to get the chip
temperature).

To keep the devicetree interface backwards compatible we simply skip the
temperature sensor initialization if no eFuse nvmem cell is passed via
devicetree.

The public documentation for the SAR ADC IP block does not explain how
to use the registers to read the temperature. The logic from this patch
is based on reading and understanding Amlogic's GPL kernel sources.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
5 years agodt-bindings: iio: adc: meson-saradc: add temperature sensor support
Martin Blumenstingl [Sat, 3 Nov 2018 23:10:23 +0000 (00:10 +0100)]
dt-bindings: iio: adc: meson-saradc: add temperature sensor support

The 32-bit Meson8 SoC can use the SAR ADC to read the chip temperature.
This requires setting the correct TSC (temperature sensor coefficient),
which is programmed into the eFuse during the manufacturing process.
Meson8b and Meson8m2 are not supported yet because they have a 5-bit TSC
and only the first four bits are stored inside the SAR ADC registers.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
5 years agostaging:iio:ad2s90: Check channel type at read_raw
Matheus Tavares [Sat, 3 Nov 2018 22:49:48 +0000 (19:49 -0300)]
staging:iio:ad2s90: Check channel type at read_raw

This patch adds a channel type check at the beginning of the
ad2s90_read_raw function. Since ad2s90 has only one channel, it just
checks if the given channel is the expected one and if not, return
-EINVAL.

Signed-off-by: Matheus Tavares <matheus.bernardino@usp.br>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
5 years agostaging:iio:ad2s90: Add IIO_CHAN_INFO_SCALE to channel spec and read_raw
Victor Colombo [Sat, 3 Nov 2018 22:49:47 +0000 (19:49 -0300)]
staging:iio:ad2s90: Add IIO_CHAN_INFO_SCALE to channel spec and read_raw

This patch adds the IIO_CHAN_INFO_SCALE mask to ad2s90_chan and
implements the relative read behavior at ad2s90_read_raw.

Signed-off-by: Victor Colombo <victorcolombo@gmail.com>
Signed-off-by: Matheus Tavares <matheus.bernardino@usp.br>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
5 years agostaging:iio:ad2s90: Move device registration to the end of probe
Matheus Tavares [Sat, 3 Nov 2018 22:49:46 +0000 (19:49 -0300)]
staging:iio:ad2s90: Move device registration to the end of probe

Previously, devm_iio_device_register was being called before the
spi_setup call and the spi_device's max_speed_hz and mode assignments.
This could lead to a race condition since the driver was still being
set up after it was already made ready to use. To fix it, this patch
moves the device registration to the end of ad2s90_probe.

Signed-off-by: Matheus Tavares <matheus.bernardino@usp.br>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
5 years agostaging:iio:ad2s90: Remove always overwritten assignment
Matheus Tavares [Sat, 3 Nov 2018 22:49:45 +0000 (19:49 -0300)]
staging:iio:ad2s90: Remove always overwritten assignment

This patch removes an initial assignment to the variable ret at probe,
that was always overwritten.

Signed-off-by: Matheus Tavares <matheus.bernardino@usp.br>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
5 years agostaging:iio:ad2s90: Make probe handle spi_setup failure
Matheus Tavares [Sat, 3 Nov 2018 22:49:44 +0000 (19:49 -0300)]
staging:iio:ad2s90: Make probe handle spi_setup failure

Previously, ad2s90_probe ignored the return code from spi_setup, not
handling its possible failure. This patch makes ad2s90_probe check if
the code is an error code and, if so, do the following:

- Call dev_err with an appropriate error message.
- Return the spi_setup's error code.

Note: The 'return ret' statement could be out of the 'if' block, but
this whole block will be moved up in the function in the patch:
'staging:iio:ad2s90: Move device registration to the end of probe'.

Signed-off-by: Matheus Tavares <matheus.bernardino@usp.br>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
5 years agostaging:iio:ad2s90: Make read_raw return spi_read's error code
Matheus Tavares [Sat, 3 Nov 2018 22:49:43 +0000 (19:49 -0300)]
staging:iio:ad2s90: Make read_raw return spi_read's error code

Previously, when spi_read returned an error code inside ad2s90_read_raw,
the code was ignored and IIO_VAL_INT was returned. This patch makes the
function return the error code returned by spi_read when it fails.

Signed-off-by: Matheus Tavares <matheus.bernardino@usp.br>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
5 years agostaging: iio: ad7780: fix offset read value
Renato Lui Geh [Thu, 1 Nov 2018 14:43:02 +0000 (11:43 -0300)]
staging: iio: ad7780: fix offset read value

Variable val subtracted an uninitialized value on IIO_CHAN_INFO_OFFSET.
This was fixed by assigning the correct value instead.

Signed-off-by: Renato Lui Geh <renatogeh@gmail.com>
Acked-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
5 years agostaging: iio: ad2s1210: Add device tree table.
Nishad Kamdar [Wed, 31 Oct 2018 16:00:36 +0000 (21:30 +0530)]
staging: iio: ad2s1210: Add device tree table.

Add device tree table for matching vendor ID.

Note that as the driver is still heavily in flux and there are some
non obvious aspects to a comprehensive binding, that binding will
be submitted at a later date (before leaving staging!)

Signed-off-by: Nishad Kamdar <nishadkamdar@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
5 years agostaging: iio: ad2s1210: Drop the gpioin flag.
Nishad Kamdar [Wed, 31 Oct 2018 15:59:53 +0000 (21:29 +0530)]
staging: iio: ad2s1210: Drop the gpioin flag.

Drop gpioin flag which decides how the GPIOs
are controlled as the GPIOs must be outputs
for the host as per the datasheet.

Removes need for platform data so that is dropped as well.

Signed-off-by: Nishad Kamdar <nishadkamdar@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
5 years agostaging: iio: ad2s1210: Switch to the gpio descriptor interface
Nishad Kamdar [Wed, 31 Oct 2018 15:58:52 +0000 (21:28 +0530)]
staging: iio: ad2s1210: Switch to the gpio descriptor interface

Use the gpiod interface instead of the deprecated old non-descriptor
interface.

Signed-off-by: Nishad Kamdar <nishadkamdar@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
5 years agoiio: potentiometer: tpl0102: add IIO_AVAIL_RANGE support
Matt Ranostay [Sun, 28 Oct 2018 20:43:54 +0000 (13:43 -0700)]
iio: potentiometer: tpl0102: add IIO_AVAIL_RANGE support

Report the step range of the respective potentiometers that are
possible to userspace.

Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
5 years agodt-bindings: iio: dac: Add ti,dac7311 device tree bindings in documentation
Charles-Antoine Couret [Sun, 28 Oct 2018 16:24:02 +0000 (17:24 +0100)]
dt-bindings: iio: dac: Add ti,dac7311 device tree bindings in documentation

Description how to invoke ti-dac7311 driver from device tree file.

Signed-off-by: Charles-Antoine Couret <charles-antoine.couret@essensium.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
5 years agoiio:dac:ti-dac7311 Add driver for Texas Instrument DAC7311
Charles-Antoine Couret [Sun, 28 Oct 2018 16:24:01 +0000 (17:24 +0100)]
iio:dac:ti-dac7311 Add driver for Texas Instrument DAC7311

It is a driver for Texas Instruments 8/10/12-bit 1-channel
compatible with DAC6311 and DAC5311 chips.

Datasheet of this chip:
http://www.ti.com/lit/ds/symlink/dac7311.pdf

Signed-off-by: Charles-Antoine Couret <charles-antoine.couret@essensium.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
5 years agodt-bindings: iio: magn: add LSM9DS1 bindings
Martin Kelly [Fri, 26 Oct 2018 02:38:12 +0000 (19:38 -0700)]
dt-bindings: iio: magn: add LSM9DS1 bindings

Add DT binding documentation for the LSM9DS1 magnetometer.

Signed-off-by: Martin Kelly <martin@martingkelly.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
5 years agostaging: iio: adc: ad7280a: don't cast type inside switch expression
Slawomir Stepien [Fri, 26 Oct 2018 16:53:10 +0000 (18:53 +0200)]
staging: iio: adc: ad7280a: don't cast type inside switch expression

The type promotion will kick in, so the comparison will work.

Signed-off-by: Slawomir Stepien <sst@poczta.fm>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
5 years agoiio:magnetometer: st_magn: add BDU settings
Martin Kelly [Fri, 26 Oct 2018 02:38:11 +0000 (19:38 -0700)]
iio:magnetometer: st_magn: add BDU settings

LIS3MDL and LSM9DS1 are missing BDU settings in their register maps, so add
them. I don't have a LIS3MDL sensor to test, but this works correctly on
the LSM9DS1, which has the same register map.

Signed-off-by: Martin Kelly <martin@martingkelly.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
5 years agoiio:magnetometer: st_magn: add LSM9DS1 support
Martin Kelly [Fri, 26 Oct 2018 02:38:10 +0000 (19:38 -0700)]
iio:magnetometer: st_magn: add LSM9DS1 support

Update the sensor settings to support the LSM9DS1 sensor. Although the
LSM9DS1 accelerometer and gyroscope are coupled together to use the same
FIFO, the magnetometer is separate and can be cleanly supported without
refactoring the existing driver.

Signed-off-by: Martin Kelly <martin@martingkelly.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
5 years agoiio: magnetometer: add clarifying comment
Martin Kelly [Fri, 26 Oct 2018 02:38:09 +0000 (19:38 -0700)]
iio: magnetometer: add clarifying comment

Add a comment clarifying better when to use <device_name> vs
<device_name>-magn in compatibility strings.

Signed-off-by: Martin Kelly <martin@martingkelly.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
5 years agoiio: potentiometer: tpl0102: switch to using pointer to chip config
Matt Ranostay [Wed, 24 Oct 2018 10:38:57 +0000 (11:38 +0100)]
iio: potentiometer: tpl0102: switch to using pointer to chip config

More concise to have a pointer to tpl0102_cfg struct in the iio_priv
data than an integer to an index of an array.

Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
Reviewed-by: Slawomir Stepien <sst@poczta.fm>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
5 years agodt-bindings: iio: adc: Add AD7949 device tree bindings in documentation
Charles-Antoine Couret [Mon, 22 Oct 2018 21:02:43 +0000 (23:02 +0200)]
dt-bindings: iio: adc: Add AD7949 device tree bindings in documentation

Description how to invoke ad7949 driver from device tree file.

Signed-off-by: Charles-Antoine Couret <charles-antoine.couret@essensium.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
5 years agoiio:adc:ad7949: Add AD7949 ADC driver family
Charles-Antoine Couret [Mon, 22 Oct 2018 21:02:42 +0000 (23:02 +0200)]
iio:adc:ad7949: Add AD7949 ADC driver family

Compatible with AD7682 and AD7689 chips.
It is a Analog Devices ADC driver 14/16 bits 4/8 channels
with SPI protocol

Datasheet of the device:
http://www.analog.com/media/en/technical-documentation/data-sheets/AD7949.pdf

Signed-off-by: Charles-Antoine Couret <charles-antoine.couret@essensium.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
5 years agostaging: iio: ad5933: Remove unnecessary blank line
Victor Colombo [Mon, 22 Oct 2018 20:41:27 +0000 (17:41 -0300)]
staging: iio: ad5933: Remove unnecessary blank line

This patch fixes the checkpatch.pl warning:

WARNING: Blank lines aren't necessary before a close brace '}'

Signed-off-by: Victor Colombo <victorcolombo@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
5 years agostaging: iio: ad5933: Remove unnecessary space on casting
Victor Colombo [Mon, 22 Oct 2018 20:40:25 +0000 (17:40 -0300)]
staging: iio: ad5933: Remove unnecessary space on casting

This patch fixes the checkpatch.pl warning:

WARNING: No space is necessary after a cast

Signed-off-by: Victor Colombo <victorcolombo@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
5 years agoiio: adc128s052: use SPDX-License-Identifier
Dan O'Donovan [Thu, 25 Oct 2018 15:35:42 +0000 (16:35 +0100)]
iio: adc128s052: use SPDX-License-Identifier

This updates the ti-adc128s052.c file to use SPDX-License-Identifier
instead of more verbose license text.

Signed-off-by: Dan O'Donovan <dan@emutex.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
5 years agoiio: adc128s052: add ACPI _HID AANT1280
Nicola Lunghi [Thu, 25 Oct 2018 15:35:41 +0000 (16:35 +0100)]
iio: adc128s052: add ACPI _HID AANT1280

ACPI _HID AANT1280 matches an ADC124S101 present on E3940 SKUs of the UP
Squared board.

Add it to the driver.

Signed-off-by: Nicola Lunghi <nicola.lunghi@emutex.com>
[javier@emutex.com: fix up commit message and one checkpatch warning]
Signed-off-by: Javier Arteaga <javier@emutex.com>
Signed-off-by: Dan O'Donovan <dan@emutex.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
5 years agoiio: adc128s052: Add pin-compatible IDs
Javier Arteaga [Thu, 25 Oct 2018 15:35:40 +0000 (16:35 +0100)]
iio: adc128s052: Add pin-compatible IDs

The datasheets for ADC122S021 and ADC124S021 list two more
pin-compatible alternatives for each device.

Add their IDs as compatible strings.

Suggested-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Javier Arteaga <javier@emutex.com>
Signed-off-by: Dan O'Donovan <dan@emutex.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
5 years agostaging: iio: ad7816: Switch to the gpio descriptor interface
Nishad Kamdar [Wed, 17 Oct 2018 14:47:20 +0000 (20:17 +0530)]
staging: iio: ad7816: Switch to the gpio descriptor interface

Use the gpiod interface for rdwr_pin, convert_pin and busy_pin
instead of the deprecated old non-descriptor interface.

Note that Phil Reid identified that some of this code would never
have worked.  A follow up patch can fix that as this is just
a direct change of interface.

Signed-off-by: Nishad Kamdar <nishadkamdar@gmail.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
5 years agoiio: adc: ina2xx: add in early -EINVAL returns in case statements
Colin Ian King [Tue, 16 Oct 2018 16:14:18 +0000 (17:14 +0100)]
iio: adc: ina2xx: add in early -EINVAL returns in case statements

Static analysis with CoverityScan is throwing warnings that specific
case statements are missing breaks.  Rather than adding breaks, add
return -EINVAL to the specific case statements to clarify the
error return paths. Fix also saves 50 bytes.

Before:
   text    data     bss     dec     hex filename
  21418    4936     128   26482    6772 drivers/iio/adc/ina2xx-adc.o

After:
  dec     hex filename
  21370    4936     128   26434    6742 drivers/iio/adc/ina2xx-adc.o

(gcc 8.2, x86-64)

Detected by CoverityScan, CID#1462408 ("Missing break in switch")

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
5 years agoStaging:iio:adc:ad7606: Match parenthesis alignment
Marcelo Schmitt [Thu, 18 Oct 2018 01:31:47 +0000 (22:31 -0300)]
Staging:iio:adc:ad7606: Match parenthesis alignment

Change close parenthesis alignment to match respective open parenthesis at
iio/drivers/staging/iio/adc/ad7606.c line 379.
This makes the file more compliant with the preferred coding style for the
linux kernel.

Signed-of-by: Marcelo Schmitt <marcelo.schmitt1@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
5 years agoiio: st_sensors: miscellaneous cleanup
Martin Kelly [Tue, 16 Oct 2018 03:27:09 +0000 (20:27 -0700)]
iio: st_sensors: miscellaneous cleanup

Miscellaneous cleanup to fix minor consistency, grammar, and spelling
issues.

Signed-off-by: Martin Kelly <martin@martingkelly.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
5 years agostaging: iio: adc: ad7280a: use crc8.h API to build crc table
Slawomir Stepien [Thu, 18 Oct 2018 18:59:33 +0000 (20:59 +0200)]
staging: iio: adc: ad7280a: use crc8.h API to build crc table

The custom build function ad7280_crc8_build_table is not needed. The
crc8_populate_msb function from linux/crc8.h will build the same crc
table.

Signed-off-by: Slawomir Stepien <sst@poczta.fm>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
5 years agostaging: iio: adc: ad7280a: handle error from __ad7280_read32()
Slawomir Stepien [Sat, 20 Oct 2018 21:04:11 +0000 (23:04 +0200)]
staging: iio: adc: ad7280a: handle error from __ad7280_read32()

Inside __ad7280_read32(), the spi_sync_transfer() can fail with negative
error code. This change will ensure that this error is being passed up
in the call stack, so it can be handled.

Signed-off-by: Slawomir Stepien <sst@poczta.fm>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
5 years agotools iio: Override CFLAGS assignments
Jiri Olsa [Tue, 16 Oct 2018 15:06:14 +0000 (17:06 +0200)]
tools iio: Override CFLAGS assignments

So user could specify outside CFLAGS values.

Cc: Jonathan Cameron <jic23@kernel.org>
Cc: Hartmut Knaack <knaack.h@gmx.de>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
5 years agoiio: accel: kxcjk1013: Add KIOX0009 ACPI Hardware-ID
Hans de Goede [Fri, 12 Oct 2018 10:17:50 +0000 (12:17 +0200)]
iio: accel: kxcjk1013: Add KIOX0009 ACPI Hardware-ID

Add KIOX0009 ACPI HID, this is used e.g. on the Acer One 10.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
5 years agostaging: iio: adt7316: fix parenthesis alignment
Renato Lui Geh [Mon, 8 Oct 2018 22:12:05 +0000 (19:12 -0300)]
staging: iio: adt7316: fix parenthesis alignment

This patch fixes most "Alignment should match open parenthesis" check
warnings found by checkpatch.pl in the addac/adt7316 driver.

Signed-off-by: Renato Lui Geh <renatogeh@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
5 years agoiio: dpot-dac: mark expected switch fall-through with text GCC expects.
Gustavo A. R. Silva [Mon, 8 Oct 2018 17:35:28 +0000 (19:35 +0200)]
iio: dpot-dac: mark expected switch fall-through with text GCC expects.

In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.

Notice that in this particular case, I replaced "...and fall through."
with the specific string "fall through", which is what GCC is
expecting to find thus supressing this false positive.

As Peter has observed this breaks the nice English flow, which is
less than ideal, but short of teaching GCC to read English, there
isn't a lot that we can do about it.

Addresses-Coverity-ID: 1462408 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
5 years agostaging: iio: ad2s1210: fix 'assignment operator' style checks
Matheus Tavares [Mon, 8 Oct 2018 03:29:38 +0000 (00:29 -0300)]
staging: iio: ad2s1210: fix 'assignment operator' style checks

This patch fixes all "Assignment operator '=' should be on the previous
line" checks found in ad2s1210.c with checkpatch.pl.

Signed-off-by: Matheus Tavares <matheus.bernardino@usp.br>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
5 years agostaging: iio: cdc: ad7150: fix misaligned lines
Slawomir Stepien [Fri, 5 Oct 2018 08:05:15 +0000 (10:05 +0200)]
staging: iio: cdc: ad7150: fix misaligned lines

These lines were misaligned, but the checkpatch.pl didn't indicate them
as such.

Signed-off-by: Slawomir Stepien <sst@poczta.fm>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
5 years agostaging: iio: cdc: ad7150: use value copy to shorten the line length
Slawomir Stepien [Fri, 5 Oct 2018 08:04:44 +0000 (10:04 +0200)]
staging: iio: cdc: ad7150: use value copy to shorten the line length

By using the copy of channel attribute, we can now make the lines short
enough to eliminate the checkpatch.pl problem:

    CHECK: Alignment should match open parenthesis

Signed-off-by: Slawomir Stepien <sst@poczta.fm>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
5 years agoiio: ssp_sensors: don't manually free devm managed resources
Uwe Kleine-König [Fri, 5 Oct 2018 19:48:30 +0000 (21:48 +0200)]
iio: ssp_sensors: don't manually free devm managed resources

The charme of devm_* functions is that you don't need to care about them
in the error path. In this case it is valid to just return NULL which makes
the device fail to probe and then the two gpios and the allocated memory
are freed automatically by the driver core.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
5 years agostaging: iio: ad5933: rename ext_clk_Hz -> ext_clk_hz
Alexandru Ardelean [Tue, 2 Oct 2018 11:57:57 +0000 (14:57 +0300)]
staging: iio: ad5933: rename ext_clk_Hz -> ext_clk_hz

The checkpatch script doesn't like camel-case names.
Renamed the variable.

Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
5 years agoiio: adc: Fix Renesas GyroADC MAINTAINERS entry
Marek Vasut [Tue, 2 Oct 2018 01:00:13 +0000 (03:00 +0200)]
iio: adc: Fix Renesas GyroADC MAINTAINERS entry

Fix the F: entry in MAINTAINERS file, point it to the correct file.
While at it, add DT binding doc F: entry too.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Joe Perches <joe@perches.com>
Cc: linux-renesas-soc@vger.kernel.org
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
5 years agostaging: rtl8712: add SPDX identifiers
Michael Straube [Wed, 3 Oct 2018 14:17:16 +0000 (16:17 +0200)]
staging: rtl8712: add SPDX identifiers

This satisfies a checkpatch warning and is the preferred
method for notating the license.

The SPDX identifier is a legally binding shorthand, which
can be used instead of the full boiler plate text.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: fbtft: Prefer using the BIT macro
Mamta Shukla [Wed, 3 Oct 2018 14:40:15 +0000 (20:10 +0530)]
staging: fbtft: Prefer using the BIT macro

Replacing all occurrences of (1<<x) with BIT(x) to fix checkpatch issue.
CHECK:Prefer using the BIT macro

Signed-off-by: Mamta Shukla <mamtashukla555@gmail.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: fix spelling mistake in comment
Michael Straube [Sun, 30 Sep 2018 19:53:10 +0000 (21:53 +0200)]
staging: rtl8188eu: fix spelling mistake in comment

Fix a spelling mistake reported by checkpatch.
Caculate -> Calculate

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: remove braces from single if statement
Michael Straube [Sun, 30 Sep 2018 19:53:09 +0000 (21:53 +0200)]
staging: rtl8188eu: remove braces from single if statement

Remove braces from single line if statement.
Reported by checkpatch.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: remove unnecessary parentheses in odm_rtl8188e.c
Michael Straube [Sun, 30 Sep 2018 19:53:08 +0000 (21:53 +0200)]
staging: rtl8188eu: remove unnecessary parentheses in odm_rtl8188e.c

Remove unnecessary parentheses in odm_rtl8188e.c.
Reported by checkpatch.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: add spaces around '+' in fw.c
Michael Straube [Sun, 30 Sep 2018 19:53:07 +0000 (21:53 +0200)]
staging: rtl8188eu: add spaces around '+' in fw.c

Add spaces around '+' in fw.c to follow kernel coding style.
Reported by checkpatch.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: simplify block comment in pwrseq.c
Michael Straube [Sun, 30 Sep 2018 19:53:06 +0000 (21:53 +0200)]
staging: rtl8188eu: simplify block comment in pwrseq.c

Simplify block comment to a single line to clear a checkpatch warning.
WARNING: Block comments use * on subsequent lines

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: correct block comment in bb_cfg.c
Michael Straube [Sun, 30 Sep 2018 19:53:05 +0000 (21:53 +0200)]
staging: rtl8188eu: correct block comment in bb_cfg.c

Correct block comment to clear a checkpatch warning.
WARNING: Block comments should align the * on each line

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: rename odm_SignalScaleMapping()
Michael Straube [Sun, 30 Sep 2018 19:53:04 +0000 (21:53 +0200)]
staging: rtl8188eu: rename odm_SignalScaleMapping()

Rename odm_SignalScaleMapping to avoid CamelCase.
odm_SignalScaleMapping -> odm_signal_scale_mapping

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: rename variable in odm_SignalScaleMapping()
Michael Straube [Sun, 30 Sep 2018 19:53:03 +0000 (21:53 +0200)]
staging: rtl8188eu: rename variable in odm_SignalScaleMapping()

Rename variable in odm_SignalScaleMapping() to avoid CamelCase.
RetSig -> retsig

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: rename parameter of odm_SignalScaleMapping()
Michael Straube [Sun, 30 Sep 2018 19:53:02 +0000 (21:53 +0200)]
staging: rtl8188eu: rename parameter of odm_SignalScaleMapping()

Rename parameter of odm_SignalScaleMapping() to avoid CamelCase.
CurrSig -> currsig

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: rename odm_EVMdbToPercentage()
Michael Straube [Sun, 30 Sep 2018 19:53:01 +0000 (21:53 +0200)]
staging: rtl8188eu: rename odm_EVMdbToPercentage()

Rename odm_EVMdbToPercentage() to avoid CamelCase.
odm_EVMdbToPercentage -> odm_evm_db_to_percentage

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: rename parameter of odm_EVMdbToPercentage()
Michael Straube [Sun, 30 Sep 2018 19:53:00 +0000 (21:53 +0200)]
staging: rtl8188eu: rename parameter of odm_EVMdbToPercentage()

Rename parameter of odm_EVMdbToPercentage() to avoid CamelCase.
Value -> value

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: rename odm_QueryRxPwrPercentage()
Michael Straube [Sun, 30 Sep 2018 19:52:59 +0000 (21:52 +0200)]
staging: rtl8188eu: rename odm_QueryRxPwrPercentage()

Rename odm_QueryRxPwrPercentage() to avoid CamelCase.
odm_QueryRxPwrPercentage -> odm_query_rxpwrpercentage

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: rename parameter of odm_QueryRxPwrPercentage()
Michael Straube [Sun, 30 Sep 2018 19:52:58 +0000 (21:52 +0200)]
staging: rtl8188eu: rename parameter of odm_QueryRxPwrPercentage()

Rename parameter of odm_QueryRxPwrPercentage() to avoid CamelCase.
AntPower -> antpower

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: replace tabs with spaces in odm_hwconfig.c
Michael Straube [Sun, 30 Sep 2018 19:52:57 +0000 (21:52 +0200)]
staging: rtl8188eu: replace tabs with spaces in odm_hwconfig.c

Replace tabs with spaces in odm_hwconfig.c where appropriate.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: add spaces around '*' in odm_hwconfig.c
Michael Straube [Sun, 30 Sep 2018 19:52:56 +0000 (21:52 +0200)]
staging: rtl8188eu: add spaces around '*' in odm_hwconfig.c

Add spaces around '*' in odm_hwconfig.c to follow kernel coding style.
Reported by checkpatch.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: add spaces around '+' in odm_hwconfig.c
Michael Straube [Sun, 30 Sep 2018 19:52:55 +0000 (21:52 +0200)]
staging: rtl8188eu: add spaces around '+' in odm_hwconfig.c

Add spaces around '+' in odm_hwconfig.c to follow kernel coding style.
Reported by checkpatch.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: remove wrapper odm_SignalScaleMapping()
Michael Straube [Sun, 30 Sep 2018 19:52:54 +0000 (21:52 +0200)]
staging: rtl8188eu: remove wrapper odm_SignalScaleMapping()

The function odm_SignalScaleMapping() is just a wrapper for
odm_SignalScaleMapping_92CSeries().

Rename odm_SignalScaleMapping_92CSeries() to odm_SignalScaleMapping()
and remove the wrapper.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: rename odm_HWConfig
Michael Straube [Sun, 30 Sep 2018 19:52:53 +0000 (21:52 +0200)]
staging: rtl8188eu: rename odm_HWConfig

Rename source and header file to avoid CamelCase.
odm_HWConfig.c -> odm_hwconfig.c
odm_HWConfig.h -> odm_hwconfig.h

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: cleanup inconsistent indenting
Michael Straube [Sun, 30 Sep 2018 19:52:52 +0000 (21:52 +0200)]
staging: rtl8188eu: cleanup inconsistent indenting

Cleanup all inconsistent indenting reported by smatch.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: ks7010: Remove unnecessary null check
Aymen Qader [Sun, 30 Sep 2018 08:34:21 +0000 (09:34 +0100)]
staging: ks7010: Remove unnecessary null check

Remove the unnecessary socket buffer null check in hostif_data_request.
There is already an appropriate null check in the calling function:

(ks_wlan_net.c) ks_wlan_start_xmit

Signed-off-by: Aymen Qader <qader.aymen@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: sm750fb: Remove extra space character
Aymen Qader [Sat, 29 Sep 2018 17:38:07 +0000 (18:38 +0100)]
staging: sm750fb: Remove extra space character

Remove an extra space in ddk750_mode.c to fix indentation

Signed-off-by: Aymen Qader <qader.aymen@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtlwifi: Removed unused define and code efuse_re_pg* from wifi.h
Rick Veens [Sun, 30 Sep 2018 18:29:19 +0000 (20:29 +0200)]
staging: rtlwifi: Removed unused define and code efuse_re_pg* from wifi.h

The following:
 bool efuse_re_pg_sec1flag;
 u8 efuse_re_pg_data[8];
are not referenced anywhere in the rtlwifi code.

Signed-off-by: Rick Veens <rickveens92@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: axis-fifo: add error handling of class_create()
Alexey Khoroshilov [Fri, 28 Sep 2018 21:25:27 +0000 (00:25 +0300)]
staging: axis-fifo: add error handling of class_create()

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: most: usb: add release function for DCI device
Christian Gromm [Fri, 28 Sep 2018 21:37:19 +0000 (23:37 +0200)]
staging: most: usb: add release function for DCI device

This patch adds the missing release function for the DCI device that frees
the container structure it is embedded in.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agoMAINTAINERS: removed staging/ft1000 driver
Deepa Dinamani [Sat, 29 Sep 2018 01:41:40 +0000 (18:41 -0700)]
MAINTAINERS: removed staging/ft1000 driver

Delete the ft1000 MAINTAINERS entry, concluding the
earlier removal of the driver in commit 6512edec48b2
("staging: ft1000: remove obsolete driver").

Reported-by: Joe Perches <joe@perches.com>
Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtlwifi: Return -ENOMEM instead of -1
Aymen Qader [Sat, 29 Sep 2018 17:24:29 +0000 (18:24 +0100)]
staging: rtlwifi: Return -ENOMEM instead of -1

Use the ENOMEM constant instead of -1 for kzalloc failure checks in
rtl_halmac.c

Signed-off-by: Aymen Qader <qader.aymen@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: mt7621-mmc: Remove unused single statement macros
Nishad Kamdar [Mon, 1 Oct 2018 14:48:31 +0000 (20:18 +0530)]
staging: mt7621-mmc: Remove unused single statement macros

This patch removes unused single statement macros in sd.c

Signed-off-by: Nishad Kamdar <nishadkamdar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: mt7621-mmc: Remove single statement macro msdc_irq_restore()
Nishad Kamdar [Mon, 1 Oct 2018 14:46:05 +0000 (20:16 +0530)]
staging: mt7621-mmc: Remove single statement macro msdc_irq_restore()

This patch removes the macro msdc_irq_restore() and replaces its
usage with call to the function called in the macro definition.
Issue found by checkpatch.

Signed-off-by: Nishad Kamdar <nishadkamdar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: dgnc: delete the driver
Greg Kroah-Hartman [Tue, 2 Oct 2018 22:14:14 +0000 (15:14 -0700)]
staging: dgnc: delete the driver

Digi does not support it, no one has hardware for it, and no one is
working on it, so let's drop it for now.  If anyone wants to pick it
back up, then can revert this patch.

Reported-by: Lidza Louina <lidza.louina@gmail.com>
Reported-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: dgnc: Fix Kconfig help header and text
Sehro Rautenkranz [Tue, 25 Sep 2018 23:41:59 +0000 (17:41 -0600)]
staging: dgnc: Fix Kconfig help header and text

Replace Kconfig help header and text to match other modules. Issue found
by checkpatch.

Spacing adjusted to match Documentation/process/coding-style.rst. Issue
reported by rdunlap@infradead.org.

Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Sehro Rautenkranz <sehro@sehro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: clean up clang warning on extraneous parentheses
Colin Ian King [Sun, 30 Sep 2018 23:10:51 +0000 (00:10 +0100)]
staging: rtl8723bs: clean up clang warning on extraneous parentheses

There are extraneous parantheses that are causing clang to produce a
warning so remove these.

Clean up 3 clang warnings:
equality comparison with extraneous parentheses [-Wparentheses-equality]

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8712: Remove unnecessary parentheses
Dafna Hirschfeld [Sat, 29 Sep 2018 15:55:08 +0000 (18:55 +0300)]
staging: rtl8712: Remove unnecessary parentheses

Remove unnecessary parentheses between 'address-of' operators
and struct members.
Issues found with checkpatch.pl

Signed-off-by: Dafna Hirschfeld <dafna3@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: Mark ACPI table declaration as used
Nathan Chancellor [Wed, 26 Sep 2018 23:20:55 +0000 (16:20 -0700)]
staging: rtl8723bs: Mark ACPI table declaration as used

Clang emits the following warning:

drivers/staging/rtl8723bs/os_dep/sdio_intf.c:25:36: warning: variable
'acpi_ids' is not needed and will not be emitted
[-Wunneeded-internal-declaration]
static const struct acpi_device_id acpi_ids[] = {
                                   ^
1 warning generated.

Mark acpi_ids with the attribute __used, which makes it clear to Clang
that we don't want this warning while not inhibiting Clang's dead code
elimination from removing the unreferenced internal symbol when moving
the data to the globally available symbol with MODULE_DEVICE_TABLE.

$ nm -S drivers/staging/rtl8723bs/os_dep/sdio_intf.o | grep acpi
0000000000000000 0000000000000040 R __mod_acpi__acpi_ids_device_table

Link: https://github.com/ClangBuiltLinux/linux/issues/169
Suggested-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: mt7621-mmc: replace `printk` with preferred API
Dafna Hirschfeld [Sun, 30 Sep 2018 19:04:04 +0000 (22:04 +0300)]
staging: mt7621-mmc: replace `printk` with preferred API

Replace calls to `printk` with `dev_info` and `pr_err`
Issues found with checkpatch.pl

Signed-off-by: Dafna Hirschfeld <dafna3@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>