platform/kernel/linux-starfive.git
3 years agostaging: emxx_udc: Remove misplaced debugging aid
Mikhail Gusarov [Fri, 11 Sep 2020 21:33:51 +0000 (23:33 +0200)]
staging: emxx_udc: Remove misplaced debugging aid

emxx_udc.h contained a #if 0 block with debugging macros. These should
be supplied via command line or Kconfig.

Fixes checkstyle's
WARNING: Consider removing the code enclosed by this #if 0 and its #endif

Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Link: https://lore.kernel.org/r/20200911213350.15914-1-dottedmag@dottedmag.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: vt6655: Add spaces around arithmetic operators
Sebastian Fuentes [Sat, 12 Sep 2020 05:23:57 +0000 (22:23 -0700)]
staging: vt6655: Add spaces around arithmetic operators

This addresses the checkpatch.pl warning "spaces preferred around that
'+/-/*'"

Signed-off-by: Sebastian Fuentes <sefu1789@gmail.com>
Link: https://lore.kernel.org/r/20200912052357.GA4707@ubuntu
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rts5208: rtsx_transport.c: Fix lines ending with parentheses
Sebastian Fuentes [Sat, 12 Sep 2020 06:07:41 +0000 (23:07 -0700)]
staging: rts5208: rtsx_transport.c: Fix lines ending with parentheses

Addresses checkpatch.pl check "Lines should not end with '('"

Signed-off-by: Sebastian Fuentes <sefu1789@gmail.com>
Link: https://lore.kernel.org/r/20200912060741.GA6274@ubuntu
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: fwserial: Remove repeated word and
Abheek Dhawan [Sat, 12 Sep 2020 06:41:23 +0000 (01:41 -0500)]
staging: fwserial: Remove repeated word and

Remove unnecessary repeated word and

Signed-off-by: Abheek Dhawan <adawesomeguy222@gmail.com>
Link: https://lore.kernel.org/r/20200912064123.411656-1-adawesomeguy222@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agodrivers: most: add character device interface driver
Christian Gromm [Thu, 20 Aug 2020 11:23:15 +0000 (13:23 +0200)]
drivers: most: add character device interface driver

This patch adds the character device (cdev) driver source file
most_cdev.c and modifies the Makefiles and Kconfigs accordingly.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Link: https://lore.kernel.org/r/1597922595-27493-1-git-send-email-christian.gromm@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: wlan-ng: Remove repeated word our
Abheek Dhawan [Sat, 5 Sep 2020 05:34:14 +0000 (00:34 -0500)]
staging: wlan-ng: Remove repeated word our

Removed unnecessary repeater word on line 274

Signed-off-by: Abheek Dhawan <adawesomeguy222@gmail.com>
Link: https://lore.kernel.org/r/20200905053414.405674-1-adawesomeguy222@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8188eu: clean up whitespace in wpa_set_encryption()
Michael Straube [Sat, 5 Sep 2020 11:53:58 +0000 (13:53 +0200)]
staging: rtl8188eu: clean up whitespace in wpa_set_encryption()

Clean up unnecessary whitespace in wpa_set_encryption() by removing
extra spaces and replacing tabs with spaces. Clears a checkpatch error.

ERROR: space prohibited before that close parenthesis ')'

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20200905115358.10278-1-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: r8188eu: replace enum rtw_ieee80211_spectrum_mgmt_actioncode with ieee80211_...
Ivan Safonov [Sun, 6 Sep 2020 13:32:37 +0000 (16:32 +0300)]
staging: r8188eu: replace enum rtw_ieee80211_spectrum_mgmt_actioncode with ieee80211_spectrum_mgmt_actioncode

Enum rtw_ieee80211_spectrum_mgmt_actioncode is a duplication
of ieee80211_spectrum_mgmt_actioncode from include/linux/ieee80211.h.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Link: https://lore.kernel.org/r/20200906133236.556427-1-insafonov@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agoMerge tag 'iio-for-5.10a-take2' of https://git.kernel.org/pub/scm/linux/kernel/git...
Greg Kroah-Hartman [Sun, 6 Sep 2020 15:47:45 +0000 (17:47 +0200)]
Merge tag 'iio-for-5.10a-take2' of https://git./linux/kernel/git/jic23/iio into staging-next

Jonathan writes:

First set of new device support, features and cleanup for IIO in 5.10 cycle, take 2

A few changes to how I write this cover letter.
* Started to use manufacturer prefixes to group changes better.
* Stop list minor formatting etc changes.
* Whilst I appreciate those changes, we don't need to call them out here.

New device support:
* adi,adxrs290
  - New driver for this gyroscope with dt bindings. One fix follows.
* ams,as73211
  - New driver for this colour sensor with dt bindings. Also includes
    docs for XYZ modifiers as used for the CIE colour space. Sysfs docs.
* atlas,atlas-ezo-sensor
  - Support O_2 sensor, includes new modifier for concentration.
  - Support humidity sensor.
* ti,hdc2010
  - New driver support hdc2010 and hdc2080 humidity sensors. Includes dt
    bindings.

Cleanup, minor fixes and features
* core
  - Make the trigger related stub functions static inline, avoiding some build
   warnings.
  - buffer-dmaengine. Allow adjusting bytes_used with residue info.
* dev_error_probe to replace open coded equivalent in many drivers.
* docs and comment fixes
  - Fix some typos, doubled words, capitalisation and punctuation.
* dt binding conversions to yaml
  - lltc,ltc2497
  - lltc,ltc2632
  - maxim,max11100
  - maxim,max1118
  - maxim,max9611
  - microchip,mcp3201
  - microchip,mcp342x (add to trivial devices)
  - ti,adc0832
  - ti,adc108s102
  - ti,adc128s052
  - ti,adc161s626
  - ti,ads8344
  - ti,tlc4541 (includes adding an accidentally dropped original binding doc)
* adi,adi-axi-adc
  - Use kobj_to_dev instead of open coding.
* adi,ad5686
  - Constify iio_chan_spec
* adi,ad8366
  - Add HMC1119 to kconfig help text as the driver supports it.
* adi,ad9523
  - Use devm for reset of probe and drop remove.
* adi,adxl372
  - Tidy up alignment
  - Add OF table
  - Add peak mode support with some docs.
* bosch,bma220 (general tidy up)
  - Fix some return codes.
  - Use read_avail callback rather than open coding attrs.
  - Use dev_get_drvdata rather than dance via to_spi_device()
  - Mark PM functions as __maybe_unused rather than #ifdef fun.
  - Drop ACPI_PTR protections and ifdefs.
  - Tidy up header ordering.
  - BIT and GENMASK
* broadcom,bcm_iproc
  - Drop of_match_ptr protection and switch to mod_devicetable.h
    Part of general move to get this anti-pattern out of IIO.
* melexis,mlx90614
  - Simplify some calculations.
  - Add some kernel_doc
  - Use regmap poll loop rather than open coding.
  - Add extended calibration option.
