openwrt/staging/blogic.git
7 years agodt-bindings: adc: mt7622: add binding document
Zhiyong Tao [Mon, 26 Jun 2017 06:11:40 +0000 (14:11 +0800)]
dt-bindings: adc: mt7622: add binding document

The commit adds mt7622 compatible node in binding document.

Signed-off-by: Zhiyong Tao <zhiyong.tao@mediatek.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
7 years agodt-bindings: iio: accel: add LIS3L02DQ sensor device binding
Lorenzo Bianconi [Sun, 25 Jun 2017 15:50:50 +0000 (17:50 +0200)]
dt-bindings: iio: accel: add LIS3L02DQ sensor device binding

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@st.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
7 years agodt-bindings: iio: imu: st_lsm6dsx: support open drain mode
Lorenzo Bianconi [Wed, 21 Jun 2017 19:21:29 +0000 (21:21 +0200)]
dt-bindings: iio: imu: st_lsm6dsx: support open drain mode

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@st.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
7 years agoiio: imu: st_lsm6dsx: support open drain mode
Lorenzo Bianconi [Wed, 21 Jun 2017 19:21:28 +0000 (21:21 +0200)]
iio: imu: st_lsm6dsx: support open drain mode

Add open drain support in order to share requested IRQ line between
st_lsm6dsx device and other peripherals

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@st.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
7 years agodt-bindings: iio: pressure: Add bindings for MS5637, MS5805, MS5837 and MS8607 sensors
Manivannan Sadhasivam [Tue, 13 Jun 2017 17:21:32 +0000 (22:51 +0530)]
dt-bindings: iio: pressure: Add bindings for MS5637, MS5805, MS5837 and MS8607 sensors

Add device tree bindings for Measurement-Specialties MS5637, MS5805, MS5837 and MS8607 pressure & temperature sensor

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
7 years agoiio: pressure: ms5637: Add OF match table
Manivannan Sadhasivam [Tue, 13 Jun 2017 17:21:13 +0000 (22:51 +0530)]
iio: pressure: ms5637: Add OF match table

Add of_match_table for Measurement-Specialties MS5637, MS5805, MS5837 and MS8607 pressure & temperature sensor

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
7 years agodt-bindings: iio: humidity: Add bindings for HTU21 and MS8607 sensors
Manivannan Sadhasivam [Tue, 13 Jun 2017 17:20:43 +0000 (22:50 +0530)]
dt-bindings: iio: humidity: Add bindings for HTU21 and MS8607 sensors

Add device tree bindings for Measurement-Specialties HTU21 temperature & humidity sensor and humidity part of MS8607 sensor

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
7 years agoiio: humidity: htu21: Add OF match table
Manivannan Sadhasivam [Tue, 13 Jun 2017 17:20:05 +0000 (22:50 +0530)]
iio: humidity: htu21: Add OF match table

Add of_match_table for Measurement-Specialties htu21 temperature & humidity sensor and humidity part of MS8607 sensor

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
7 years agodt-bindings: iio: update STM32 timers clock names
Fabrice Gasnier [Wed, 14 Jun 2017 15:13:15 +0000 (17:13 +0200)]
dt-bindings: iio: update STM32 timers clock names

Clock name has been updated during driver/DT binding review:
https://lkml.org/lkml/2016/12/13/718
Update DT binding doc to reflect this.

Fixes: bf2d8581b1b3 (iio: Add bindings for STM32 timer trigger driver)
Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Acked-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
7 years agoiio: adc: at91-sama5d2_adc: add support for suspend/resume functionality
Eugen Hristev [Fri, 23 Jun 2017 12:54:57 +0000 (15:54 +0300)]
iio: adc: at91-sama5d2_adc: add support for suspend/resume functionality

Added support for suspend/resume functionality for the ADC IP
in sama5d2 SoC.
In order to enter Suspend to ram mode (backup + self refresh mode for
memory), in which the ADC IP is no longer powered, we need to reset the
pins to default state, for the scenario when they are also used for I2C
bus to communicate with the PMIC.
On resume, we need to reconfigure the ADC IP registers and reconfigure the
trigger registers in the case when the suspend procedure is done while
sysfs has the buffer and trigger enabled.
In the case the suspend happens exactly during a software triggered
conversion, the request will time out, because we reset and power down
the ADC.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
7 years agoiio: accel: st_accel_spi: rename of_device_id table in st_accel_of_match
Lorenzo Bianconi [Tue, 20 Jun 2017 19:52:09 +0000 (21:52 +0200)]
iio: accel: st_accel_spi: rename of_device_id table in st_accel_of_match

In order to add proper device tree support give a more general name
to of_device_id table

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@st.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
7 years agoiio: common: st_sensors: move st_sensors_of_i2c_probe() in common code
Lorenzo Bianconi [Tue, 20 Jun 2017 19:52:08 +0000 (21:52 +0200)]
iio: common: st_sensors: move st_sensors_of_i2c_probe() in common code

Move st_sensors_of_i2c_probe() in st_sensors_core and rename it in
st_sensors_of_name_probe(). That change is necessary to add device-tree
support in spi code otherwise the rest of the autodetection will fail
since spi->modalias (and indio_dev->name) will be set using compatible
string value that differs from standard sensor name

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@st.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
7 years agoiio: magnetometer: st_magn_core: enable multiread by default for LIS3MDL
Lorenzo Bianconi [Tue, 20 Jun 2017 17:42:45 +0000 (19:42 +0200)]
iio: magnetometer: st_magn_core: enable multiread by default for LIS3MDL

