platform/kernel/linux-rpi.git
6 years agostaging: android: add identifiers to function parameters
Ashish Kalra [Sat, 2 Dec 2017 17:29:27 +0000 (22:59 +0530)]
staging: android: add identifiers to function parameters

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

Signed-off-by: Ashish Kalra <eashishkalra@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: android: Fix checkpatch.pl error
Ashish Kalra [Sat, 2 Dec 2017 17:21:05 +0000 (22:51 +0530)]
staging: android: Fix checkpatch.pl error

fixed CHECK: Lines should not end with a '('
reported by checkpatch.pl

Signed-off-by: Ashish Kalra <eashishkalra@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: olpc_dcon: Line up parentheses in func calls and defs
Zebulon McCorkle [Tue, 21 Nov 2017 20:51:15 +0000 (14:51 -0600)]
staging: olpc_dcon: Line up parentheses in func calls and defs

Line up arguments to opening parentheses and ensure lines stay under 80
columns, since checkpatch.pl was complaining about incorrect indentation
in function calls and definitions.

Signed-off-by: Zebulon McCorkle <zebmccorkle@zeb.fun>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: olpc_dcon: Change bitshifts to BIT macro
Zebulon McCorkle [Tue, 21 Nov 2017 20:51:14 +0000 (14:51 -0600)]
staging: olpc_dcon: Change bitshifts to BIT macro

checkpatch.pl reported the bitshifts (1<<x) as a style violation, so
change them to the BIT macro (BIT(x)).

Signed-off-by: Zebulon McCorkle <zebmccorkle@zeb.fun>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: xgifb: remove macros with hidden variable
Joshua Abraham [Sat, 2 Dec 2017 01:39:09 +0000 (20:39 -0500)]
staging: xgifb: remove macros with hidden variable

This patch removes macros in XGI_main.h that contain a xgifb_info
variable.  These macros hurt readability by hiding said variable
behind a define.  It also uses a temporary variable to keep the
replaced code from getting too long.

Signed-off-by: Joshua Abraham <j.abraham1776@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: ccree: amend aead func def for readability
Gilad Ben-Yossef [Sun, 3 Dec 2017 13:58:21 +0000 (13:58 +0000)]
staging: ccree: amend aead func def for readability

Func definitions in the aead implementation were did not adhere to
coding style. Fix them for better readability.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: ccree: fix AEAD func naming convention
Gilad Ben-Yossef [Sun, 3 Dec 2017 13:58:20 +0000 (13:58 +0000)]
staging: ccree: fix AEAD func naming convention

The aead files was using a func naming convention which was inconsistent
(ssi vs. cc), included a useless prefix (ssi_aead) and often used
too long function names producing monster func names such as
ssi_aead_gcm_setup_ghash_desc() that made the call site code hard
to read.

Make the code more readable by switching to a simpler, consistent naming
conventionfor all the function defined in the file.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: ccree: NULLify backup_info when unused
Gilad Ben-Yossef [Sun, 3 Dec 2017 13:58:19 +0000 (13:58 +0000)]
staging: ccree: NULLify backup_info when unused

backup_info field is only allocated for decrypt code path.
The field was not nullified when not used causing a kfree
in an error handling path to attempt to free random
addresses as uncovered in stress testing.

Fixes: 737aed947f9b ("staging: ccree: save ciphertext for CTS IV")
Cc: stable@vger.kernel.org
Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: ccree: update TODO list
Gilad Ben-Yossef [Sun, 3 Dec 2017 13:58:18 +0000 (13:58 +0000)]
staging: ccree: update TODO list

Update the ccree staging TODO list in light of recent work.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: ccree: remove interim DT docs
Gilad Ben-Yossef [Sun, 3 Dec 2017 13:58:17 +0000 (13:58 +0000)]
staging: ccree: remove interim DT docs

As proper DT bindings doc where submitted and ACKed,
remove the interim one.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: ccree: remove braces for single statement blocks
Gilad Ben-Yossef [Sun, 3 Dec 2017 13:58:16 +0000 (13:58 +0000)]
staging: ccree: remove braces for single statement blocks

Remove braces from single statement if clause.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: ccree: fix indentation of var assignment
Gilad Ben-Yossef [Sun, 3 Dec 2017 13:58:15 +0000 (13:58 +0000)]
staging: ccree: fix indentation of var assignment

Fix indentation of var assignment split across lines for
better readability.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: ccree: remove more unnecessary parentheses
Gilad Ben-Yossef [Sun, 3 Dec 2017 13:58:14 +0000 (13:58 +0000)]
staging: ccree: remove more unnecessary parentheses

The removal of likely/unlikely unearthed some more
unnecessary parentheses. Remove them for better readability.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: ccree: remove unproven likely/unlikely
Gilad Ben-Yossef [Sun, 3 Dec 2017 13:58:13 +0000 (13:58 +0000)]
staging: ccree: remove unproven likely/unlikely

The ccree code made a lot of use of likely/unlikely qualifiers without
proven measurements showing any benefits. Remove them all until we
see what is justified and what is not.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: ccree: remove inline qualifiers
Gilad Ben-Yossef [Sun, 3 Dec 2017 13:58:12 +0000 (13:58 +0000)]
staging: ccree: remove inline qualifiers

The ccree drivers was marking a lot of big functions in C file as
static inline for no good reason. Remove the inline qualifier from
any but the few truly single line functions.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: vc04_services: Use __func__
Genki Sky [Wed, 6 Dec 2017 00:09:55 +0000 (19:09 -0500)]
staging: vc04_services: Use __func__

This was found using checkpatch.pl's EMBEDDED_FUNCTION_NAME warning.
It is easier to be consistent and always use __func__ instead of having
to remember to update any hardcoded references to the original name.

Signed-off-by: Genki Sky <sky@genki.is>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: vc04_services: Unsplit user-visible strings
Genki Sky [Wed, 6 Dec 2017 00:09:54 +0000 (19:09 -0500)]
staging: vc04_services: Unsplit user-visible strings