* sensortec,sx9310, wide ranging set of fixes and cleanups.
  - Document dt-binding.
  - Rename some macros to align better with spec sheet
  - Fix some issues with irq handling.
  - Drop of_match_ptr and ACPI_PTR macros to avoid unused warnings etc.
  - Switch to probe_new
  - Fix memory alignment for iio_push_to_buffers_with_timestamp()
  - Use long for bitmaps to allow use of for_each_bit_set()
  - Use regmap_read_poll instead of opencoding.
  - Simplify error paths
  - Enabled regulators at probe.
  - Use trigger flags from firmware rather than forcing them in the driver.
* ti,adc081c
  - Drop ACPI IDs that are not likely to be official ones and we don't believe
    anyone is using.
* ti,adc108s102
  - Drop CONFIG_OF and of_match_ptr protections.
* ti,adc128s052
  - Drop of_match_ptr protection and include mod_devicetable.h
* ti,dac5571
  - Support powerdown for mutlichannel usecases.
* xpowers,axp20x
  - Convert from OF to generic fw / device properties. Unlikely anyone will
    use this with anything other than devicetree, but this is part of a
    general move across IIO.

* tag 'iio-for-5.10a-take2' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (96 commits)
  drivers/iio/humidity/hdc2010.c:305:2-3: Unneeded semicolon
  iio: accel: bma220: Remove unneeded blank lines
  iio: accel: bma220: Use BIT() and GENMASK() macros
  iio: accel: bma220: Group IIO headers together
  iio: accel: bma220: Drop ACPI_PTR() and accompanying ifdeffery
  iio: accel: bma220: Mark PM functions as __maybe_unused
  iio: accel: bma220: Use dev_get_drvdata() directly
  iio: accel: bma220: Convert to use ->read_avail()
  iio: accel: bma220: Fix returned codes from bma220_init(), bma220_deinit()
  dt-bindings: iio: adc: microchip,mcp3201 yaml conversion.
  iio: buffer-dmaengine: adjust `bytes_used` with residue info
  dt-bindings: iio: adc: ti,tlc4541 binding conversion
  dt-bindings: iio: adc: tlc4541 - recover accidentally dropped binding doc
  dt-bindings: iio: adc: ti,ads8344 yaml conversion
  dt-bindings: iio: adc: ti,adc128s052 yaml conversion.
  dt-bindings: iio: adc: ti,adc0832 yaml conversion.
  dt-bindings: iio: adc: ti,adc161s626 yaml conversion.
  dt-bindings: iio: adc: lltc,ltc2497 yaml conversion.
  dt-bindings: iio: adc: ti,adc108s102 yaml conversion
  dt-bindings: trivial-devices: Add mcp342x ADCs and drop separate binding doc.
  ...

3 years agodrivers/iio/humidity/hdc2010.c:305:2-3: Unneeded semicolon
kernel test robot [Tue, 1 Sep 2020 18:30:07 +0000 (19:30 +0100)]
drivers/iio/humidity/hdc2010.c:305:2-3: Unneeded semicolon

Remove unneeded semicolon.

Generated by: scripts/coccinelle/misc/semicolon.cocci

Fixes: 0115a63c9993 ("iio: humidity: Add TI HDC20x0 support")
CC: Eugene Zaikonnikov <ez@norphonic.com>
Signed-off-by: kernel test robot <lkp@intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
3 years agostaging: tegra-vde: fix common struct sg_table related issues
Marek Szyprowski [Fri, 4 Sep 2020 13:17:07 +0000 (15:17 +0200)]
staging: tegra-vde: fix common struct sg_table related issues

The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function
returns the number of the created entries in the DMA address space.
However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and
dma_unmap_sg must be called with the original number of the entries
passed to the dma_map_sg().

struct sg_table is a common structure used for describing a non-contiguous
memory buffer, used commonly in the DRM and graphics subsystems. It
consists of a scatterlist with memory pages and DMA addresses (sgl entry),
as well as the number of scatterlist entries: CPU pages (orig_nents entry)
and DMA mapped pages (nents entry).

It turned out that it was a common mistake to misuse nents and orig_nents
entries, calling DMA-mapping functions with a wrong number of entries or
ignoring the number of mapped entries returned by the dma_map_sg()
function.

To avoid such issues, lets use a common dma-mapping wrappers operating
directly on the struct sg_table objects and use scatterlist page
iterators where possible. This, almost always, hides references to the
nents and orig_nents entries, making the code robust, easier to follow
and copy/paste safe.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Dmitry Osipenko <digetx@gmail.com>
Link: https://lore.kernel.org/r/20200904131711.12950-27-m.szyprowski@samsung.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: pi433: break long lines
Bryan Brattlof [Wed, 2 Sep 2020 19:22:05 +0000 (19:22 +0000)]
staging: pi433: break long lines

scripts/checkpatch.pl is warning about some lines exceeding 100
charecters. This will cleanup the warnings.

Signed-off-by: Bryan Brattlof <hello@bryanbrattlof.com>
Link: https://lore.kernel.org/r/87y2lsrnl8.fsf@bryanbrattlof.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: os_dep: added blank line to fix coding style issue
Ross Schmidt [Wed, 2 Sep 2020 19:20:44 +0000 (14:20 -0500)]
staging: rtl8723bs: os_dep: added blank line to fix coding style issue

Fixed a coding style issue by adding a blank line after declarations in
sdio_intf.c to fix a checkpatch warning.

Signed-off-by: Ross Schmidt <ross.schm.dev@gmail.com>
Link: https://lore.kernel.org/r/20200902192044.19143-1-ross.schm.dev@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agoiio: accel: bma220: Remove unneeded blank lines
Andy Shevchenko [Mon, 31 Aug 2020 09:08:13 +0000 (12:08 +0300)]
iio: accel: bma220: Remove unneeded blank lines

There are few blank lines that split structure definitions
with their users. Remove them to increase readability.

While here, update copyright year.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20200831090813.78841-8-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
3 years agoiio: accel: bma220: Use BIT() and GENMASK() macros
Andy Shevchenko [Mon, 31 Aug 2020 09:08:12 +0000 (12:08 +0300)]
iio: accel: bma220: Use BIT() and GENMASK() macros

Code is better to read when numbers of bit are explicitly used.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20200831090813.78841-7-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
3 years agoiio: accel: bma220: Group IIO headers together
Andy Shevchenko [Mon, 31 Aug 2020 09:08:11 +0000 (12:08 +0300)]
iio: accel: bma220: Group IIO headers together

Group IIO headers together and follow the common pattern of header inclusion,
i.e. more generic first.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20200831090813.78841-6-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
3 years agoiio: accel: bma220: Drop ACPI_PTR() and accompanying ifdeffery
Andy Shevchenko [Mon, 31 Aug 2020 09:08:10 +0000 (12:08 +0300)]
iio: accel: bma220: Drop ACPI_PTR() and accompanying ifdeffery