Enable multiread by default for LIS3MDL since using I2C interface
the subaddr Msb is used to automatically increase the slave address
during multiple data read/write. In the same way, using SPI interface,
bit 1 in register address is used to enable auto-increment of the slave
address in multiple read/write.

Fixes: 872e79add756 (iio:magn: Add STMicroelectronics magn driver)
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@st.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
7 years agoiio: light: tcs3472: fix ATIME register write
Akinobu Mita [Mon, 12 Jun 2017 15:05:08 +0000 (00:05 +0900)]
iio: light: tcs3472: fix ATIME register write

The integration time is controlled by the ATIME register only.  However,
this register is written by i2c_smbus_write_word_data() in write_raw().

We actually don't need to write a subsequent register.  So just use
i2c_smbus_write_byte_data() instead.

Cc: Peter Meerwald <pmeerw@pmeerw.net>
Cc: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Acked-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
7 years agoiio: adc: Fix polling of INA219 conversion ready flag
Stefan Brüns [Wed, 24 May 2017 00:09:07 +0000 (02:09 +0200)]
iio: adc: Fix polling of INA219 conversion ready flag

While the INA226 has a conversion ready flag (CVRF) in the R/W Mask/Enable
register with read-to-clear semantics, the corresponding bit of the INA219
(CNVR) is part of the bus voltage register. The flag is cleared by reading
the power register.

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
7 years agodt-bindings: iio: temperature: Add bindings for TSYS01 temperature sensor
Manivannan Sadhasivam [Tue, 13 Jun 2017 15:53:13 +0000 (21:23 +0530)]
dt-bindings: iio: temperature: Add bindings for TSYS01 temperature sensor

Add device tree bindings for Measurement Specialties TSYS01 temperature sensor

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
7 years agoiio: temperature: tsys01: Add OF match table
Manivannan Sadhasivam [Tue, 13 Jun 2017 15:52:22 +0000 (21:22 +0530)]
iio: temperature: tsys01: Add OF match table

Add of_match_table for Measurement Specialties TSYS01 temperature sensor

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
7 years agoiio: adc: at91-sama5d2_adc: add hw trigger and buffer support
Eugen Hristev [Thu, 15 Jun 2017 13:24:57 +0000 (16:24 +0300)]
iio: adc: at91-sama5d2_adc: add hw trigger and buffer support

Added support for the external hardware trigger on pin ADTRG,
integrated the three possible edges into the driver
and created buffer management for data retrieval

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
Acked-by: Ludovic Desroches <ludovic.desroches@microchip.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
7 years agoDocumentation: dt: iio: at91-sama5d2_adc: add hw trigger edge binding
Eugen Hristev [Thu, 15 Jun 2017 13:24:55 +0000 (16:24 +0300)]
Documentation: dt: iio: at91-sama5d2_adc: add hw trigger edge binding

Add property for the edge type of the hardware trigger pin ADTRG

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
Acked-by: Rob Herring <robh@kernel.org>
Acked-by: Ludovic Desroches <ludovic.desroches@microchip.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
7 years agoiio: adc: Kconfig: Append vendor name for IMX7D_ADC
Fabio Estevam [Sat, 17 Jun 2017 21:00:16 +0000 (18:00 -0300)]
iio: adc: Kconfig: Append vendor name for IMX7D_ADC

To keep IMX7D_ADC text consistent with other iio/adc entries, add
the vendor name to the driver menu text.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
7 years agoiio: humidity: hdc100x: add match table and device id's
Michael Stecklein [Mon, 19 Jun 2017 16:01:06 +0000 (11:01 -0500)]
iio: humidity: hdc100x: add match table and device id's

Add of_match_table and point it to a list of compatible device tree
device id's.

Signed-off-by: Michael Stecklein <m-stecklein@ti.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
7 years agoiio: humidity: hdc100x: document compatible HDC10xx devices
Michael Stecklein [Mon, 19 Jun 2017 16:01:05 +0000 (11:01 -0500)]
iio: humidity: hdc100x: document compatible HDC10xx devices

Include datasheet links, add i2c_device_id entries, and update
kconfig help for compatible HDC10xx devices: HDC1000, HDC1008,
HDC1010, HDC1050, and HDC1080.

Signed-off-by: Michael Stecklein <m-stecklein@ti.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
7 years agodt-bindings: iio: humidity: add bindings for HDC100x sensors
Michael Stecklein [Mon, 19 Jun 2017 16:01:04 +0000 (11:01 -0500)]
dt-bindings: iio: humidity: add bindings for HDC100x sensors

Add the bindings for the family of HDC100x sensors.

Signed-off-by: Michael Stecklein <m-stecklein@ti.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
7 years agodt-bindings: iio: gyro: add L3GD20H sensor device binding
Lorenzo Bianconi [Mon, 19 Jun 2017 20:04:31 +0000 (22:04 +0200)]
dt-bindings: iio: gyro: add L3GD20H sensor device binding

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@st.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
7 years agoiio: gyro: st_gyro: fix L3GD20H support
Lorenzo Bianconi [Mon, 19 Jun 2017 20:04:30 +0000 (22:04 +0200)]
iio: gyro: st_gyro: fix L3GD20H support

Add proper support for L3GD20H gyroscope sensor. In particular:
- use L3GD20H as device name instead of L3GD20
- fix available full scales
- fix available sample frequencies

Note that the original patch listed first below introduced broken support for
this part.  The second patch drops the support as it didn't work.

This new patch brings in working support.