This was found using checkpatch.pl's SPLIT_STRING warning. While joining
these strings makes for long lines, the kernel codebase consistently
does it this way to make user-visible strings easier to grep for.

Signed-off-by: Genki Sky <sky@genki.is>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: vc04_services: Join multiline dereferences
Genki Sky [Wed, 6 Dec 2017 00:09:54 +0000 (19:09 -0500)]
staging: vc04_services: Join multiline dereferences

This was found using checkpatch.pl's MULTILINE_DEREFERENCE warning.
Putting the dereference onto one line makes them easier to read,
especially when part of a larger expression (in this case, function
arguments and ternary operator), and when the dereferences are short
(as they are here).

Signed-off-by: Genki Sky <sky@genki.is>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoMerge tag 'iio-for-4.16a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23...
Greg Kroah-Hartman [Sun, 3 Dec 2017 15:09:13 +0000 (16:09 +0100)]
Merge tag 'iio-for-4.16a' of git://git./linux/kernel/git/jic23/iio into staging-next

Jonathan writes:

First set of new device support, cleanups and features for IIO in the 4.16 cycle

New device support
* IDT Z0PT2201 ambient light and UVB sensor
  - new driver and DT bindings.
* MAX30102 (pulse oximetery sensor)
  - support for MAX30105 sensor (smoke detector)  Just goes to show
    how two supposedly totally different applications can use very similar
    devices.
* UVIS25 UV sensor
  - new driver and DT bindings.

Major new features
* at91-sama5d2-adc
  - DMA support including bindings + a fix for an issue with acking the
    interrupt to prevent false overrun reports.
* ina2xx
  - allow control of shunt voltage PGA and bus voltage range to give better
    accuracy in some cases.
* stm32-adc
  - support differential channels (precursor patch reworked how channel names
    were created to enable this).

Cleanups / minor fixes / features
* core
  - mark a deliberate switch fallthrough.
  - macro to populate struct iio_map array elements.
* docs
  - typo fix.
* MAINTAINERS
  - add some missing entries for IIO ABI files.

* ad7152
  - tidy up unlocking paths.
* ad7746
  - tidy up unlocking paths.
* ak8975
  - add an ACPI id found on a prototype board.
* aspeed-adc
  - deassert reset in probe to ensure device is usable.
* bfin-trigger
  - platform_get_irq return value fixing.
* bmc150
  - OF device ID table for i2c (spi to be done).
* cros_ec
  - unused variable cleanup.
* da208
  - ACPI binding seen on Linx 820 tablet.
* ina2xx
  - shift down raw value to drop status flags from value (likely to have
    been hidden in the noise).
  - tidy up a special case that wasn't needed.
* inv_mpu6050
  - i2c_unregister_device knows about null values so don't check it twice.
* kxsd9
  - fix missing MODULE_LICENSE and MODULE_DESCRIPTION.
* max30102
  - missing new lines in dev_err.
  - inconsistent punctuation in error messages.
  - fix LED mode mask number of bits.
  - check return value of power mode functions to handle errors.
  - introduce an intensity channel macro to reduce duplication.
  - fix minor issue where device wasn't necessarily enabled during
    a get temperature.
  - use indicies for LED channels.
  - move the mode seetting to buffer_postenable - precursor to new device
    support.
  - prepare to allow copying of varying numbers of measurement.
* meson-saradc
  - drop irrelevant clock and update bindings.
* mma8452
  - a couple of renames for readability reasons.
* qcom_vadc
  - fix missing MODULE_LICENSE and MODULE_DESCRIPTION.
* st_accel
  - drop an unused variable.
* sx9500
  - add an ACPI id found on a prototype board.

6 years agoiio: Add macro to populate struct iio_map array
Lukas Wunner [Sat, 25 Nov 2017 08:38:17 +0000 (09:38 +0100)]
iio: Add macro to populate struct iio_map array

The GPIO core provides a handy GPIO_LOOKUP() macro to populate a struct
gpiod_lookup array without having to spell out attribute names (but
still avoid breakage when attributes within the struct are rearranged
or added).

The axp288_adc.c driver uses a similar macro to populate a struct
iio_map array.  Make it available to others.

Cc: Jacob Pan <jacob.jun.pan@linux.intel.com>
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
6 years agoiio: trigger: Fix platform_get_irq's error checking
Arvind Yadav [Thu, 30 Nov 2017 15:43:34 +0000 (21:13 +0530)]
iio: trigger: Fix platform_get_irq's error checking

The platform_get_irq() function returns negative if an error occurs.
zero or positive number on success. platform_get_irq() error checking
for zero is not correct.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
6 years agoiio: accel: bmc150: Add OF device ID table
Javier Martinez Canillas [Fri, 1 Dec 2017 11:10:58 +0000 (12:10 +0100)]
iio: accel: bmc150: Add OF device ID table

The driver doesn't have a struct of_device_id table but supported devices
are registered via Device Trees. This is working on the assumption that a
I2C device registered via OF will always match a legacy I2C device ID and
that the MODALIAS reported will always be of the form i2c:<device>.

But this could change in the future so the correct approach is to have an
OF device ID table if the devices are registered via OF.

The I2C device ID table entries have the .driver_data field set, but they
are not used in the driver so weren't set in the OF device table entries.

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
6 years agodt-bindings: iio: adc: update the doc for SAR ADC
Xingyu Chen [Tue, 7 Nov 2017 14:10:20 +0000 (22:10 +0800)]
dt-bindings: iio: adc: update the doc for SAR ADC

Update the doc as the SAR ADC modules doesn't require "sana" clock.

Singed-off-by: Xingyu Chen <xingyu.chen@amlogic.com>
Signed-off-by: Yixun Lan <yixun.lan@amlogic.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
6 years agoiio: adc: meson-saradc: remove irrelevant clock "sana"
Xingyu Chen [Tue, 7 Nov 2017 14:10:06 +0000 (22:10 +0800)]
iio: adc: meson-saradc: remove irrelevant clock "sana"

The "sana" clock is not used at SAR ADC module in Amlogic Meson SoC,
it is irrelevant for the SAR ADC.