The driver is quite likely used only on ACPI based platforms and
rarely build with CONFIG_ACPI=n. Even though, the few dozens of bytes
is better than ugly ifdeffery and inclusion of heavy header.

As a result, replace acpi.h with mod_devicetable.h.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20200831090813.78841-5-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
3 years agoiio: accel: bma220: Mark PM functions as __maybe_unused
Andy Shevchenko [Mon, 31 Aug 2020 09:08:09 +0000 (12:08 +0300)]
iio: accel: bma220: Mark PM functions as __maybe_unused

Instead of using ugly ifdeffery, mark PM functions as __maybe_unused.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20200831090813.78841-4-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
3 years agoiio: accel: bma220: Use dev_get_drvdata() directly
Andy Shevchenko [Mon, 31 Aug 2020 09:08:08 +0000 (12:08 +0300)]
iio: accel: bma220: Use dev_get_drvdata() directly

Instead of using to_spi_dev() + spi_get_drvdata(),
use dev_get_drvdata() to make code simpler.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20200831090813.78841-3-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
3 years agoiio: accel: bma220: Convert to use ->read_avail()
Andy Shevchenko [Mon, 31 Aug 2020 09:08:07 +0000 (12:08 +0300)]
iio: accel: bma220: Convert to use ->read_avail()

Convert to use ->read_avail() instead of open-coded attribute handling.

While here, fix the typo in array definition and append comma in case of
the future extension.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20200831090813.78841-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
3 years agoiio: accel: bma220: Fix returned codes from bma220_init(), bma220_deinit()
Andy Shevchenko [Mon, 31 Aug 2020 09:08:06 +0000 (12:08 +0300)]
iio: accel: bma220: Fix returned codes from bma220_init(), bma220_deinit()

Potentially bma220_init() and bma220_deinit() may return positive codes.
Fix the logic to return proper error codes instead.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20200831090813.78841-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
3 years agodt-bindings: iio: adc: microchip,mcp3201 yaml conversion.
Jonathan Cameron [Sun, 9 Aug 2020 11:17:41 +0000 (12:17 +0100)]
dt-bindings: iio: adc: microchip,mcp3201 yaml conversion.

Drops the deprecated compatibles without the vendor name.
Whilst the driver continues to support these for old dt blobs,
any dt bindings that are actuallly verified against this document should
be fixed to add the vendor name.

Added the #io-channel-cells property to allow for consumers.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Cc: Oskar Andero <oskar.andero@gmail.com>
Link: https://lore.kernel.org/r/20200809111753.156236-2-jic23@kernel.org
3 years agoiio: buffer-dmaengine: adjust `bytes_used` with residue info
Alexandru Ardelean [Wed, 26 Aug 2020 05:20:11 +0000 (07:20 +0200)]
iio: buffer-dmaengine: adjust `bytes_used` with residue info

A transfer may fall shorter than the bytes in the block.
This information is available in the residue from the DMA engine, so we can
compute actual `bytes_used` with that by subtracting the residue.

Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Link: https://lore.kernel.org/r/20200826052011.13348-1-lars@metafoo.de
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
3 years agodt-bindings: iio: adc: ti,tlc4541 binding conversion
Jonathan Cameron [Sun, 9 Aug 2020 11:17:53 +0000 (12:17 +0100)]
dt-bindings: iio: adc: ti,tlc4541 binding conversion

Simple binding so easy to convert.
Dropped the stated value of maximum spi bus frequency as it does
not seem to correspond to the datasheet.  The value of 200kHz
is the max sampling frequency of the ADC, not the clock frequency of
the SPI bus.

Added #io-channel-cells to allow use as a provider of channels to
other devices via the consumer binding.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Reviewed-By: Phil Reid <preid@electromag.com.au>
Cc: Phil Reid <preid@electromag.com.au>
Link: https://lore.kernel.org/r/20200809111753.156236-14-jic23@kernel.org
3 years agodt-bindings: iio: adc: tlc4541 - recover accidentally dropped binding doc
Phil Reid [Sun, 9 Aug 2020 11:17:52 +0000 (12:17 +0100)]
dt-bindings: iio: adc: tlc4541 - recover accidentally dropped binding doc

JC: Seems that I messed up applying the original driver patches, and
this file never actually made it into the tree.

I have picked up original Ack and Sign-off so as to record the
history.

Signed-off-by: Phil Reid <preid@electromag.com.au>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Acked-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20200809111753.156236-13-jic23@kernel.org
3 years agodt-bindings: iio: adc: ti,ads8344 yaml conversion
Jonathan Cameron [Sun, 9 Aug 2020 11:17:51 +0000 (12:17 +0100)]
dt-bindings: iio: adc: ti,ads8344 yaml conversion

Simple binding so easy to convert.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20200809111753.156236-12-jic23@kernel.org
3 years agodt-bindings: iio: adc: ti,adc128s052 yaml conversion.
Jonathan Cameron [Sun, 9 Aug 2020 11:17:49 +0000 (12:17 +0100)]
dt-bindings: iio: adc: ti,adc128s052 yaml conversion.

Simple binding.  Only addition to txt version is
as a provider of channels to other devices using the consumer
binding.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Cc: Angelo Compagnucci <angelo.compagnucci@gmail.com>
Link: https://lore.kernel.org/r/20200809111753.156236-10-jic23@kernel.org
3 years agodt-bindings: iio: adc: ti,adc0832 yaml conversion.
Jonathan Cameron [Sun, 9 Aug 2020 11:17:46 +0000 (12:17 +0100)]
dt-bindings: iio: adc: ti,adc0832 yaml conversion.

Simple binding conversion of this SPI ADC binding, with reference
voltage.

Added the optional property #io-channel-cells to allow for
consumers of channels if that makes sense for a given board.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Cc: Akinobu Mita <akinobu.mita@gmail.com>
Link: https://lore.kernel.org/r/20200809111753.156236-7-jic23@kernel.org
3 years agodt-bindings: iio: adc: ti,adc161s626 yaml conversion.
Jonathan Cameron [Sun, 9 Aug 2020 11:17:45 +0000 (12:17 +0100)]
dt-bindings: iio: adc: ti,adc161s626 yaml conversion.

Simple conversion for this ADC driver.  Note that I haven't put
limits on the spi-max-sampling-frequency because the adc161s626
doesn't state one clearly defined value.

Added the #io-channel-cells property to allow for consumers.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Acked-by: Matt Ranostay <matt.ranostay@konsulko.com>
Cc: Matt Ranostay <matt.ranostay@konsulko.com>
Link: https://lore.kernel.org/r/20200809111753.156236-6-jic23@kernel.org
3 years agodt-bindings: iio: adc: lltc,ltc2497 yaml conversion.
Jonathan Cameron [Sun, 9 Aug 2020 11:17:44 +0000 (12:17 +0100)]
dt-bindings: iio: adc: lltc,ltc2497 yaml conversion.

Very simple binding for this i2c device with a reference supply.