Fixes: 9444a300c2be (IIO: Add support for L3GD20H gyroscope)
Fixes: a0657716416f ("iio:gyro: bug on L3GD20H gyroscope support")
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@st.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
7 years agoiio: accel: bmc150: Add support for BOSC0200 ACPI device id
Hans de Goede [Mon, 19 Jun 2017 06:22:25 +0000 (08:22 +0200)]
iio: accel: bmc150: Add support for BOSC0200 ACPI device id

Add support for the BOSC0200 ACPI device id used on some x86 tablets.
note driver_data is not set to a specific model, driver_data is not
used anyways (instead detection is done on the chip_id reg) and the
2 tablets with a BOSC0200 ACPI device id I've have 2 different chips,
one has a BMA250E, the other a BMA222E.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
7 years agostaging: lustre: replace kmalloc with kmalloc_array
Denis Petrovic [Sun, 25 Jun 2017 12:52:48 +0000 (14:52 +0200)]
staging: lustre: replace kmalloc with kmalloc_array

This patch fixes the following checkpatch.pl warning:

WARNING: Prefer kmalloc_array over kmalloc with multiply

Signed-off-by: Denis Petrovic <denis.petrovic@edu.ece.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoStaging: ion: fix code style warning from NULL comparisons
Quytelda Kahja [Tue, 27 Jun 2017 21:35:46 +0000 (14:35 -0700)]
Staging: ion: fix code style warning from NULL comparisons

This patch replaces several instances where a pointer is compared to NULL
(i.e., `ptr == NULL`) with `!ptr`, which is preferred.

Signed-off-by: Quytelda Kahja <quytelda@tamalin.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: fsl-mc: make dprc.h header private
Laurentiu Tudor [Tue, 27 Jun 2017 14:41:35 +0000 (17:41 +0300)]
staging: fsl-mc: make dprc.h header private

dprc.h is only used in the mc bus driver so move it together with the
sources thus making it private.

Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: fsl-mc: move mc-cmd.h contents in the public header
Laurentiu Tudor [Tue, 27 Jun 2017 14:41:34 +0000 (17:41 +0300)]
staging: fsl-mc: move mc-cmd.h contents in the public header

mc-cmd.h contains some low level functions used to encode and decode
commands to the MC. They are used by the drivers so move them to the
public headers and get rid of the mc-cmd.h header.

Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: fsl-mc: move mc-sys.h contents in the public header
Laurentiu Tudor [Tue, 27 Jun 2017 14:41:33 +0000 (17:41 +0300)]
staging: fsl-mc: move mc-sys.h contents in the public header

mc-sys.h contains the API to send commands to the MC and is used
by drivers. Move it to the public headers and get rid of the mc-sys.h
header.

Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: fsl-mc: fix a few implicit includes
Laurentiu Tudor [Tue, 27 Jun 2017 14:41:32 +0000 (17:41 +0300)]
staging: fsl-mc: fix a few implicit includes

Few files using byte order macros but did not explicitly
included the required kernel header, so add it.

Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: fsl-mc: remove dpmng API files
Laurentiu Tudor [Tue, 27 Jun 2017 14:41:31 +0000 (17:41 +0300)]
staging: fsl-mc: remove dpmng API files

dpmng.h & dpmng.c files expose an API of just one function which is only
used by the bus driver. Move that single API in the bus source as static
and remove the two files.

Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: fsl-mc: move rest of mc-bus.h to private header
Laurentiu Tudor [Tue, 27 Jun 2017 14:41:30 +0000 (17:41 +0300)]
staging: fsl-mc: move rest of mc-bus.h to private header

All the mc-bus.h contents is only used privately in the bus driver so
move everything to the private header and get rid of the mc-bus.h
header file.

Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: fsl-mc: move couple of definitions to public header
Laurentiu Tudor [Tue, 27 Jun 2017 14:41:29 +0000 (17:41 +0300)]
staging: fsl-mc: move couple of definitions to public header

Define dev_is_fsl_mc() and the bus type definition (fsl_mc_bus_type)
are used externally so move them to the public header.

Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: fsl-mc: move irq domain creation prototype to public header
Laurentiu Tudor [Tue, 27 Jun 2017 14:41:28 +0000 (17:41 +0300)]
staging: fsl-mc: move irq domain creation prototype to public header

fsl_mc_msi_create_irq_domain() will is used from the irqchip glue code
so it needs to be in the public headers.

Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: fsl-mc: turn several exported functions static
Laurentiu Tudor [Tue, 27 Jun 2017 14:41:27 +0000 (17:41 +0300)]
staging: fsl-mc: turn several exported functions static

They are never used outside the source they are implemented in and very
likely never will, so it's safe to make them static.

Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: fsl-mc: delete prototype of unimplemented function
Laurentiu Tudor [Tue, 27 Jun 2017 14:41:26 +0000 (17:41 +0300)]
staging: fsl-mc: delete prototype of unimplemented function

The function fsl_mc_bus_exists() has a prototype but is never
implemented so delete it from the header file.

Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: fsl-mc: delete duplicated function prototypes
Laurentiu Tudor [Tue, 27 Jun 2017 14:41:25 +0000 (17:41 +0300)]
staging: fsl-mc: delete duplicated function prototypes

These functions already have their prototypes in fsl-mc-private.h
header file so delete them from mc-bus.h.

Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: fsl-mc: decouple the mc-bus public headers from dprc.h
Laurentiu Tudor [Tue, 27 Jun 2017 14:41:24 +0000 (17:41 +0300)]
staging: fsl-mc: decouple the mc-bus public headers from dprc.h