Signed-off-by: Xingyu Chen <xingyu.chen@amlogic.com>
Signed-off-by: Yixun Lan <yixun.lan@amlogic.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
6 years agoiio: accel: st_accel: remove redundant pointer pdata
Colin Ian King [Wed, 22 Nov 2017 14:32:11 +0000 (14:32 +0000)]
iio: accel: st_accel: remove redundant pointer pdata

Pointer pdata is being assigned but it is never being used, hence
it is redundant and can be removed. Cleans up clang warning:

drivers/iio/accel/st_accel_core.c:952:3: warning: Value stored to 'pdata'
is never read

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
6 years agoiio:accel:da280: Linx 820 Windows tablet has a da280 mapped via ACPI
Luke Ross [Thu, 23 Nov 2017 21:34:57 +0000 (21:34 +0000)]
iio:accel:da280: Linx 820 Windows tablet has a da280 mapped via ACPI

This adds an ACPI table to the driver and the ACPI ID of the sensor
on the tablet.

Signed-off-by: Luke Ross <luke@lukeross.name>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
6 years agodt-bindings: iio: light: add UVIS25 device bindings
Lorenzo Bianconi [Thu, 23 Nov 2017 22:59:06 +0000 (23:59 +0100)]
dt-bindings: iio: light: add UVIS25 device bindings

Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
6 years agoiio: light: add support for UVIS25 sensor
Lorenzo Bianconi [Thu, 23 Nov 2017 22:59:05 +0000 (23:59 +0100)]
iio: light: add support for UVIS25 sensor

add support for STMicroelectronics UVIS25 uv sensor
http://www.st.com/resource/en/datasheet/uvis25.pdf

- continuos mode support
- i2c support
- spi support
- trigger mode support
- system PM support

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
6 years agoMAINTAINERS: Add missing IIO ABI entries
Lukas Wunner [Sat, 25 Nov 2017 09:27:19 +0000 (10:27 +0100)]
MAINTAINERS: Add missing IIO ABI entries

Cc: Lars-Peter Clausen <lars@metafoo.de>
Cc: Michael Hennerich <Michael.Hennerich@analog.com>
Cc: Andreas Klinger <ak@it-klinger.de>
Cc: Hartmut Knaack <knaack.h@gmx.de>
Cc: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
6 years agoiio: adc: aspeed: Deassert reset in probe
Joel Stanley [Tue, 31 Oct 2017 02:12:03 +0000 (12:42 +1030)]
iio: adc: aspeed: Deassert reset in probe

The ASPEED SoC must deassert a reset in order to use the ADC peripheral.

The device tree bindings are updated to document the resets phandle, and
the example is updated to match what is expected for both the reset and
clock phandle. Note that the bindings should have always had the reset
controller, as the hardware is unusable without it.

Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
6 years agodt-bindings: iio: health: Add MAX30105 support to max30102.txt
Peter Meerwald-Stadler [Fri, 27 Oct 2017 19:45:43 +0000 (21:45 +0200)]
dt-bindings: iio: health: Add MAX30105 support to max30102.txt

Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
Acked-by: Matt Ranostay <matt.ranostay@konsulko.com>
Cc: Rob Herring <robh+dt@kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
6 years agoiio: health: max30102: Add MAX30105 support
Peter Meerwald-Stadler [Fri, 27 Oct 2017 19:45:42 +0000 (21:45 +0200)]
iio: health: max30102: Add MAX30105 support

The Maxim MAX30105 part adds a third LED (green) and uses a multi-LED
measuring mode producing three measurements

Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
Acked-by: Matt Ranostay <matt.ranostay@konsulko.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
6 years agoiio: health: max30102: Prepare for copying varying number of measurements
Peter Meerwald-Stadler [Fri, 27 Oct 2017 19:45:41 +0000 (21:45 +0200)]
iio: health: max30102: Prepare for copying varying number of measurements

Current code assumes always 2 measurements (6 bytes) have to be copied,
prepare for more flexibility

Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
Acked-by: Matt Ranostay <matt.ranostay@konsulko.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
6 years agoiio: health: max30102: Move mode setting to buffer_postenable
Peter Meerwald-Stadler [Fri, 27 Oct 2017 19:45:40 +0000 (21:45 +0200)]
iio: health: max30102: Move mode setting to buffer_postenable

Move the programming of the mode setting from init() to
buffer_postenable()

Split out a separate function to
only update the power/shutdown bit

This changes permits to more easily implement different
modes of measurements in further patches

Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
Acked-by: Matt Ranostay <matt.ranostay@konsulko.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
6 years agoiio: health: max30102: Introduce indices for LED channels
Peter Meerwald-Stadler [Fri, 27 Oct 2017 19:45:39 +0000 (21:45 +0200)]
iio: health: max30102: Introduce indices for LED channels

Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
Acked-by: Matt Ranostay <matt.ranostay@konsulko.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
6 years agoiio: health: max30102: Add power enable parameter to get_temp function
Peter Meerwald-Stadler [Fri, 27 Oct 2017 19:45:38 +0000 (21:45 +0200)]
iio: health: max30102: Add power enable parameter to get_temp function

Chip must not be in shutdown for reading temperature, so briefly leave
shutdown if buffer is not already running

Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
Acked-by: Matt Ranostay <matt.ranostay@konsulko.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
6 years agoiio: health: max30102: Introduce intensity channel macro
Peter Meerwald-Stadler [Fri, 27 Oct 2017 19:45:37 +0000 (21:45 +0200)]
iio: health: max30102: Introduce intensity channel macro

Signed-off-by: Peter Meerwald-Stalder <pmeerw@pmeerw.net>
Acked-by: Matt Ranostay <matt.ranostay@konsulko.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
6 years agoiio: health: max30102: Add check for part ID
Peter Meerwald-Stadler [Fri, 27 Oct 2017 19:45:36 +0000 (21:45 +0200)]
iio: health: max30102: Add check for part ID

Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
Acked-by: Matt Ranostay <matt.ranostay@konsulko.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
6 years agoiio: health: max30102: Check retval of powermode function
Peter Meerwald-Stadler [Fri, 27 Oct 2017 19:45:35 +0000 (21:45 +0200)]
iio: health: max30102: Check retval of powermode function

Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
Acked-by: Matt Ranostay <matt.ranostay@konsulko.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
6 years agoiio: health: max30102: Fix mode config values
Peter Meerwald-Stadler [Fri, 27 Oct 2017 19:45:34 +0000 (21:45 +0200)]
iio: health: max30102: Fix mode config values