Added the #io-channel-cells property to allow for consumers.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Cc: Michael Hennerich <michael.hennerich@analog.com>
Link: https://lore.kernel.org/r/20200809111753.156236-5-jic23@kernel.org
3 years agodt-bindings: iio: adc: ti,adc108s102 yaml conversion
Jonathan Cameron [Sun, 9 Aug 2020 11:17:43 +0000 (12:17 +0100)]
dt-bindings: iio: adc: ti,adc108s102 yaml conversion

Very simple conversion of spi device with reference supply.

Added the #io-channel-cells property to allow for consumers.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Cc: Jan Kiszka <jan.kiszka@siemens.com>
Link: https://lore.kernel.org/r/20200809111753.156236-4-jic23@kernel.org
3 years agodt-bindings: trivial-devices: Add mcp342x ADCs and drop separate binding doc.
Jonathan Cameron [Sun, 9 Aug 2020 11:17:42 +0000 (12:17 +0100)]
dt-bindings: trivial-devices: Add mcp342x ADCs and drop separate binding doc.

These i2c devices have simple bindings, well described by trivial-device.yaml
so rather than convert the binding doc to yaml, let us just add them to
trivial devices and drop the old binding document.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Cc: Angelo Compagnucci <angelo.compagnucci@gmail.com>
Link: https://lore.kernel.org/r/20200809111753.156236-3-jic23@kernel.org
3 years agoiio: accel: adxl372: Add additional trigger ABI docs
Alexandru Tachici [Mon, 10 Aug 2020 09:32:57 +0000 (12:32 +0300)]
iio: accel: adxl372: Add additional trigger ABI docs

Document use of additional trigger supplied by driver.

Signed-off-by: Alexandru Tachici <alexandru.tachici@analog.com>
Link: https://lore.kernel.org/r/20200810093257.65929-3-alexandru.tachici@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
3 years agoiio: accel: adxl372: Add support for FIFO peak mode
Stefan Popa [Mon, 10 Aug 2020 09:32:56 +0000 (12:32 +0300)]
iio: accel: adxl372: Add support for FIFO peak mode

By default, if all three channels (x, y, z) are enabled, sample sets of
concurrent 3-axis data is stored in the FIFO. This patch adds the option
to configure the FIFO to store peak acceleration (x, y and z) of every
over-threshold event. When pushing to iio buffer we push only enabled
axis data.

Currently the driver configures adxl372 to work in loop mode.
The inactivity and activity timings  decide how fast the chip
will loop through the awake and waiting states and the
thresholds on x,y,z axis decide when activity or inactivity
will be detected.

This patch adds standard events sysfs entries for the inactivity
and activity timings: thresh_falling_period/thresh_rising_period
and for the in_accel_x_thresh_falling/rising_value.

Signed-off-by: Stefan Popa <stefan.popa@analog.com>
Signed-off-by: Alexandru Tachici <alexandru.tachici@analog.com>
Link: https://lore.kernel.org/r/20200810093257.65929-2-alexandru.tachici@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
3 years agoiio:temperature:mlx90632: Some stylefixing leftovers
Crt Mori [Tue, 18 Aug 2020 21:37:37 +0000 (23:37 +0200)]
iio:temperature:mlx90632: Some stylefixing leftovers

There is some inconsistency and whitespace cleanup performed in this
patch. It was done on top of my other patches, but I can rebase to head
of the togreg branch if it would go in sooner.

Signed-off-by: Crt Mori <cmo@melexis.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20200818213737.140613-6-cmo@melexis.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
3 years agoiio:temperature:mlx90632: Adding extended calibration option
Crt Mori [Tue, 18 Aug 2020 21:37:36 +0000 (23:37 +0200)]
iio:temperature:mlx90632: Adding extended calibration option

For some time the market wants medical grade accuracy in medical range,
while still retaining the declared accuracy outside of the medical range
within the same sensor. That is why we created extended calibration
which is automatically switched to when object temperature is too high.

This patch also introduces the object_ambient_temperature variable which
is needed for more accurate calculation of the object infra-red
footprint as sensor's ambient temperature might be totally different
than what the ambient temperature is at object and that is why we can
have some more errors which can be eliminated. Currently this temperature
is fixed at 25, but the interface to adjust it by user (with external
sensor or just IR measurement of the other object which acts as ambient),
will be introduced in another commit.

Signed-off-by: Crt Mori <cmo@melexis.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20200818213737.140613-5-cmo@melexis.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
3 years agoiio:temperature:mlx90632: Convert polling while loop to regmap
Crt Mori [Tue, 18 Aug 2020 21:37:35 +0000 (23:37 +0200)]
iio:temperature:mlx90632: Convert polling while loop to regmap

Reduce number of lines and improve readability to convert polling while
loops to regmap_read_poll_timeout.

Signed-off-by: Crt Mori <cmo@melexis.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20200818213737.140613-4-cmo@melexis.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
3 years agoiio:temperature:mlx90632: Add kerneldoc to the internal struct
Crt Mori [Tue, 18 Aug 2020 21:37:34 +0000 (23:37 +0200)]
iio:temperature:mlx90632: Add kerneldoc to the internal struct

Document internal/private struct for mlx90632 device.

Signed-off-by: Crt Mori <cmo@melexis.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20200818213737.140613-3-cmo@melexis.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
3 years agoiio:temperature:mlx90632: Reduce number of equal calulcations
Crt Mori [Tue, 18 Aug 2020 21:37:33 +0000 (23:37 +0200)]
iio:temperature:mlx90632: Reduce number of equal calulcations

TAdut4 was calculated each iteration although it did not change. In light
of near future additions of the Extended range DSP calculations, this
function refactoring will help reduce unrelated changes in that series as
well as reduce the number of new functions needed.

Signed-off-by: Crt Mori <cmo@melexis.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20200818213737.140613-2-cmo@melexis.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
3 years agoiio: gyro: adxrs290: Insert missing mutex initialization call
Nishant Malpani [Tue, 25 Aug 2020 12:45:52 +0000 (18:15 +0530)]
iio: gyro: adxrs290: Insert missing mutex initialization call

Insert a missing mutex_init() call during the probe that initializes
the driver's local lock to unlocked state.

Fixes: 2c8920fff145 ("iio: gyro: Add driver support for ADXRS290")
Signed-off-by: Nishant Malpani <nish.malpani25@gmail.com>
Link: https://lore.kernel.org/r/20200825124552.11155-1-nish.malpani25@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
3 years agodocs: abi: iio: Use What: consistently
Gwendal Grignou [Fri, 28 Aug 2020 23:31:55 +0000 (16:31 -0700)]
docs: abi: iio: Use What: consistently

Change "[w|W]hat[:| ]" to What: for consistency.

Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Link: https://lore.kernel.org/r/20200828233156.2264689-2-gwendal@chromium.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
3 years agoiio: multiplexer: iio-mux: Simplify with dev_err_probe()
Krzysztof Kozlowski [Sat, 29 Aug 2020 06:47:26 +0000 (08:47 +0200)]
iio: multiplexer: iio-mux: Simplify with dev_err_probe()