In its current form, the public headers of the mc-bus depend only on a
structure "dprc_obj_desc" defined in dprc.h. Move it to the bus public
header together with its associated defines and, in order to keep the
naming prefixes consistent rename it to "fsl_mc_obj_desc".
This will allow making dprc.h private in future patches.

Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: fsl-mc: drop useless #includes
Laurentiu Tudor [Tue, 27 Jun 2017 14:41:23 +0000 (17:41 +0300)]
staging: fsl-mc: drop useless #includes

These couple of header files are not needed in the source
so remove them.

Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: fsl-mc: be consistent when checking strcmp() return
Laurentiu Tudor [Tue, 27 Jun 2017 14:41:22 +0000 (17:41 +0300)]
staging: fsl-mc: be consistent when checking strcmp() return

Stick to one way of checking the return code of strcmp(): use '!'.
This was suggested in a review comment.

Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: fsl-mc: move comparison before strcmp() call
Laurentiu Tudor [Tue, 27 Jun 2017 14:41:21 +0000 (17:41 +0300)]
staging: fsl-mc: move comparison before strcmp() call

Move comparison before the strcmp() in this if statement, and slightly
increase efficiency by not making the strcmp() each time the if gets
evaluated but only when the comparison is true.
This was suggested in a review comment.

Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: speakup: make function ser_to_dev static
Colin Ian King [Wed, 28 Jun 2017 13:13:51 +0000 (14:13 +0100)]
staging: speakup: make function ser_to_dev static

The helper function ser_to_dev does not need to be in global scope, so
make it static.

Cleans up sparse warning:
"warning: symbol 'ser_to_dev' was not declared. Should it be static?"

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Okash Khawaja <okash.khawaja@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: ks7010: fix spelling mistake: "errror" -> "error"
Colin Ian King [Wed, 28 Jun 2017 16:11:29 +0000 (17:11 +0100)]
staging: ks7010: fix spelling mistake: "errror" -> "error"

Trivial fix to spelling mistake in netdev_err message

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: rtl8192e: fix spelling mistake: "respose" -> "response"
Colin Ian King [Tue, 27 Jun 2017 14:23:26 +0000 (15:23 +0100)]
staging: rtl8192e: fix spelling mistake: "respose" -> "response"

Trivial fix to spelling mistake in netdev_info message and split
line to clean up an checkpatch line too wide warning.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: wilc1000: fix spelling mistake: "dissconect" -> "disconnect"
Colin Ian King [Tue, 27 Jun 2017 09:29:06 +0000 (10:29 +0100)]
staging: wilc1000: fix spelling mistake: "dissconect" -> "disconnect"

Trivial fix to spelling mistake in netdev_err error message

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: ccree: fix block comment style
Gilad Ben-Yossef [Tue, 27 Jun 2017 07:27:26 +0000 (10:27 +0300)]
staging: ccree: fix block comment style

Align block comments according to coding style.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: ccree: remove/add (un)needed blank lines
Gilad Ben-Yossef [Tue, 27 Jun 2017 07:27:25 +0000 (10:27 +0300)]
staging: ccree: remove/add (un)needed blank lines

Remove or add blank lines as needed to match coding style.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: ccree: remove unused type CCFipsSyncStatus_t
Gilad Ben-Yossef [Tue, 27 Jun 2017 07:27:24 +0000 (10:27 +0300)]
staging: ccree: remove unused type CCFipsSyncStatus_t

The CCFipsSyncStatus_t type was not being used in the code.
Remove it.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: ccree: remove custom type ssi_fips_state_t
Gilad Ben-Yossef [Tue, 27 Jun 2017 07:27:23 +0000 (10:27 +0300)]
staging: ccree: remove custom type ssi_fips_state_t

Replace custom type ssi_fips_state_t with underlying enum.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: ccree: remove custom type ssi_fips_error_t
Gilad Ben-Yossef [Tue, 27 Jun 2017 07:27:22 +0000 (10:27 +0300)]
staging: ccree: remove custom type ssi_fips_error_t

Replace custom type ssi_fips_error_t with underlying enum.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: ccree: remove custom type tdes_keys_t
Gilad Ben-Yossef [Tue, 27 Jun 2017 07:27:21 +0000 (10:27 +0300)]
staging: ccree: remove custom type tdes_keys_t

Replace references to type tdes_keys_t with struct tdes_keys.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: ccree: fix pointer location
Gilad Ben-Yossef [Tue, 27 Jun 2017 07:27:20 +0000 (10:27 +0300)]
staging: ccree: fix pointer location

Fix location of pointer in variables definitions and dereference.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: ccree: remove comparisons to NULL
Gilad Ben-Yossef [Tue, 27 Jun 2017 07:27:19 +0000 (10:27 +0300)]
staging: ccree: remove comparisons to NULL

Remove explicit comparisons to NULL in ccree driver.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: ccree: fix unmatched if/else braces
Gilad Ben-Yossef [Tue, 27 Jun 2017 07:27:18 +0000 (10:27 +0300)]
staging: ccree: fix unmatched if/else braces

Fix mismatched braces between if and else.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: ccree: no need for braces for single statements
Gilad Ben-Yossef [Tue, 27 Jun 2017 07:27:17 +0000 (10:27 +0300)]
staging: ccree: no need for braces for single statements

Fix several cases of needless braces around single statement blocks.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: ccree: remove redundant blank lines
Gilad Ben-Yossef [Tue, 27 Jun 2017 07:27:16 +0000 (10:27 +0300)]
staging: ccree: remove redundant blank lines