Table 4 of the datasheet specifies the mode control, these are not
individual bits; add multi LED mode

Add multi-LED mode and fix MODE_MASK (3 bits wide, not 2)

Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
Acked-by: Matt Ranostay <matt.ranostay@konsulko.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
6 years agoiio: health: max30102: Remove inconsistent full stop in error message
Peter Meerwald-Stadler [Fri, 27 Oct 2017 19:45:33 +0000 (21:45 +0200)]
iio: health: max30102: Remove inconsistent full stop in error message

Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
Acked-by: Matt Ranostay <matt.ranostay@konsulko.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
6 years agoiio: health: max30102: Fix missing newline in dev_err
Peter Meerwald-Stadler [Fri, 27 Oct 2017 19:45:32 +0000 (21:45 +0200)]
iio: health: max30102: Fix missing newline in dev_err

Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
Acked-by: Matt Ranostay <matt.ranostay@konsulko.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
6 years agoiio: adc: stm32: add support for differential channels
Fabrice Gasnier [Wed, 25 Oct 2017 09:27:45 +0000 (11:27 +0200)]
iio: adc: stm32: add support for differential channels

STM32H7 ADC channels can be configured either as single ended or
differential with 'st,adc-channels' or 'st,adc-diff-channels'
(positive and negative input pair: <vinp vinn>, ...).

Differential channels have different offset and scale, from spec:
raw value = (full_scale / 2) * (1 + (vinp - vinn) / vref).
Add offset attribute.

Differential channels are selected by DIFSEL register. Negative
inputs must be added to pre-selected channels as well (PCSEL).

Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
6 years agoiio: adc: stm32: remove const channel names definition
Fabrice Gasnier [Wed, 25 Oct 2017 09:27:44 +0000 (11:27 +0200)]
iio: adc: stm32: remove const channel names definition

Remove const array that defines channels. Build channels definition
at probe time, when initializing channels (only for requested ones).
This will ease adding differential channels support.

Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
6 years agodt-bindings: iio: adc: stm32: add support for diff channels
Fabrice Gasnier [Wed, 25 Oct 2017 09:27:43 +0000 (11:27 +0200)]
dt-bindings: iio: adc: stm32: add support for diff channels

STM32H7 ADC channels may be configured either as single-ended or
differential.
Add 'st,adc-diff-channels' property to support differential channels.
Differential channels are defined as a pair of positive and negative
inputs: vinp & vinn.

Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
6 years agoiio: adc: ina2xx: Allow setting Shunt Voltage PGA gain and Bus Voltage range
Stefan Brüns [Sat, 28 Oct 2017 21:12:48 +0000 (23:12 +0200)]
iio: adc: ina2xx: Allow setting Shunt Voltage PGA gain and Bus Voltage range

Reducing shunt and bus voltage range improves the accuracy, so allow
altering the default settings.

Both settings are exposed as gain values. While for the shunt voltage
this is straightforward, the bus range settings of 32V (default) and 16V
are mapped to gain values of 1 resp. 2, to provide a uniform API to
userspace.

As the gain settings are incorporated into the raw values by the sensor
itself, adjusting of the scale attributes is not necessary.

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
6 years agoiio: adc: ina2xx: Use LSB specifier instead of divider in config
Stefan Brüns [Sat, 28 Oct 2017 21:12:47 +0000 (23:12 +0200)]
iio: adc: ina2xx: Use LSB specifier instead of divider in config

While the config uses the physical value corresponding to the LSB
for both the power and the bus voltage register, the shunt voltage is
specified as parts of 1 mV. Use the LSB physical value for all registers.

No functional change.

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
6 years agoiio: adc: ina2xx: Shift bus voltage register to mask flag bits
Stefan Brüns [Sat, 28 Oct 2017 21:12:46 +0000 (23:12 +0200)]
iio: adc: ina2xx: Shift bus voltage register to mask flag bits

Lower bits of the INA219/220 bus voltage register are conversion
status flags, properly shift the value.

When reading via IIO buffer, the value is passed on unaltered,
shifting is the responsibility of the user.

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
6 years agoiio: imu: inv_mpu6050: Remove duplicate NULL check
Andy Shevchenko [Tue, 31 Oct 2017 14:21:47 +0000 (16:21 +0200)]
iio: imu: inv_mpu6050: Remove duplicate NULL check

Since i2c_unregister_device() became NULL-aware we may remove duplicate
NULL check.

Cc: Jonathan Cameron <jic23@kernel.org>
Cc: Hartmut Knaack <knaack.h@gmx.de>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Cc: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
Cc: linux-iio@vger.kernel.org
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
6 years agostaging: iio: ad7746: Improve unlocking of a mutex in ad7746_start_calib()
Markus Elfring [Fri, 3 Nov 2017 08:26:28 +0000 (09:26 +0100)]
staging: iio: ad7746: Improve unlocking of a mutex in ad7746_start_calib()

* Add a jump target so that a call of the function "mutex_unlock" is stored
  only twice in this function implementation.

* Replace two calls by goto statements.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
6 years agostaging: iio: ad7152: Improve unlocking of a mutex in ad7152_start_calib()
Markus Elfring [Fri, 3 Nov 2017 08:00:25 +0000 (09:00 +0100)]
staging: iio: ad7152: Improve unlocking of a mutex in ad7152_start_calib()

* Add a jump target so that a call of the function "mutex_unlock" is stored
  only twice in this function implementation.

* Replace two calls by goto statements.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
6 years agoiio: magnetometer: ak8975: Add another ACPI ID
Andy Shevchenko [Fri, 3 Nov 2017 13:03:40 +0000 (15:03 +0200)]
iio: magnetometer: ak8975: Add another ACPI ID