Common pattern of handling deferred probe can be simplified with
dev_err_probe().  Less code and also it prints the error value.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Acked-by: Peter Rosin <peda@axentia.se>
Link: https://lore.kernel.org/r/20200829064726.26268-18-krzk@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
3 years agoiio: magnetometer: mag3110: Simplify with dev_err_probe()
Krzysztof Kozlowski [Sat, 29 Aug 2020 06:47:25 +0000 (08:47 +0200)]
iio: magnetometer: mag3110: Simplify with dev_err_probe()

Common pattern of handling deferred probe can be simplified with
dev_err_probe().  Less code and also it prints the error value.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20200829064726.26268-17-krzk@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
3 years agoiio: magnetometer: ak8974: Simplify with dev_err_probe()
Krzysztof Kozlowski [Sat, 29 Aug 2020 06:47:24 +0000 (08:47 +0200)]
iio: magnetometer: ak8974: Simplify with dev_err_probe()

Common pattern of handling deferred probe can be simplified with
dev_err_probe().  Less code and also it prints the error value.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20200829064726.26268-16-krzk@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
3 years agoiio: light: tsl2772: Simplify with dev_err_probe()
Krzysztof Kozlowski [Sat, 29 Aug 2020 06:47:23 +0000 (08:47 +0200)]
iio: light: tsl2772: Simplify with dev_err_probe()

Common pattern of handling deferred probe can be simplified with
dev_err_probe().  Less code and also it prints the error value.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20200829064726.26268-15-krzk@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
3 years agoiio: light: isl29018: Simplify with dev_err_probe()
Krzysztof Kozlowski [Sat, 29 Aug 2020 06:47:22 +0000 (08:47 +0200)]
iio: light: isl29018: Simplify with dev_err_probe()

Common pattern of handling deferred probe can be simplified with
dev_err_probe().  Less code and also it prints the error value.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20200829064726.26268-14-krzk@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
3 years agoiio: imu: inv_mpu6050: Simplify with dev_err_probe()
Krzysztof Kozlowski [Sat, 29 Aug 2020 06:47:21 +0000 (08:47 +0200)]
iio: imu: inv_mpu6050: Simplify with dev_err_probe()

Common pattern of handling deferred probe can be simplified with
dev_err_probe().  Less code and also it prints the error value.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com>
Link: https://lore.kernel.org/r/20200829064726.26268-13-krzk@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
3 years agoiio: dac: dpot-dac: Simplify with dev_err_probe()
Krzysztof Kozlowski [Sat, 29 Aug 2020 06:47:20 +0000 (08:47 +0200)]
iio: dac: dpot-dac: Simplify with dev_err_probe()

Common pattern of handling deferred probe can be simplified with
dev_err_probe().  Less code and also it prints the error value.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Acked-by: Peter Rosin <peda@axentia.se>
Link: https://lore.kernel.org/r/20200829064726.26268-12-krzk@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
3 years agoiio: chemical: scd30: Simplify with dev_err_probe()
Krzysztof Kozlowski [Sat, 29 Aug 2020 06:47:19 +0000 (08:47 +0200)]
iio: chemical: scd30: Simplify with dev_err_probe()

Common pattern of handling deferred probe can be simplified with
dev_err_probe().  Less code and also it prints the error value.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Acked-by: Tomasz Duszynski <tomasz.duszynski@octakon.com>
Link: https://lore.kernel.org/r/20200829064726.26268-11-krzk@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
3 years agoiio: amplifiers: hmc425a: Simplify with dev_err_probe()
Krzysztof Kozlowski [Sat, 29 Aug 2020 06:47:18 +0000 (08:47 +0200)]
iio: amplifiers: hmc425a: Simplify with dev_err_probe()

Common pattern of handling deferred probe can be simplified with
dev_err_probe().  Less code and also it prints the error value.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20200829064726.26268-10-krzk@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
3 years agoiio: afe: iio-rescale: Simplify with dev_err_probe()
Krzysztof Kozlowski [Sat, 29 Aug 2020 06:47:17 +0000 (08:47 +0200)]
iio: afe: iio-rescale: Simplify with dev_err_probe()

Common pattern of handling deferred probe can be simplified with
dev_err_probe().  Less code and also it prints the error value.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Acked-by: Peter Rosin <peda@axentia.se>
Link: https://lore.kernel.org/r/20200829064726.26268-9-krzk@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
3 years agoiio: adc: stm32: Simplify with dev_err_probe()
Krzysztof Kozlowski [Sat, 29 Aug 2020 06:47:16 +0000 (08:47 +0200)]
iio: adc: stm32: Simplify with dev_err_probe()

Common pattern of handling deferred probe can be simplified with
dev_err_probe().  Less code and also it prints the error value.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20200829064726.26268-8-krzk@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
3 years agoiio: adc: rcar-gyroadc: Simplify with dev_err_probe()
Krzysztof Kozlowski [Sat, 29 Aug 2020 06:47:15 +0000 (08:47 +0200)]
iio: adc: rcar-gyroadc: Simplify with dev_err_probe()

Common pattern of handling deferred probe can be simplified with
dev_err_probe().  Less code and also it prints the error value.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20200829064726.26268-7-krzk@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
3 years agoiio: adc: meson_saradc: Simplify with dev_err_probe()
Krzysztof Kozlowski [Sat, 29 Aug 2020 06:47:14 +0000 (08:47 +0200)]
iio: adc: meson_saradc: Simplify with dev_err_probe()

Common pattern of handling deferred probe can be simplified with
dev_err_probe().  Less code and also it prints the error value.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Link: https://lore.kernel.org/r/20200829064726.26268-6-krzk@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
3 years agoiio: adc: ltc2497: Simplify with dev_err_probe()
Krzysztof Kozlowski [Sat, 29 Aug 2020 06:47:13 +0000 (08:47 +0200)]
iio: adc: ltc2497: Simplify with dev_err_probe()

Common pattern of handling deferred probe can be simplified with
dev_err_probe().  Less code and also it prints the error value.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20200829064726.26268-5-krzk@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
3 years agoiio: adc: exynos_adc: Simplify with dev_err_probe()
Krzysztof Kozlowski [Sat, 29 Aug 2020 06:47:12 +0000 (08:47 +0200)]
iio: adc: exynos_adc: Simplify with dev_err_probe()

Common pattern of handling deferred probe can be simplified with
dev_err_probe().  Less code and also it prints the error value.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20200829064726.26268-4-krzk@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
3 years agoiio: adc: envelope-detector: Simplify with dev_err_probe()
Krzysztof Kozlowski [Sat, 29 Aug 2020 06:47:11 +0000 (08:47 +0200)]
iio: adc: envelope-detector: Simplify with dev_err_probe()