Remove redundant blank lines in brace blocks

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: ccree: fix else placement
Gilad Ben-Yossef [Tue, 27 Jun 2017 07:27:15 +0000 (10:27 +0300)]
staging: ccree: fix else placement

Fix cases where the else clause was not located correctly after the if
brace.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: ccree: drop comparsion to true/false
Gilad Ben-Yossef [Tue, 27 Jun 2017 07:27:14 +0000 (10:27 +0300)]
staging: ccree: drop comparsion to true/false

Fix cases in ccree where explicit comparsion to true/false
was made.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: ccree: fix missing or redundant spaces
Gilad Ben-Yossef [Tue, 27 Jun 2017 07:27:13 +0000 (10:27 +0300)]
staging: ccree: fix missing or redundant spaces

Add and/or remove redundant and/or missing spaces in ccree source

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agodrivers: staging: sm750: Hold lock irrespective of fb numbers.
Dhananjay Balan [Thu, 29 Jun 2017 11:24:35 +0000 (13:24 +0200)]
drivers: staging: sm750: Hold lock irrespective of fb numbers.

Start holding the lock for all cases irrespective of number of fb,
there could be a deadlock since this number could change in the
lifetime of this lock

Signed-off-by: Dhananjay Balan <mail@dbalan.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: speakup: make ttyio synths use device name
Okash Khawaja [Sun, 25 Jun 2017 18:40:02 +0000 (19:40 +0100)]
staging: speakup: make ttyio synths use device name

This patch introduces new module parameter, dev, which takes a string
representing the device that the external synth is connected to, e.g.
ttyS0, ttyUSB0 etc. This is then used to communicate with the synth.
That way, speakup can support more than ttyS*. As of this patch, it
only supports ttyS*, ttyUSB* and selected synths for lp*. dev parameter
is only available for tty-migrated synths.

Users will either use dev or ser as both serve same purpose. This patch
maintains backward compatility by allowing ser to be specified. When
both are specified, whichever is non-default, i.e. not ttyS0, is used.
If both are non-default then dev is used.

Signed-off-by: Okash Khawaja <okash.khawaja@gmail.com>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: speakup: check and convert dev name or ser to dev_t
Okash Khawaja [Sun, 25 Jun 2017 18:40:01 +0000 (19:40 +0100)]
staging: speakup: check and convert dev name or ser to dev_t

This patch adds functionality to validate and convert either a device
name or 'ser' memmber of synth into dev_t. Subsequent patch in this set
will call it to convert user-specified device into device number. For
device name, this patch does some basic sanity checks on the string
passed in. It currently supports ttyS*, ttyUSB* and, for selected
synths, lp*.

The patch also introduces a string member variable named 'dev_name' to
struct spk_synth. 'dev_name' represents the device name - ttyUSB0 etc -
which needs conversion to dev_t.

Signed-off-by: Okash Khawaja <okash.khawaja@gmail.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agotty: add function to convert device name to number
Okash Khawaja [Sun, 25 Jun 2017 18:40:00 +0000 (19:40 +0100)]
tty: add function to convert device name to number

The function converts strings like ttyS0 and ttyUSB0 to dev_t like
(4, 64) and (188, 0). It does this by scanning tty_drivers list for
corresponding device name and index. If the driver is not registered,
this function returns -ENODEV. It also acquires tty_mutex.

Signed-off-by: Okash Khawaja <okash.khawaja@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoRevert "staging: fsl-mc: drop useless #includes"
Greg Kroah-Hartman [Mon, 26 Jun 2017 11:51:14 +0000 (13:51 +0200)]
Revert "staging: fsl-mc: drop useless #includes"

This reverts commit bb4a64b79f3b9973316e775f6c2910a98b6a562a.

The whole series is broken, so back it all out.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Cc: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoRevert "staging: fsl-mc: decouple the mc-bus public headers from dprc.h"
Greg Kroah-Hartman [Mon, 26 Jun 2017 11:51:11 +0000 (13:51 +0200)]
Revert "staging: fsl-mc: decouple the mc-bus public headers from dprc.h"

This reverts commit c6ce019edb0c9c09b8150011d4f66181952631e9.

The whole series is broken, so back it all out.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Cc: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoRevert "staging: fsl-mc: delete duplicated function prototypes"
Greg Kroah-Hartman [Mon, 26 Jun 2017 11:51:08 +0000 (13:51 +0200)]
Revert "staging: fsl-mc: delete duplicated function prototypes"

This reverts commit 48d3cfb3189a88e1670f609f8bd7d55839d531cf.

The whole series is broken, so back it all out.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Cc: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoRevert "staging: fsl-mc: delete prototype of unimplemented function"
Greg Kroah-Hartman [Mon, 26 Jun 2017 11:51:05 +0000 (13:51 +0200)]
Revert "staging: fsl-mc: delete prototype of unimplemented function"

This reverts commit be6faff74cda2ac1838c0f85dca3c3ce4975fa73.

The whole series is broken, so back it all out.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Cc: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoRevert "staging: fsl-mc: turn several exported functions static"
Greg Kroah-Hartman [Mon, 26 Jun 2017 11:51:01 +0000 (13:51 +0200)]
Revert "staging: fsl-mc: turn several exported functions static"

This reverts commit 10a8593a76c7719e110e334f84a6ef2068dd4c0f.

The whole series is broken, so back it all out.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Cc: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoRevert "staging: fsl-mc: move irq domain creation prototype to public header"
Greg Kroah-Hartman [Mon, 26 Jun 2017 11:50:58 +0000 (13:50 +0200)]
Revert "staging: fsl-mc: move irq domain creation prototype to public header"