Add new ACPI ID for ak9911 as had been found on prototype board.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
6 years agoiio: proximity: sx9500: Add another ACPI ID
Andy Shevchenko [Fri, 3 Nov 2017 13:03:39 +0000 (15:03 +0200)]
iio: proximity: sx9500: Add another ACPI ID

Add new ACPI ID for sx9500 as had been found on prototype board.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
6 years agoiio: accel: mma8452: Rename config structs for readability
Harinath Nampally [Sun, 5 Nov 2017 18:00:03 +0000 (13:00 -0500)]
iio: accel: mma8452: Rename config structs for readability

Rename structs holding event configuration registers
to more appropriate names. This naming is consistent
with the event config register names given in the
mma845x and fxls8471 datasheets.

Signed-off-by: Harinath Nampally <harinath922@gmail.com>
Acked-by: Martin Kepplinger <martink@posteo.de>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
6 years agoiio: accel: mma8452: Rename a struct for code readibility
Harinath Nampally [Sun, 5 Nov 2017 18:00:02 +0000 (13:00 -0500)]
iio: accel: mma8452: Rename a struct for code readibility

Rename time step look up struct to generic name
as the values in the look table are same for all
the other events like pulse, transient etc.

Signed-off-by: Harinath Nampally <harinath922@gmail.com>
Acked-by: Martin Kepplinger <martink@posteo.de>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
6 years agoDocumentation: iio: Fix typo
Peter Meerwald-Stadler [Sun, 5 Nov 2017 23:25:00 +0000 (00:25 +0100)]
Documentation: iio: Fix typo

Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
6 years agoiio: light: Add driver for IDT ZOPT2201 ambient light and UVB sensor
Peter Meerwald-Stadler [Sun, 5 Nov 2017 23:24:59 +0000 (00:24 +0100)]
iio: light: Add driver for IDT ZOPT2201 ambient light and UVB sensor

Driver for 20-bit ALS and UV B sensor with I2C interface exposing
the following API:
  in_uvindex_input
  in_illuminance_raw
  in_illuminance_scale
  in_illuminance_scale_available
  in_intensity_uv_raw
  in_intensity_uv_scale
  in_intensity_uv_scale_available
  integration_time
  integration_time_available

Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
6 years agoiio: core: Mark expected switch fall-through
Gustavo A. R. Silva [Wed, 8 Nov 2017 18:08:26 +0000 (12:08 -0600)]
iio: core: Mark expected switch fall-through

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

Addresses-Coverity-ID: 1397962
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
6 years agoiio: cros_ec: Remove unused variables
Paolo Cretaro [Sun, 19 Nov 2017 00:57:45 +0000 (01:57 +0100)]
iio: cros_ec: Remove unused variables

Fix gcc warnings about variable 'ec_device' being set but not used
in these files:
common/cros_ec_sensors/cros_ec_sensors.c:194:25
light/cros_ec_light_prox.c:184:25

Signed-off-by: Paolo Cretaro <paolocretaro@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
6 years agoiio: adc: at91-sama5d2_adc: ack DRDY irq in direct mode
Eugen Hristev [Wed, 15 Nov 2017 12:56:48 +0000 (14:56 +0200)]
iio: adc: at91-sama5d2_adc: ack DRDY irq in direct mode

Need to acknowledge DRDY irq in direct mode/ software
triggered mode. Otherwise, on the next conversion, overrun
flag will be raised, which is not a correct state.
This doesn't affect the functionality, but will generate
possible incorrect overrun reports.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
6 years agoiio: adc: at91-sama5d2_adc: add support for DMA
Eugen Hristev [Wed, 15 Nov 2017 12:56:47 +0000 (14:56 +0200)]
iio: adc: at91-sama5d2_adc: add support for DMA

Added support for DMA transfers. The implementation uses the user watermark
to decide whether DMA will be used or not. For watermark 1, DMA will not be
used. If watermark is bigger, DMA will be used.
Sysfs attributes are created to indicate whether the DMA is used,
with hwfifo_enabled, and the current DMA watermark is readable
in hwfifo_watermark. Minimum and maximum values are in hwfifo_watermark_min
and hwfifo_watermark_max.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
6 years agodt-bindings: iio: at91-sama5d2_adc: add optional dma property
Eugen Hristev [Wed, 15 Nov 2017 12:56:45 +0000 (14:56 +0200)]
dt-bindings: iio: at91-sama5d2_adc: add optional dma property

Added property for DMA configuration of the device.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
6 years agoiio: adc/accel: Fix up module licenses
Linus Walleij [Mon, 13 Nov 2017 10:29:55 +0000 (11:29 +0100)]
iio: adc/accel: Fix up module licenses

The module license checker complains about these two so just fix
it up. They are both GPLv2, both written by me or using code
I extracted while refactoring from the GPLv2 drivers.

Cc: Randy Dunlap <rdunlap@infradead.org>
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
6 years agostaging: ipx: depends on NET
Randy Dunlap [Thu, 30 Nov 2017 17:00:03 +0000 (09:00 -0800)]
staging: ipx: depends on NET

IPX depends on NET, so add that to the Kconfig file.

Fixes Kconfig warning and build errors:

warning: (IPX) selects LLC which has unmet direct dependencies (NET)
and 94 "undefined reference" build errors.

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: ion: reorder include
Benjamin Gaignard [Mon, 6 Nov 2017 15:59:44 +0000 (16:59 +0100)]
staging: ion: reorder include

Put include in alphabetic order

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Acked-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: ccree: Remove a attribute group from a kobject
Arvind Yadav [Sat, 25 Nov 2017 06:39:28 +0000 (12:09 +0530)]
staging: ccree: Remove a attribute group from a kobject

All attribute group created during sys_init_dir() should be removed
in sys_free_dir()

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: visorbus: address theoretical int overflows
Tim Sell [Fri, 17 Nov 2017 17:27:38 +0000 (12:27 -0500)]
staging: unisys: visorbus: address theoretical int overflows