Common pattern of handling deferred probe can be simplified with
dev_err_probe().  Less code and also it prints the error value.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Acked-by: Peter Rosin <peda@axentia.se>
Link: https://lore.kernel.org/r/20200829064726.26268-3-krzk@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
3 years agoiio: accel: mma8452: Simplify with dev_err_probe()
Krzysztof Kozlowski [Sat, 29 Aug 2020 06:47:10 +0000 (08:47 +0200)]
iio: accel: mma8452: Simplify with dev_err_probe()

Common pattern of handling deferred probe can be simplified with
dev_err_probe().  Less code and also it prints the error value.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20200829064726.26268-2-krzk@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
3 years agoiio: accel: bma180: Simplify with dev_err_probe()
Krzysztof Kozlowski [Sat, 29 Aug 2020 06:47:09 +0000 (08:47 +0200)]
iio: accel: bma180: Simplify with dev_err_probe()

Common pattern of handling deferred probe can be simplified with
dev_err_probe().  Less code and also it prints the error value.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20200829064726.26268-1-krzk@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
3 years agoiio: chemical: atlas-ezo-sensor: add humidity sensor support
Matt Ranostay [Mon, 17 Aug 2020 00:50:52 +0000 (03:50 +0300)]
iio: chemical: atlas-ezo-sensor: add humidity sensor support

Add support for atlas,hum-ezo / humidity sensor which with scaling
provides respective data in millipercent

Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
3 years agodt-bindings: iio: chemical: add Atlas EZO Humidity module documentation
Matt Ranostay [Mon, 17 Aug 2020 00:50:51 +0000 (03:50 +0300)]
dt-bindings: iio: chemical: add Atlas EZO Humidity module documentation

Cc: devicetree@vger.kernel.org
Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
3 years agoiio: adc: adi-axi-adc: Use kobj_to_dev() instead of container_of()
Tian Tao [Thu, 20 Aug 2020 03:01:26 +0000 (11:01 +0800)]
iio: adc: adi-axi-adc: Use kobj_to_dev() instead of container_of()

Use kobj_to_dev() instead of container_of()

Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
Acked-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
3 years agoiio: dac: ad5686: Constify static struct iio_chan_spec
Rikard Falkeborn [Tue, 26 May 2020 21:02:21 +0000 (23:02 +0200)]
iio: dac: ad5686: Constify static struct iio_chan_spec

These are never modified and can be made const to allow the compiler to
put it in read-only memory.

Before:
   text    data     bss     dec     hex filename
   6642   12608      64   19314    4b72 drivers/iio/dac/ad5686.o

After:
   text    data     bss     dec     hex filename
  16946    2304      64   19314    4b72 drivers/iio/dac/ad5686.o

Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Acked-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
3 years agoiio/dac: convert ltc2632.txt to lltc,ltc2632.yaml
Chris Ruehl [Mon, 10 Aug 2020 03:37:52 +0000 (11:37 +0800)]
iio/dac: convert ltc2632.txt to lltc,ltc2632.yaml

Conversion of the ltc2632 to yaml format and name the file to
'lltc,ltc2632.yaml'.

Signed-off-by: Chris Ruehl <chris.ruehl@gtsys.com.hk>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
3 years agoiio: documentation: light: Add as73211 sysfs documentation
Christian Eggers [Mon, 10 Aug 2020 05:24:47 +0000 (07:24 +0200)]
iio: documentation: light: Add as73211 sysfs documentation

The driver for the as73211 light sensor provides the following not yet
documented sysfs entries:
- in_intensity_(x|y|z)_raw
- in_intensity_(x|y|z)_scale
- in_intensity_sampling_frequency(_available)
- in_intensity_hardwaregain(_available)
- in_intensity_integration_time

Signed-off-by: Christian Eggers <ceggers@arri.de>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
3 years agoiio:adc:axp20x: Convert from OF to generic fw / device properties
Jonathan Cameron [Sun, 9 Aug 2020 14:13:05 +0000 (15:13 +0100)]
iio:adc:axp20x: Convert from OF to generic fw / device properties

Whilst fairly unlikely anyone will ever use this driver with anything
other than DT, we are trying to move IIO over to the generic interfaces
where easy to do so.

In this case this involved moving to generic check on presence
of fwnode, generic device_get_match_data() and dropping the of_match_ptr
protection.  Also relevant header changes to have property.h and
mod_devicetable.h only.

Also drop the casting away of a const in favour of retaining
the const throughout.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Quentin Schulz <quentin.schulz@bootlin.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
3 years agoDocumentation: ABI: iio: fix some spelling mistakes
Ahmad Fatoum [Thu, 13 Aug 2020 06:52:20 +0000 (08:52 +0200)]
Documentation: ABI: iio: fix some spelling mistakes

This fixes some typos found while browsing the documentation.

Cc: trivial@kernel.org
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
3 years agoiio: health: max30102: update author's email
Matt Ranostay [Fri, 14 Aug 2020 13:49:41 +0000 (06:49 -0700)]
iio: health: max30102: update author's email

Update email to author's current employer

Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
3 years agoiio:adc:ti-adc081c: Drop ACPI ids that seem very unlikely to be official.
Jonathan Cameron [Tue, 21 Jul 2020 17:14:41 +0000 (18:14 +0100)]
iio:adc:ti-adc081c: Drop ACPI ids that seem very unlikely to be official.

We have no known users of these in the wild.
it seems very unlikely these are real IDs having the form ADCXXXX
as that ID is owned by Achnor Datacomm not TI.

Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
3 years agoiio:adc:ti-adc108s102: Drop CONFIG_OF and of_match_ptr protections
Jonathan Cameron [Tue, 21 Jul 2020 17:14:42 +0000 (18:14 +0100)]
iio:adc:ti-adc108s102: Drop CONFIG_OF and of_match_ptr protections

I'm trying to clean this (now) anti-pattern out of IIO to avoid
cut and paste into new drivers.

Also add an include of mod_devicetable.h as the driver directly uses
struct of_device_id which is defined in there.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoiio:adc:ti-adc128s052: drop of_match_ptr protection
Jonathan Cameron [Tue, 21 Jul 2020 17:14:43 +0000 (18:14 +0100)]
iio:adc:ti-adc128s052: drop of_match_ptr protection

There is no real advantage in having these protections and
for parts that do not have an explicit ACPI ID, it prevents the
use of PRP0001. I'm trying to clear this out of IIO in general
to avoid copying in new drivers.

Include mod_devicetable.h as we are using of_device_id in here so
including that header is best practice.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Angelo Compagnucci <angelo.compagnucci@gmail.com>
3 years agoiio:adc:bcm_iproc: Drop of_match_ptr protection and switch to mod_devicetable.h
Jonathan Cameron [Tue, 21 Jul 2020 17:14:44 +0000 (18:14 +0100)]
iio:adc:bcm_iproc: Drop of_match_ptr protection and switch to mod_devicetable.h