This reverts commit b32cdde14edec1c75a2190a39e810bf41fa29a7a.

The whole series is broken, so back it all out.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Cc: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoRevert "staging: fsl-mc: move couple of definitions to public header"
Greg Kroah-Hartman [Mon, 26 Jun 2017 11:50:54 +0000 (13:50 +0200)]
Revert "staging: fsl-mc: move couple of definitions to public header"

This reverts commit 7eba570ece326ea0da2da72f1d4142100c145827.

The whole series is broken, so back it all out.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Cc: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoRevert "staging: fsl-mc: move rest of mc-bus.h to private header"
Greg Kroah-Hartman [Mon, 26 Jun 2017 11:50:51 +0000 (13:50 +0200)]
Revert "staging: fsl-mc: move rest of mc-bus.h to private header"

This reverts commit af4376710cc5188c42eb473676f6c9d2a16692c4.

The whole series is broken, so back it all out.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Cc: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoRevert "staging: fsl-mc: remove dpmng API files"
Greg Kroah-Hartman [Mon, 26 Jun 2017 11:50:48 +0000 (13:50 +0200)]
Revert "staging: fsl-mc: remove dpmng API files"

This reverts commit b065307fe0ad7859f01ce8560e6bdc590324561a.

The whole series is broken, so back it all out.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Cc: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoRevert "staging: fsl-mc: fix a few implicit includes"
Greg Kroah-Hartman [Mon, 26 Jun 2017 11:50:45 +0000 (13:50 +0200)]
Revert "staging: fsl-mc: fix a few implicit includes"

This reverts commit 5776aad3fe1bb87f3e4816cde8735647597da336.

The whole series is broken, so back it all out.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Cc: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoRevert "staging: fsl-mc: move mc-sys.h contents in the public header"
Greg Kroah-Hartman [Mon, 26 Jun 2017 11:50:41 +0000 (13:50 +0200)]
Revert "staging: fsl-mc: move mc-sys.h contents in the public header"

This reverts commit 7d6e221d73904aedcbd46ce2db6a545be55d2296.

The whole series is broken, so back it all out.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Cc: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoRevert "staging: fsl-mc: move mc-cmd.h contents in the public header"
Greg Kroah-Hartman [Mon, 26 Jun 2017 11:50:33 +0000 (13:50 +0200)]
Revert "staging: fsl-mc: move mc-cmd.h contents in the public header"

This reverts commit 9b1aa45539fb8389deb79e4a939bfc05ee45aeb5.

The whole series is broken, so back it all out.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Cc: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoRevert "staging: fsl-mc: make dprc.h header private"
Greg Kroah-Hartman [Mon, 26 Jun 2017 11:49:15 +0000 (13:49 +0200)]
Revert "staging: fsl-mc: make dprc.h header private"

This reverts commit 1877e4ba2d0890244284eea101681b6f990aa2be.

The whole series is broken, so back it all out.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Cc: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoMerge tag 'iio-for-4.13b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23...
Greg Kroah-Hartman [Mon, 26 Jun 2017 05:09:23 +0000 (07:09 +0200)]
Merge tag 'iio-for-4.13b' of git://git./linux/kernel/git/jic23/iio into staging-next

Jonathan writes:

Second set of IIO new device support, features and cleanups for the 4.13 cycle.

A few reverts here. One was a general failure to notice a device was already
supported by another driver.  The second is due to a review comment pointing
out that the original patch was a bad idea and would break existing systems.

Reverts
* bma180
  - Revert addition of support for the BMA250E it is already supported by
    the bmc150-accel and better supported at that. Oops.
* hi8435
  - The fix for cleanup of the reset gpio stuff isn't a good way to go.  It
    breaks systems where an inverting level convertor is used.  The right fix
    is to make the original devicetree correct - even if it involves patching
    the devicetree in kernel.

New Device Support
* stm32-adc
  - STM32H7 support and bindings.

Features
* core
  - add a hardware triggered operating mode for systems in which the actual
    trigger is never seen by the kernel.  This is typically only used when
    a device 'can' use other triggers, but if a particular magic one is
    enabled the interrupt is effectively handled in hardware and we never see
    it.
* st-lsm6dsx
  - support active low interrupts.
* stm32-adc
  - Make the core adc clock optional as not all hardware supported requires it.
  - Make the bus clock optional in the per instance driver as it may be shared
    by all instances of the ADC and is handled by the core.
  - Rework to have a data structure representing the device type specific
    elements.
* stm32-trigger (and counter)
  - Use the INDIO_HARDWARE_TRIGGERED_MODE where appropriate.
  - Add an attribute to configure device modes for quadrature counting etc.

Clean ups and minor fixes
* IIO core.
  - use __sysfs_match_string() helper rather than open coding the same.
* ad7791
  - use sysfs_match_string() helper rather than open coding the same.
* aspeed-adc
  - handle return value of clk_prepare_enable
* cpcap
  - Fix default register values and ensure the battery thermistor is enabled
    correctly.
  - Fix the reported die temperature where we can - docs are lacking.
  - Remove the hung interrupt quirk as no longer happens due to fix in the
    mfd driver.
* hi8435
  - Remove &s from hi8435_info definition as unneeded and inconsistent.
* hid-sensor-trgger
  - Add kconfig depends on IIO_BUFFER (fixes patch in previous series)
* ina2xx
  - Make the use of iio_info_mask* elements consistent for all channels.
    This doesn't have any visible effect, but acts as clear documentation of
    which channels various resulting attributes apply to.