Add necessary casting to several places where we were doing 32-bit
arithmetic (unsigned) to produce a 64-bit (unsigned long) result, to
prevent the theoretical possibility of a 32-bit overflow during the
arithmetic.

FYI, these are unsigned long:

ctx->param_bytes
ctx->allocbytes

These are unsigned int:

bytes
phdr->name_offset
phdr->name_length

Here is the test program demonstrating why we really need the casts:

void main()
{
unsigned int i;
unsigned long il;

printf("sizeof(int) =%dn",sizeof(i));
printf("sizeof(long)=%dn",sizeof(il));

i = (unsigned int)((((unsigned long)(1)) << 32) - 1);
printf("i                     = %un", i);
il = i+1;
printf("adding 1 withOUT cast = %lun", il);
il = (unsigned long)i+1;
printf("adding 1 WITH    cast = %lun", il);
}
[selltc@mac tmp]$ gcc x.c -o x.out
[selltc@mac tmp]$ ./x.out
sizeof(int) =4
sizeof(long)=8
i                     = 4294967295
adding 1 withOUT cast = 0
adding 1 WITH    cast = 4294967296

Signed-off-by: Tim Sell <Timothy.Sell@unisys.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: David Binder <david.binder@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rts5208: remove rtsx_read_pci_cfg_byte()
Sinan Kaya [Mon, 27 Nov 2017 16:58:00 +0000 (11:58 -0500)]
staging: rts5208: remove rtsx_read_pci_cfg_byte()

Remove unused rtsx_read_pci_cfg_byte() function.

Signed-off-by: Sinan Kaya <okaya@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging/irda/net: Drop extraneous parentheses around test
Kees Cook [Wed, 22 Nov 2017 20:57:25 +0000 (12:57 -0800)]
staging/irda/net: Drop extraneous parentheses around test

Noticed during Clang builds. This drops the redundant parentheses.

Cc: Samuel Ortiz <samuel@sortiz.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: devel@driverdev.osuosl.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8822be: fix missing null check on dev_alloc_skb return
Colin Ian King [Fri, 17 Nov 2017 14:50:55 +0000 (14:50 +0000)]
staging: rtl8822be: fix missing null check on dev_alloc_skb return

dev_alloc_skb can potentially return NULL, so add a null check to
avoid a null pointer dereference on skb

Detected by CoverityScan, CID#1454558 ("Dereference on null return")

Fixes: 7e5b796cde7e ("staging: r8822be: Add the driver code")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: Fix line over 80 characters
Talat Batheesh [Mon, 27 Nov 2017 13:36:58 +0000 (15:36 +0200)]
staging: lustre: Fix line over 80 characters

This patch fix the line over 80 characters warning that was detected
using checkpatch.pl script.

Signed-off-by: Talat Batheesh <talat.b87@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: obdclass: Remove a attribute group from a kobject
Arvind Yadav [Sat, 25 Nov 2017 06:39:30 +0000 (12:09 +0530)]
staging: lustre: obdclass: Remove a attribute group from a kobject

All attribute group created during class_procfs_init() should be
removed.
if class_procfs_init() will fail and also in class_procfs_clean().

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: ldlm: Remove a attribute group from a kobject
Arvind Yadav [Sat, 25 Nov 2017 06:39:29 +0000 (12:09 +0530)]
staging: lustre: ldlm: Remove a attribute group from a kobject

All attribute group created during ldlm_setup() should be removed
in ldlm_cleanup().

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: pi433: pi433_if.c codestyle fix
Oliver Graute [Sun, 26 Nov 2017 20:07:10 +0000 (21:07 +0100)]
staging: pi433: pi433_if.c codestyle fix

This patch fixes the following checkpatch.pl error:

ERROR: spaces required around that '>=' (ctx:VxV)
#930: FILE: pi433_if.c:930:
+ for (i--; i>=0; i--)

ERROR: spaces required around that '=' (ctx:VxV)
#970: FILE: pi433_if.c:970:
+ for (i=0; i<NUM_DIO; i++)

Signed-off-by: Oliver Graute <oliver.graute@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: pi433: pi433_if.c fix codestyle on two long lines
Oliver Graute [Mon, 27 Nov 2017 17:34:01 +0000 (18:34 +0100)]
staging: pi433: pi433_if.c fix codestyle on two long lines

This patch fixes the following checkpatch.pl warning:

WARNING: line over 80 characters
#1233: FILE: pi433_if.c:1233:
+               unregister_chrdev(MAJOR(pi433_dev), pi433_spi_driver.driver.name);

WARNING: line over 80 characters
#1240: FILE: pi433_if.c:1240:
+               unregister_chrdev(MAJOR(pi433_dev), pi433_spi_driver.driver.name);

Signed-off-by: Oliver Graute <oliver.graute@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: pi433: fix naming when more than one radio is used
Marcin Ciupak [Mon, 20 Nov 2017 23:05:50 +0000 (00:05 +0100)]
staging: pi433: fix naming when more than one radio is used

When using more than one hardware radio module pi433_probe fails as the
same name is used for all modules. Create unique name by adding minor
number to the device name.

Signed-off-by: Marcin Ciupak <marcin.s.ciupak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: pi433: fix (NULL device *) in log message
Marcin Ciupak [Mon, 20 Nov 2017 23:03:57 +0000 (00:03 +0100)]
staging: pi433: fix (NULL device *) in log message

(NULL device *) is printed in log message in pi433_probe and
pi433_get_minor functions due to device->dev being used prior to call to
device_create function.

Signed-off-by: Marcin Ciupak <marcin.s.ciupak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: pi433: fixed signedness of 4th argument to kfifo_from_user
Stefano Manni [Thu, 16 Nov 2017 19:45:26 +0000 (20:45 +0100)]
staging: pi433: fixed signedness of 4th argument to kfifo_from_user

sparse warning:
incorrect type in initializer (different signedness)
expected unsigned int *__copied, got int *<noident>