This driver cannot be instantiated from ACPI due to it's use of
syscon_regmap_lookup_by_phandle() but in the interests of clearing
this anti pattern out of IIO, let us switch to an explicit
check in Kconfig and remove the protections on the of_match_table
The switch of header is because we only use of_device_id
in here and that is defined in mod_devicetable.h not of.h.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Raveendra Padasalagi <raveendra.padasalagi@broadcom.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
3 years agoiio: dac: dac5571: Support powerdown for multi-channel
Vincent Whitchurch [Tue, 4 Aug 2020 09:31:38 +0000 (11:31 +0200)]
iio: dac: dac5571: Support powerdown for multi-channel

The driver currently only allows channel 0 to be powered down but the
multi-channel variants of the hardware allow each channel to be powered
down separately and with separate power down modes.  Add support for
this.

Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com>
Acked-by: Sean Nyekjaer <sean@geanix.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
3 years agodt-bindings: iio: humidity: Add TI HDC20x0 support
Eugene Zaikonnikov [Fri, 7 Aug 2020 14:38:53 +0000 (16:38 +0200)]
dt-bindings: iio: humidity: Add TI HDC20x0 support

Add device tree bindings for HDC2010/HDC2080 family of humidity and
temperature sensors.

Signed-off-by: Eugene Zaikonnikov <ez@norphonic.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
3 years agoiio: humidity: Add TI HDC20x0 support
Eugene Zaikonnikov [Fri, 7 Aug 2020 14:17:55 +0000 (16:17 +0200)]
iio: humidity: Add TI HDC20x0 support

Add driver support for HDC2010/2080 series devices and sysfs
documentation for their heater element.

HDC2010 is an integrated high-accuracy humidity and temperature sensor
with very low power consumption. The device includes a resistive heating
element. The temperature range is -40C to 125C with 0.2C
accuracy. Humidity measurement is 0 to 100% with 2% RH accuracy.

Signed-off-by: Eugene Zaikonnikov <ez@norphonic.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
3 years agoiio: sx9310: Use irq trigger flags from firmware
Stephen Boyd [Mon, 3 Aug 2020 23:58:15 +0000 (17:58 -0600)]
iio: sx9310: Use irq trigger flags from firmware

We shouldn't need to set default irq trigger flags here as the firmware
should have properly indicated the trigger type, i.e. level low, in the
DT or ACPI tables.

Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Daniel Campello <campello@chromium.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
3 years agoiio: sx9310: Enable vdd and svdd regulators at probe
Stephen Boyd [Mon, 3 Aug 2020 23:58:14 +0000 (17:58 -0600)]
iio: sx9310: Enable vdd and svdd regulators at probe

Enable the main power supply (vdd) and digital IO power supply (svdd)
during probe so that the i2c communication and device works properly on
boards that aggressively power gate these supplies.

Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Daniel Campello <campello@chromium.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
3 years agoiio: sx9310: Drop channel_users[]
Stephen Boyd [Mon, 3 Aug 2020 23:58:13 +0000 (17:58 -0600)]
iio: sx9310: Drop channel_users[]

This struct member isn't used. Drop it.

Fixes: 72ad02b15d63 ("iio: Add SEMTECH SX9310/9311 sensor driver")
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Daniel Campello <campello@chromium.org>
Signed-off-by: Daniel Campello <campello@chromium.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
3 years agoiio: sx9310: Miscellaneous format fixes
Daniel Campello [Mon, 3 Aug 2020 23:58:12 +0000 (17:58 -0600)]
iio: sx9310: Miscellaneous format fixes

Miscellaneous format fixes throughout the whole file.

Signed-off-by: Daniel Campello <campello@chromium.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
3 years agoiio: sx9310: Use variable to hold &client->dev
Daniel Campello [Mon, 3 Aug 2020 23:58:11 +0000 (17:58 -0600)]
iio: sx9310: Use variable to hold &client->dev

Improves readability by storing &client->dev in a local variable.

Signed-off-by: Daniel Campello <campello@chromium.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
3 years agoiio: sx9310: Simplify error return handling
Daniel Campello [Mon, 3 Aug 2020 23:58:10 +0000 (17:58 -0600)]
iio: sx9310: Simplify error return handling

Checks for non-zero return values to signal error conditions.

Signed-off-by: Daniel Campello <campello@chromium.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
3 years agoiio: sx9310: Update copyright
Daniel Campello [Mon, 3 Aug 2020 23:58:09 +0000 (17:58 -0600)]
iio: sx9310: Update copyright

Fixes wrong copyright year.

Signed-off-by: Daniel Campello <campello@chromium.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
3 years agoiio: sx9310: Use regmap_read_poll_timeout() for compensation
Daniel Campello [Mon, 3 Aug 2020 23:58:08 +0000 (17:58 -0600)]
iio: sx9310: Use regmap_read_poll_timeout() for compensation

Simplify compensation stage by using regmap_read_poll_timeout().

Signed-off-by: Daniel Campello <campello@chromium.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
3 years agoiio: sx9310: Use long instead of int for channel bitmaps
Daniel Campello [Mon, 3 Aug 2020 23:58:07 +0000 (17:58 -0600)]
iio: sx9310: Use long instead of int for channel bitmaps

Uses for_each_set_bit() macro to loop over channel bitmaps.

Signed-off-by: Daniel Campello <campello@chromium.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
3 years agoiio: sx9310: Fixes various memory handling
Daniel Campello [Mon, 3 Aug 2020 23:58:06 +0000 (17:58 -0600)]
iio: sx9310: Fixes various memory handling

Makes use __aligned(8) to ensure that the timestamp is correctly aligned
when we call io_push_to_buffers_with_timestamp().
Also makes use of sizeof() for regmap_bulk_read instead of static value.

Signed-off-by: Daniel Campello <campello@chromium.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
3 years agoiio: sx9310: Change from .probe to .probe_new
Daniel Campello [Mon, 3 Aug 2020 23:58:05 +0000 (17:58 -0600)]
iio: sx9310: Change from .probe to .probe_new

Uses .probe_new in place of .probe. Also uses device_get_match_data()
for whoami matching.

Signed-off-by: Daniel Campello <campello@chromium.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
3 years agoiio: sx9310: Remove acpi and of table macros
Daniel Campello [Mon, 3 Aug 2020 23:58:04 +0000 (17:58 -0600)]
iio: sx9310: Remove acpi and of table macros

Avoids unused warnings due to acpi/of table macros.

Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Daniel Campello <campello@chromium.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
3 years agoiio: sx9310: Fix irq handling
Daniel Campello [Mon, 3 Aug 2020 23:58:03 +0000 (17:58 -0600)]
iio: sx9310: Fix irq handling

Fixes enable/disable irq handling at various points. The driver needs to
only enable/disable irqs if there is an actual irq handler installed.

Signed-off-by: Daniel Campello <campello@chromium.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
3 years agoiio: sx9310: Update macros declarations
Daniel Campello [Mon, 3 Aug 2020 23:58:02 +0000 (17:58 -0600)]
iio: sx9310: Update macros declarations