* lpc32xx
  - handle the return value of clk_prepare_enable.
* meson-saradc
  - NULL instead of 0 for pointer.
* mma9551
  - use NULL for GPIO connection ID to aid implementation fo ACPI support.
    Here the connection ID doesn't actually tell us anything and it is much
    easier to deal with the driver if it's not there.
* mpu6050
  - Fix lock issues through use of a local mux.
  - Replace sprintf with scnprintf as appropriate.
  - Check whoami against all known values.  This allows for a small number of
    boards where we are really fishing for the part not being present at all.
    It is unfortunately common to have undescribed changes to use newer chips.
    We paper over this but just emitting a warning for those cases as long as
    we know about.
* mxs-lradc
  - Fix some non static warnings.
* rcar-adc
  - Part of making the naming for this part consistent across the kernel.
* st_accel
  - drop some spi_device_id entries for variants with no SPI support
* st_magn
  - drop some spi_device_id entries for variants with no SPI support.
* sx9500
  - Use devm_gpiod_get instead of indexed value with an index of 0 on all
    occasions.
* twl4030
  - Drop unused twl4030_get_madc_conversion as callers removed now throughout
    kernel.
  - Unexport twl4030_madc_conversion() as no used only within this driver.
  - Drop twl4030_madc_user_params as not used now.
  - Drop twl4030_madc_request.func_cb as not used now.
  - Fold the twl4030-madc.h header into the driver as no longer used anywhere
    else in the kernel.
* xilinx
  - Handle the return value of clk_prepare_enable

7 years agotty: define tty_open_by_driver when CONFIG_TTY is not defined
Okash Khawaja [Sat, 17 Jun 2017 21:32:55 +0000 (22:32 +0100)]
tty: define tty_open_by_driver when CONFIG_TTY is not defined