Signed-off-by: Stefano Manni <stefano.manni@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: pi433: Fixed coding style issues with braces
Luca Söthe [Sun, 12 Nov 2017 17:59:11 +0000 (18:59 +0100)]
staging: pi433: Fixed coding style issues with braces

Removed a few new lines after enum and struct names
because of the following bracket.

Signed-off-by: Luca Söthe <luca@acul.me>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8712: remove redundant zero assignment to val32
Colin Ian King [Tue, 7 Nov 2017 19:48:36 +0000 (19:48 +0000)]
staging: rtl8712: remove redundant zero assignment to val32

Variable val32 is being assigned a zero value that is never read
since val32 is being updated immediately afterwards.  Remove this
redundant assignment, cleans up clang warning:

drivers/staging/rtl8712/hal_init.c:339:2: warning: Value stored
to 'val32' is never read

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: fsl-mc: use 32bits to support 64K size mc-portals
Bharat Bhushan [Wed, 22 Nov 2017 07:48:43 +0000 (13:18 +0530)]
staging: fsl-mc: use 32bits to support 64K size mc-portals

As per APIs each mc-portal is of 64K size while currently
16bits (type u16) is used to store size of mc-portal.
In these cases upper bit of portal size gets truncated.

Signed-off-by: Bharat Bhushan <Bharat.Bhushan@nxp.com>
Acked-By: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoncpfs: move net/ncpfs to drivers/staging/ncpfs
Stephen Hemminger [Tue, 14 Nov 2017 16:37:15 +0000 (08:37 -0800)]
ncpfs: move net/ncpfs to drivers/staging/ncpfs

The Netware Core Protocol is a file system that talks to
Netware clients over IPX. Since IPX has been dead for many years
move the file system into staging for eventual interment.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoipx: move Novell IPX protocol support into staging
Stephen Hemminger [Tue, 14 Nov 2017 16:37:14 +0000 (08:37 -0800)]
ipx: move Novell IPX protocol support into staging

The Netware IPX protocol is very old and no one should still be using
it. It is time to move it into staging for a while and eventually
decommision it.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging/sm750fb: Add "port to atomic kms" to TODO
Daniel Vetter [Tue, 28 Nov 2017 11:47:20 +0000 (12:47 +0100)]
staging/sm750fb: Add "port to atomic kms" to TODO

fbdev is closed for new drivers, drm won't take anything but atomic
drivers.

Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Cc: Teddy Wang <teddy.wang@siliconmotion.com>
Cc: Sudip Mukherjee <sudip@vectorindia.org>
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: imx: use ktime_t for timestamps
Arnd Bergmann [Mon, 27 Nov 2017 13:20:00 +0000 (14:20 +0100)]
staging: imx: use ktime_t for timestamps

The imx media driver passes around monotonic timestamps in the deprecated
'timespec' format. This is not a problem for the driver, as they won't
overflow, but moving to either timespec64 or ktime_t is preferred.

I'm picking ktime_t for simplicity here. frame_interval_monitor() is
the main function that changes, as it tries to compare a time interval
in microseconds. The algorithm slightly changes here, to avoid 64-bit
division. The code previously assumed that the error was at most 32-bit
worth of microseconds here, so I'm making the same assumption but add
an explicit test for it.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: bcm2835-camera use ktime_t for timestamps
Arnd Bergmann [Mon, 27 Nov 2017 13:19:56 +0000 (14:19 +0100)]
staging: bcm2835-camera use ktime_t for timestamps

struct timeval is deprecated for in-kernel use, and converting
this function to use ktime_t makes it simpler as well.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: most: make DEVICE_ATTR structures static
Christian Gromm [Mon, 27 Nov 2017 14:20:06 +0000 (15:20 +0100)]
staging: most: make DEVICE_ATTR structures static

In order to limit the scope of the DEVICE_ATTR structure this patch
adds the keywork static.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: most: remove legacy folders
Christian Gromm [Mon, 27 Nov 2017 14:20:05 +0000 (15:20 +0100)]
staging: most: remove legacy folders

This patch removes the legacy folders of the modules. It is needed
to clean up the driver's source tree.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: most: fix Makefile
Christian Gromm [Mon, 27 Nov 2017 14:20:04 +0000 (15:20 +0100)]
staging: most: fix Makefile

This patch fixes the names of the CONFIG symbols and the subfolders make
is supposed to enter in order to build the selected modules.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: android: Remove redundant license text
Greg Kroah-Hartman [Tue, 7 Nov 2017 20:07:57 +0000 (21:07 +0100)]
staging: android: Remove redundant license text

Now that the SPDX tag is in all android files, that identifies the
license in a specific and legally-defined manner.  So the extra GPL text
wording can be removed as it is no longer needed at all.

This is done on a quest to remove the 700+ different ways that files in
the kernel describe the GPL license text.  And there's unneeded stuff
like the address (sometimes incorrect) for the FSF which is never
needed.

No copyright headers or other non-license-description text was removed.

Cc: "Arve Hjønnevåg" <arve@android.com>
Cc: Riley Andrews <riandrews@android.com>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Acked-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: vt6655: Remove redundant license text
Greg Kroah-Hartman [Tue, 7 Nov 2017 20:07:56 +0000 (21:07 +0100)]
staging: vt6655: Remove redundant license text

Now that the SPDX tag is in all vt6655 files, that identifies the
license in a specific and legally-defined manner.  So the extra GPL text
wording can be removed as it is no longer needed at all.

This is done on a quest to remove the 700+ different ways that files in
the kernel describe the GPL license text.  And there's unneeded stuff
like the address (sometimes incorrect) for the FSF which is never
needed.

No copyright headers or other non-license-description text was removed.

Cc: Forest Bond <forest@alittletooquiet.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: vt6656: Remove redundant license text
Greg Kroah-Hartman [Tue, 7 Nov 2017 20:07:55 +0000 (21:07 +0100)]
staging: vt6656: Remove redundant license text

Now that the SPDX tag is in all vt6656 files, that identifies the
license in a specific and legally-defined manner.  So the extra GPL text
wording can be removed as it is no longer needed at all.