Follows spec sheet for macro declarations.

Signed-off-by: Daniel Campello <campello@chromium.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
3 years agodt-bindings: iio: Add bindings for sx9310 sensor
Daniel Campello [Mon, 3 Aug 2020 23:58:01 +0000 (17:58 -0600)]
dt-bindings: iio: Add bindings for sx9310 sensor

Adds device tree bindings for sx9310 sensor.

Signed-off-by: Daniel Campello <campello@chromium.org>
Cc: Hartmut Knaack <knaack.h@gmx.de>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Cc: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
Cc: Rob Herring <robh+dt@kernel.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
[swboyd@chromium.org: Add both regulators and make them optional]
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
3 years agodt-bindings: iio: adc: maxim,max1118 yaml conversion
Jonathan Cameron [Sat, 1 Aug 2020 17:58:50 +0000 (18:58 +0100)]
dt-bindings: iio: adc: maxim,max1118 yaml conversion

Simple device with a simple conversion.  Special handling needed
for the max1118 which is the only supported part that has an external
reference voltage.

Cc: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
3 years agoiio: light: as73211: New driver
Christian Eggers [Wed, 5 Aug 2020 05:57:44 +0000 (07:57 +0200)]
iio: light: as73211: New driver

Support for AMS AS73211 JENCOLOR(R) Digital XYZ Sensor.

This driver has no built-in trigger. In order for making triggered
measurements, an external (software) trigger driver like
iio-trig-hrtimer or iio-trig-sysfs is required.

The sensor supports single and continuous measurement modes. The latter
is not used by design as this would require tight timing synchronization
between hardware and driver without much benefit.

Datasheet: https://ams.com/documents/20143/36005/AS73211_DS000556_3-01.pdf
Signed-off-by: Christian Eggers <ceggers@arri.de>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
3 years agostaging/emxx_udc: Remove pointless variable assignments
Alex Dewar [Wed, 2 Sep 2020 15:46:24 +0000 (16:46 +0100)]
staging/emxx_udc: Remove pointless variable assignments

In a number of places in emxx_udc.c, there are variables which are
assigned to without that value ever being used. Remove these pointless
assignments.

Reported-by: kernel test robot <lkp@intel.com>
Fixes: 33aa8d45a4fe ("staging: emxx_udc: Add Emma Mobile USB Gadget driver")
Signed-off-by: Alex Dewar <alex.dewar90@gmail.com>
Link: https://lore.kernel.org/r/20200902154628.283453-1-alex.dewar90@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: spmi: hisi-spmi-controller: Use proper format in call to dev_err()
YueHaibing [Tue, 1 Sep 2020 03:57:22 +0000 (11:57 +0800)]
staging: spmi: hisi-spmi-controller: Use proper format in call to dev_err()

The correct format string for a size_t argument should be %zu.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Link: https://lore.kernel.org/r/20200901035722.9324-1-yuehaibing@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: os_dep: return errcode in cfg80211_rtw_leave_ibss()
YueHaibing [Sat, 29 Aug 2020 12:41:14 +0000 (20:41 +0800)]
staging: rtl8723bs: os_dep: return errcode in cfg80211_rtw_leave_ibss()

We should return error to caller in cfg80211_rtw_leave_ibss().

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20200829124114.5792-1-yuehaibing@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8188eu: use __func__ in os_dep
Michael Straube [Sun, 30 Aug 2020 07:21:40 +0000 (09:21 +0200)]
staging: rtl8188eu: use __func__ in os_dep

Use __func__ instead of hardcoded function names to clear
checkpatch warnings.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20200830072140.14178-1-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: qlge: qlge_mpi: Fix several CHECKs involving braces
Sebastian Fuentes [Mon, 31 Aug 2020 01:48:59 +0000 (18:48 -0700)]
staging: qlge: qlge_mpi: Fix several CHECKs involving braces

CHECK: Blank lines aren't necessary before a close brace '}'
FILE: drivers/staging/qlge/qlge_mpi.c:121:

CHECK: Unbalanced braces around else statement
FILE: drivers/staging/qlge/qlge_mpi.c:243:

CHECK: braces {} should be used on all arms of this statement
FILE: drivers/staging/qlge/qlge_mpi.c:350:

CHECK: Unbalanced braces around else statement
FILE: drivers/staging/qlge/qlge_mpi.c:352:

CHECK: Blank lines aren't necessary before a close brace '}'
FILE: drivers/staging/qlge/qlge_mpi.c:360:

CHECK: Blank lines aren't necessary after an open brace '{'
FILE: drivers/staging/qlge/qlge_mpi.c:408:

CHECK: braces {} should be used on all arms of this statement
FILE: drivers/staging/qlge/qlge_mpi.c:997:

CHECK: Unbalanced braces around else statement
FILE: drivers/staging/qlge/qlge_mpi.c:1001:

Signed-off-by: Sebastian Fuentes <sefu1789@gmail.com>
Link: https://lore.kernel.org/r/20200831014859.GA29362@ubuntu
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: emxx_udc: Fix passing of NULL to dma_alloc_coherent()
Alex Dewar [Tue, 25 Aug 2020 09:19:28 +0000 (10:19 +0100)]
staging: emxx_udc: Fix passing of NULL to dma_alloc_coherent()

In nbu2ss_eq_queue() memory is allocated with dma_alloc_coherent(),
though, strangely, NULL is passed as the struct device* argument. Pass
the UDC's device instead. Fix up the corresponding call to
dma_free_coherent() in the same way.

Build-tested on x86 only.

Fixes: 33aa8d45a4fe ("staging: emxx_udc: Add Emma Mobile USB Gadget driver")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Alex Dewar <alex.dewar90@gmail.com>
Link: https://lore.kernel.org/r/20200825091928.55794-1-alex.dewar90@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: media: atomisp: Convert to GPIO descriptors
Linus Walleij [Thu, 27 Aug 2020 08:14:45 +0000 (10:14 +0200)]
staging: media: atomisp: Convert to GPIO descriptors

Convert the atomisp LM3554 driver to use GPIO descriptors
fully. It was already retrieveing the GPIO lines as descriptors
but for some reason converting them back into global GPIO
numbers. There is no reason to do this, just deal with the
descriptors as-is.

Cc: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20200827081445.186882-1-linus.walleij@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: wilc1000: Fix memleak in wilc_bus_probe
Dinghao Liu [Wed, 19 Aug 2020 11:54:26 +0000 (19:54 +0800)]
staging: wilc1000: Fix memleak in wilc_bus_probe

When devm_clk_get() returns -EPROBE_DEFER, spi_priv
should be freed just like when wilc_cfg80211_init()
fails.

Fixes: 854d66df74aed ("staging: wilc1000: look for rtc_clk clock in spi mode")
Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
Link: https://lore.kernel.org/r/20200819115426.29852-1-dinghao.liu@zju.edu.cn
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>