This patch adds definition of tty_open_by_driver when CONFIG_TTY is not
defined. This was supposed to have been included in commit
12e84c71b7d4ee38d51377fd494ac748ee4e6912 ("tty: export
tty_open_by_driver"). The patch follows convention for other such
functions and returns NULL.

Signed-off-by: Okash Khawaja <okash.khawaja@gmail.com>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: speakup: fix synth caching when synth init fails
Okash Khawaja [Tue, 20 Jun 2017 10:07:32 +0000 (11:07 +0100)]
staging: speakup: fix synth caching when synth init fails

synths[] array caches currently loaded synths. synth_add checks
synths[] before adding a new one. It however ignores the result of
do_synth_init. So when do_synth_init fails, the failed synth is still
cached. Since, as a result module loading fails too, synth_remove -
which is responsible for removing the cached synth - is never called.
Next time the failing synth is added again it succeeds because
synth_add finds it cached inside synths[].

This patch fixes this by caching a synth only after do_synth_init
succeeds.

Signed-off-by: Okash Khawaja <okash.khawaja@gmail.com>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoStaging: rtl8712 : wifi.h: Fixed Macro argument reuse
Jaya Durga [Fri, 23 Jun 2017 11:24:40 +0000 (16:54 +0530)]
Staging: rtl8712 : wifi.h: Fixed Macro argument reuse

CHECK: Macro argument reuse 'pframe' - possible side-effects?

Convert get_tofr_ds macro to inline functions to fix checkpatch check

Signed-off-by: Jaya Durga <rjdurga@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: vt6655 - add parameter names
Derek Robson [Sun, 25 Jun 2017 01:38:17 +0000 (13:38 +1200)]
staging: vt6655 - add parameter names

Fix checkpatch.pl warnings of the form "function definition argument
'foo' should also have an identifier name" in header files.

Signed-off-by: Derek Robson <robsonde@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: rtl8192u - add parameter names
Derek Robson [Sun, 25 Jun 2017 02:00:12 +0000 (14:00 +1200)]
staging: rtl8192u - add parameter names

Fixed checkpatch.pl warnings of "function definition argument FOO should
also have an identifier name"
Found using checkpatch

Signed-off-by: Derek Robson <robsonde@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: sm750fb - add parameter names
Derek Robson [Sun, 25 Jun 2017 01:54:59 +0000 (13:54 +1200)]
staging: sm750fb - add parameter names

Fixed checkpatch.pl warnings of the form "function definition argument
'foo' should also have an identifier name" in header files.

Signed-off-by: Derek Robson <robsonde@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: rtl8723bs - remove asm includes
Derek Robson [Sun, 25 Jun 2017 01:49:38 +0000 (13:49 +1200)]
staging: rtl8723bs - remove asm includes

Fixed checkpatch warnings "Use #include <linux/FOO> instead of <asm/FOO>"
Found using checkpatch

Signed-off-by: Derek Robson <robsonde@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: unisys: visorhba - octal permissions
Derek Robson [Sun, 25 Jun 2017 01:43:56 +0000 (13:43 +1200)]
staging: unisys: visorhba - octal permissions

Fixed style of permissions to octal.
Found using checkpatch

Signed-off-by: Derek Robson <robsonde@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: rtl8188eu: style fixes
Galo Navarro [Sat, 24 Jun 2017 18:32:55 +0000 (20:32 +0200)]
staging: rtl8188eu: style fixes

Fix multiple style issues (CHECK spaces preferred around that $operator).

Signed-off-by: Galo Navarro <anglor@varoa.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: ccree: use signal safe completion wait
Gilad Ben-Yossef [Sun, 25 Jun 2017 07:47:24 +0000 (10:47 +0300)]
staging: ccree: use signal safe completion wait

We were waiting for a completion notification of HW DMA
operation using an interruptible wait which can result
in data corruption if a signal interrupted us while
DMA was not yet completed.

Fix this by moving to uninterrupted wait.

Fixes: abefd6741d ("staging: ccree: introduce CryptoCell HW driver").
Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: ccree: add DT bus coherency detection
Gilad Ben-Yossef [Sun, 25 Jun 2017 07:47:23 +0000 (10:47 +0300)]
staging: ccree: add DT bus coherency detection

The ccree driver has build time configurable support
to work on top of coherent (e.g. ACP) vs. none coherent bus
connections. Turn it to run-time configurable option
based on device tree.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: ccree: add clock management support
Gilad Ben-Yossef [Sun, 25 Jun 2017 07:47:22 +0000 (10:47 +0300)]
staging: ccree: add clock management support

Some SoC which implement CryptoCell have a dedicated clock
tied to it, some do not. Implement clock support if exists
based on device tree data and tie power management to it.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: ccree: remove unused function
Gilad Ben-Yossef [Sun, 25 Jun 2017 07:47:21 +0000 (10:47 +0300)]
staging: ccree: remove unused function

The function set_ack_last was not used anywhere. Remove it.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: ccree: register setkey for none hash macs
Gilad Ben-Yossef [Sun, 25 Jun 2017 07:47:20 +0000 (10:47 +0300)]
staging: ccree: register setkey for none hash macs

The original ccree driver was registering a useless setkey
method even for non-MAC hash transformations. Somewhere
around v4.9 a check was added that failed hash operations
if a setkey method was registered but was not called,
so during the initial upstream port code was added to
only register the setkey method for MAC type hash transform.

Unfortunately, the ccree driver also registers non-hash based
MAC transforms and the code had a logic error that stopped
it registering a setkey callback even for those, thus rendering
them useless.

This commit fixes the logic mistake, thus correctly registering
a setkey method only for MAC transformations, leaving it out
for non-MAC ones, whether they are hash based on not.

Fixes: 50cfbbb7e627 ("staging: ccree: add ahash support").
Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: ccree: fix hash import/export
Gilad Ben-Yossef [Sun, 25 Jun 2017 07:47:19 +0000 (10:47 +0300)]
staging: ccree: fix hash import/export

Hash import and export was saving and restoring the wrong context
and therefore disabled. Fix it by restoring intermediate digest
and additional state needed.

The hash and mac transform now pass testmgr partial hash tests.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: wlan-ng: Fix struct definition's and variable type
Suniel Mahesh [Fri, 16 Jun 2017 05:31:45 +0000 (11:01 +0530)]
staging: wlan-ng: Fix struct definition's and variable type

le16_to_cpu() accepts argument of type __le16 and cpu_to_le16()
returns an argument of type __le16. This patch fixes:
(a) the type of the variable that end's up getting return from
    cpu_to_le16().
(b) the member types of struct hfa384x_host_scan_request_data,
    struct hfa384x_bytestr32 and struct hfa384x_hscan_result_sub.

The following type mismatch warnings reported by sparse
have been fixed:
warning: incorrect type in assignment (different base types)
warning: cast to restricted __le16

Signed-off-by: Suniel Mahesh <sunil.m@techveda.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: rtl8723bs: Remove unnecessary cast in kfree
Amitoj Kaur Chawla [Wed, 14 Jun 2017 22:33:03 +0000 (18:33 -0400)]
staging: rtl8723bs: Remove unnecessary cast in kfree

Remove unnecassary casts in the argument to kfree.

Found using Coccinelle. The semantic patch used to find this is as
follows:

//<smpl>
@@
type T;
expression *f;
@@

- kfree((T *)(f));
+ kfree(f);
//</smpl>

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: rtl8723bs: hal: Use (true/false) in assignment to bool
simran singhal [Tue, 20 Jun 2017 05:27:28 +0000 (10:57 +0530)]
staging: rtl8723bs: hal: Use (true/false) in assignment to bool

This patch assigns (true/false) to boolean EDCCA_State instead of (1/0).
And, there is no need of comparing EDCCA_State explicitly with constant
1.

Signed-off-by: simran singhal <singhalsimran0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: sm750fb: change default screen resolution
Sudip Mukherjee [Mon, 19 Jun 2017 20:32:58 +0000 (21:32 +0100)]
staging: sm750fb: change default screen resolution

The previous patch which updated screen resolution was tested under
wrong environment. sm750 driver does not support 24bpp. It only
supports 8bpp, 16bpp and 32bpp.
Lets update the default screen resolution to use 32bpp for a better
screen performance.

Fixes: ac669251087d ("staging: sm750fb: change default screen resolution")
Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: fb_xgi: vb_table: Remove white space after tabstop
Matthew Reed [Wed, 21 Jun 2017 02:39:52 +0000 (22:39 -0400)]
staging: fb_xgi: vb_table: Remove white space after tabstop

Remove white space after tabstop on closing bracket as suggested by
checkpatch.pl.  Additional white space removed for page consistency.

Signed-off-by: Matthew Reed <4d5452@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: fusb302: don't bitshift __le16 type
Frans Klaver [Fri, 16 Jun 2017 17:45:56 +0000 (19:45 +0200)]
staging: fusb302: don't bitshift __le16 type

The header field in struct pd_message is declared as an __le16 type. The
data in the message is supposed to be little endian. This means we don't
have to go and shift the individual bytes into position when we're
filling the buffer, we can just copy the contents right away. As an
added benefit we don't get fishy results on big endian systems anymore.

Signed-off-by: Frans Klaver <fransklaver@gmail.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>