This is done on a quest to remove the 700+ different ways that files in
the kernel describe the GPL license text.  And there's unneeded stuff
like the address (sometimes incorrect) for the FSF which is never
needed.

No copyright headers or other non-license-description text was removed.

Cc: Forest Bond <forest@alittletooquiet.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: android: add SPDX identifiers to all android driver files
Greg Kroah-Hartman [Tue, 7 Nov 2017 20:07:54 +0000 (21:07 +0100)]
staging: android: add SPDX identifiers to all android driver files

It's good to have SPDX identifiers in all files to make it easier to
audit the kernel tree for correct licenses.

Update the android driver files with the correct SPDX license identifier
based on the license text in the file itself.  The SPDX identifier is a
legally binding shorthand, which can be used instead of the full boiler
plate text.

This work is based on a script and data from Thomas Gleixner, Philippe
Ombredanne, and Kate Stewart.

Cc: "Arve Hjønnevåg" <arve@android.com>
Cc: Riley Andrews <riandrews@android.com>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Kate Stewart <kstewart@linuxfoundation.org>
Cc: Philippe Ombredanne <pombredanne@nexb.com>
Acked-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: vt6655: add SPDX identifiers to all vt6655 driver files
Greg Kroah-Hartman [Tue, 7 Nov 2017 20:07:53 +0000 (21:07 +0100)]
staging: vt6655: add SPDX identifiers to all vt6655 driver files

It's good to have SPDX identifiers in all files to make it easier to
audit the kernel tree for correct licenses.

Update the vt6655 driver files with the correct SPDX license identifier
based on the license text in the file itself.  The SPDX identifier is a
legally binding shorthand, which can be used instead of the full boiler
plate text.

This work is based on a script and data from Thomas Gleixner, Philippe
Ombredanne, and Kate Stewart.

Cc: Forest Bond <forest@alittletooquiet.net>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Kate Stewart <kstewart@linuxfoundation.org>
Cc: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: vt6656: add SPDX identifiers to all vt6656 driver files
Greg Kroah-Hartman [Tue, 7 Nov 2017 20:07:52 +0000 (21:07 +0100)]
staging: vt6656: add SPDX identifiers to all vt6656 driver files

It's good to have SPDX identifiers in all files to make it easier to
audit the kernel tree for correct licenses.

Update the vt6656 driver files with the correct SPDX license identifier
based on the license text in the file itself.  The SPDX identifier is a
legally binding shorthand, which can be used instead of the full boiler
plate text.

This work is based on a script and data from Thomas Gleixner, Philippe
Ombredanne, and Kate Stewart.

Cc: Forest Bond <forest@alittletooquiet.net>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Kate Stewart <kstewart@linuxfoundation.org>
Cc: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wlan-ng: add SPDX identifiers to all wlan-ng driver files
Greg Kroah-Hartman [Tue, 7 Nov 2017 20:07:51 +0000 (21:07 +0100)]
staging: wlan-ng: add SPDX identifiers to all wlan-ng driver files

It's good to have SPDX identifiers in all files to make it easier to
audit the kernel tree for correct licenses.

Update the wlan-ng driver files with the correct SPDX license identifier
based on the license text in the file itself.  The SPDX identifier is a
legally binding shorthand, which can be used instead of the full boiler
plate text.

This work is based on a script and data from Thomas Gleixner, Philippe
Ombredanne, and Kate Stewart.

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Kate Stewart <kstewart@linuxfoundation.org>
Cc: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: add SPDX identifiers to all wilc100 files
Greg Kroah-Hartman [Tue, 7 Nov 2017 20:07:50 +0000 (21:07 +0100)]
staging: wilc1000: add SPDX identifiers to all wilc100 files

It's good to have SPDX identifiers in all files to make it easier to
audit the kernel tree for correct licenses.

Update the wilc100 driver files with the correct SPDX license identifier
based on the license text in the file itself.  The SPDX identifier is a
legally binding shorthand, which can be used instead of the full boiler
plate text.

This work is based on a script and data from Thomas Gleixner, Philippe
Ombredanne, and Kate Stewart.

Cc: Ganesh Krishna <ganesh.krishna@microchip.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Kate Stewart <kstewart@linuxfoundation.org>
Cc: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Aditya Shankar <aditya.shankar@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: xgifb: add SPDX identifiers to the remaining holdout file
Greg Kroah-Hartman [Tue, 7 Nov 2017 20:07:49 +0000 (21:07 +0100)]
staging: xgifb: add SPDX identifiers to the remaining holdout file

It's good to have SPDX identifiers in all files to make it easier to
audit the kernel tree for correct licenses.

Update the xgifb/XGI_main_26.c file with the correct SPDX license
identifier based on the license text in the file itself.  The SPDX
identifier is a legally binding shorthand, which can be used instead of
the full boiler plate text.

This work is based on a script and data from Thomas Gleixner, Philippe
Ombredanne, and Kate Stewart.

Cc: Arnaud Patard <arnaud.patard@rtp-net.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Kate Stewart <kstewart@linuxfoundation.org>
Cc: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: Remove redundant license text
Greg Kroah-Hartman [Tue, 7 Nov 2017 13:58:49 +0000 (14:58 +0100)]
staging: unisys: Remove redundant license text

Now that the SPDX tag is in all unisys driver files, that identifies the
license in a specific and legally-defined manner.  So the extra GPL text
wording can be removed as it is no longer needed at all.

This is done on a quest to remove the 700+ different ways that files in
the kernel describe the GPL license text.  And there's unneeded stuff
like the address (sometimes incorrect) for the FSF which is never
needed.

No copyright headers or other non-license-description text was removed.

Cc: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: fix up some SPDX tags
Greg Kroah-Hartman [Tue, 7 Nov 2017 13:58:48 +0000 (14:58 +0100)]
staging: unisys: fix up some SPDX tags

One .h file was missing a SPDX tag, and another one was wrong after
looking at the text of the license itself, so fix both of these issues
up at the same time.

Cc: David Kershner <david.kershner@unisys.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Kate Stewart <kstewart@linuxfoundation.org>
Cc: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>