1
0
Fork 0
Commit Graph

1125 Commits (redonkable)

Author SHA1 Message Date
Luwei Zhou 0ee9f9d5e3 MLK-11476 iio: adc: Enable i.MX6SX adc driver.
Enable i.MX6SX adc driver. ADC driver will try getting ADC controller
channel number via device tree, because i.MX chip enable 4 channels
on each controller.

Signed-off-by: Luwei Zhou <b45643@freescale.com>
Signed-off-by: Fugang Duan <B38611@freescale.com>
(cherry picked from commit 14a6a98f64e26702b1c0ecfc7d58a45ee5752d54)
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
2019-11-25 15:44:10 +08:00
Fabrice Gasnier e6afcf6c59 iio: adc: stm32-adc: fix stopping dma
There maybe a race when using dmaengine_terminate_all(). The predisable
routine may call iio_triggered_buffer_predisable() prior to a pending DMA
callback.
Adopt dmaengine_terminate_sync() to ensure there's no pending DMA request
before calling iio_triggered_buffer_predisable().

Fixes: 2763ea0585 ("iio: adc: stm32: add optional dma support")

Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-10-27 15:57:19 +00:00
Greg Kroah-Hartman 3f3d31622a First set of IIO fixes for the 5.4 cycle.
* adis16400
   - Make sure to free memory on a few failure paths.
 * adxl372
   - Fix wrong fifo depth
   - Fix wrong indexing of data from the fifo.
   - Perform a reset at startup to avoid a problem with inconsistent state.
 * axp288
   - This is a fix for a fix.  The original fix made sure we kept the
     configuration from some firmwares to preserve a bias current.
     Unfortunately it appears the previous behaviour was working around
     a buggy firmware by overwriting the wrong value it had.  Hence
     a regression was seen.
 * bmc150
   - Fix the centre temperature.  This was due to an error in one of the
     datasheets.
 * hx711
   - Fix an issue where a badly timed interrupt could lead to a control
     line being high long enough to put the device into a low power state.
 * meson_sar_adc
   - Fix a case where the irq was enabled before everything it uses was
     allocated.
 * st_lsm6dsx
   - Ensure we don't set the sensor sensitivity to 0 as it will force
     all readings to 0.
   - Fix a wait time for the slave i2c controller when the accelerometer
     is not enabled.
 * stm32-adc
   - Precursor for fix. Move a set of register definitions to a header.
   - Fix a race when several ADCs are in use with some using interrupts
     to control the dataflow and some using DMA.
 * vcnl4000
   - Fix a garbage of_match_table in which a string was passed instead
     of the intended enum.
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCAAvFiEEbilms4eEBlKRJoGxVIU0mcT0FogFAl2eJHgRHGppYzIzQGtl
 cm5lbC5vcmcACgkQVIU0mcT0FojPzA/+KHWytPVz58/DWZ2tRYvfcj4xF3HGEbOV
 FX1qgDVe1zixHkL8S3R5tNhdCSIl1016tknBv1ZcE1M8BewQF+GE6eyAw+5Gm8Ge
 3P1dt17EHfvcOpMBNMP1c9Mp/+OdKs+cSjp8G2MN2O0UGGBQdTPuhC+l4nzmOwCo
 kbAass0JVTlgxxgcnh6D37Slq4/QqZJBwEmHWEHQJmQfGd+ue+VEdh3XFLPC+gu9
 xh63WkubPuzkW2u9iJBDmGedq70pcMbfq6Fj+4YWdxrf0NzNwZIpVaIBRT4/15T0
 h+OVFnmFZVRoyiC7WvntIO4/dc3EtxOTTm38OqQpDpy/9DfkI+Nn5Z0bninIU5/x
 QT8puyyiuoOABHIttDabxSJQphjH3QeoCnWZiaGy/4ZZl1iHQsxF69N4WaDLl8An
 G/oqy0Zjb1C4pID1RY3jB+kdqRIZD+o0keoSxM2eIt9qcZXIQUHoGNuBXxrHWYis
 OGxuGci5Vr6IF3KOL3KG08at9JVwFiQRKRebOWn7eCiT8iTqyujHGh2HxBvRvZxq
 KXMqanTjbbwmv1vl+yMPYwuPPpcMTOxOhhBuT4L0TqYMi2dlnA8BP+YIIZFsOxbg
 LSJUZn1to9TTkjNCW4q3fTkrlgcBL9MGnQtzAgDzdvnwDqVG7cWYhsYSvxh7hpTN
 4EUtoqLKgjI=
 =s9EA
 -----END PGP SIGNATURE-----

Merge tag 'iio-fixes-for-5.4a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus

Jonathan writes:

First set of IIO fixes for the 5.4 cycle.

* adis16400
  - Make sure to free memory on a few failure paths.
* adxl372
  - Fix wrong fifo depth
  - Fix wrong indexing of data from the fifo.
  - Perform a reset at startup to avoid a problem with inconsistent state.
* axp288
  - This is a fix for a fix.  The original fix made sure we kept the
    configuration from some firmwares to preserve a bias current.
    Unfortunately it appears the previous behaviour was working around
    a buggy firmware by overwriting the wrong value it had.  Hence
    a regression was seen.
* bmc150
  - Fix the centre temperature.  This was due to an error in one of the
    datasheets.
* hx711
  - Fix an issue where a badly timed interrupt could lead to a control
    line being high long enough to put the device into a low power state.
* meson_sar_adc
  - Fix a case where the irq was enabled before everything it uses was
    allocated.
* st_lsm6dsx
  - Ensure we don't set the sensor sensitivity to 0 as it will force
    all readings to 0.
  - Fix a wait time for the slave i2c controller when the accelerometer
    is not enabled.
* stm32-adc
  - Precursor for fix. Move a set of register definitions to a header.
  - Fix a race when several ADCs are in use with some using interrupts
    to control the dataflow and some using DMA.
* vcnl4000
  - Fix a garbage of_match_table in which a string was passed instead
    of the intended enum.

* tag 'iio-fixes-for-5.4a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio:
  iio: Fix an undefied reference error in noa1305_probe
  iio: light: opt3001: fix mutex unlock race
  iio: adc: ad799x: fix probe error handling
  iio: light: add missing vcnl4040 of_compatible
  iio: light: fix vcnl4000 devicetree hooks
  iio: imu: st_lsm6dsx: fix waitime for st_lsm6dsx i2c controller
  iio: adc: axp288: Override TS pin bias current for some models
  iio: imu: adis16400: fix memory leak
  iio: imu: adis16400: release allocated memory on failure
  iio: adc: stm32-adc: fix a race when using several adcs with dma and irq
  iio: adc: stm32-adc: move registers definitions
  iio: accel: adxl372: Perform a reset at start up
  iio: accel: adxl372: Fix push to buffers lost samples
  iio: accel: adxl372: Fix/remove limitation for FIFO samples
  iio: adc: hx711: fix bug in sampling of data
  iio: fix center temperature of bmc150-accel-core
  iio: imu: st_lsm6dsx: forbid 0 sensor sensitivity
  iio: adc: meson_saradc: Fix memory allocation order
2019-10-10 11:18:37 +02:00
Marco Felsch c62dd44901 iio: adc: ad799x: fix probe error handling
Since commit 0f7ddcc1bf ("iio:adc:ad799x: Write default config on probe
and reset alert status on probe") the error path is wrong since it
leaves the vref regulator on. Fix this by disabling both regulators.

Fixes: 0f7ddcc1bf ("iio:adc:ad799x: Write default config on probe and reset alert status on probe")
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
Reviewed-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-10-09 19:11:29 +01:00
Hans de Goede 972917419a iio: adc: axp288: Override TS pin bias current for some models
Since commit 9bcf15f75c ("iio: adc: axp288: Fix TS-pin handling") we
preserve the bias current set by the firmware at boot.  This fixes issues
we were seeing on various models, but it seems our old hardcoded 80ųA bias
current was working around a firmware bug on at least one model laptop.

In order to both have our cake and eat it, this commit adds a dmi based
list of models where we need to override the firmware set bias current and
adds the one model we now know needs this to it: The Lenovo Ideapad 100S
(11 inch version).

Fixes: 9bcf15f75c ("iio: adc: axp288: Fix TS-pin handling")
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=203829
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-10-09 19:11:27 +01:00
Fabrice Gasnier dcb1092017 iio: adc: stm32-adc: fix a race when using several adcs with dma and irq
End of conversion may be handled by using IRQ or DMA. There may be a
race when two conversions complete at the same time on several ADCs.
EOC can be read as 'set' for several ADCs, with:
- an ADC configured to use IRQs. EOCIE bit is set. The handler is normally
  called in this case.
- an ADC configured to use DMA. EOCIE bit isn't set. EOC triggers the DMA
  request instead. It's then automatically cleared by DMA read. But the
  handler gets called due to status bit is temporarily set (IRQ triggered
  by the other ADC).
So both EOC status bit in CSR and EOCIE control bit must be checked
before invoking the interrupt handler (e.g. call ISR only for
IRQ-enabled ADCs).

Fixes: 2763ea0585 ("iio: adc: stm32: add optional dma support")

Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-10-09 19:11:26 +01:00
Fabrice Gasnier 31922f62bb iio: adc: stm32-adc: move registers definitions
Move STM32 ADC registers definitions to common header.
This is precursor patch to:
- iio: adc: stm32-adc: fix a race when using several adcs with dma and irq

It keeps registers definitions as a whole block, to ease readability and
allow simple access path to EOC bits (readl) in stm32-adc-core driver.

Fixes: 2763ea0585 ("iio: adc: stm32: add optional dma support")

Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-10-09 19:11:26 +01:00
Andreas Klinger 4043ecfb5f iio: adc: hx711: fix bug in sampling of data
Fix bug in sampling function hx711_cycle() when interrupt occures while
PD_SCK is high. If PD_SCK is high for at least 60 us power down mode of
the sensor is entered which in turn leads to a wrong measurement.

Switch off interrupts during a PD_SCK high period and move query of DOUT
to the latest point of time which is at the end of PD_SCK low period.

This bug exists in the driver since it's initial addition. The more
interrupts on the system the higher is the probability that it happens.

Fixes: c3b2fdd0ea ("iio: adc: hx711: Add IIO driver for AVIA HX711")
Signed-off-by: Andreas Klinger <ak@it-klinger.de>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-10-09 19:11:25 +01:00
Linus Torvalds e6874fc294 Staging/IIO driver patches for 5.4-rc1
Here is the big staging/iio driver update for 5.4-rc1.
 
 Lots of churn here, with a few driver/filesystems moving out of staging
 finally:
 	- erofs moved out of staging
 	- greybus core code moved out of staging
 
 Along with that, a new filesytem has been added:
 	- extfat
 to provide support for those devices requiring that filesystem (i.e.
 transfer devices to/from windows systems or printers.)
 
 Other than that, there a number of new IIO drivers, and lots and lots
 and lots of staging driver cleanups and minor fixes as people continue
 to dig into those for easy changes.
 
 All of these have been in linux-next for a while with no reported
 issues.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 
 iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCXYIW0g8cZ3JlZ0Brcm9h
 aC5jb20ACgkQMUfUDdst+ynJgwCgt22YQdsWRrOuJnZp3xpFq/ZSMWAAn0dAgFf5
 SlSTI2nQhbW7jjdShrPR
 =Ra09
 -----END PGP SIGNATURE-----

Merge tag 'staging-5.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

Pull staging and IIO driver updates from Greg KH:
 "Here is the big staging/iio driver update for 5.4-rc1.

  Lots of churn here, with a few driver/filesystems moving out of
  staging finally:

     - erofs moved out of staging

     - greybus core code moved out of staging

  Along with that, a new filesytem has been added:

     - extfat

  to provide support for those devices requiring that filesystem (i.e.
  transfer devices to/from windows systems or printers)

  Other than that, there a number of new IIO drivers, and lots and lots
  and lots of staging driver cleanups and minor fixes as people continue
  to dig into those for easy changes.

  All of these have been in linux-next for a while with no reported
  issues"

* tag 'staging-5.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (453 commits)
  Staging: gasket: Use temporaries to reduce line length.
  Staging: octeon: Avoid several usecases of strcpy
  staging: vhciq_core: replace snprintf with scnprintf
  staging: wilc1000: avoid twice IRQ handler execution for each single interrupt
  staging: wilc1000: remove unused interrupt status handling code
  staging: fbtft: make several arrays static const, makes object smaller
  staging: rtl8188eu: make two arrays static const, makes object smaller
  staging: rtl8723bs: core: Remove Macro "IS_MAC_ADDRESS_BROADCAST"
  dt-bindings: anybus-controller: move to staging/ tree
  staging: emxx_udc: remove local TRUE/FALSE definition
  staging: wilc1000: look for rtc_clk clock
  staging: dt-bindings: wilc1000: add optional rtc_clk property
  staging: nvec: make use of devm_platform_ioremap_resource
  staging: exfat: drop unused function parameter
  Staging: exfat: Avoid use of strcpy
  staging: exfat: use integer constants
  staging: exfat: cleanup spacing for casts
  staging: exfat: cleanup spacing for operators
  staging: rtl8723bs: hal: remove redundant variable n
  staging: pi433: Fix typo in documentation
  ...
2019-09-18 11:05:34 -07:00
Remi Pommarel de10ac4759 iio: adc: meson_saradc: Fix memory allocation order
meson_saradc's irq handler uses priv->regmap so make sure that it is
allocated before the irq get enabled.

This also fixes crash when CONFIG_DEBUG_SHIRQ is enabled, as device
managed resources are freed in the inverted order they had been
allocated, priv->regmap was freed before the spurious fake irq that
CONFIG_DEBUG_SHIRQ adds called the handler.

Fixes: 3af109131b ("iio: adc: meson-saradc: switch from polling to interrupt mode")
Reported-by: Elie Roudninski <xademax@gmail.com>
Signed-off-by: Remi Pommarel <repk@triplefau.lt>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Tested-by: Elie ROUDNINSKI <xademax@gmail.com>
Reviewed-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-09-08 12:30:32 +01:00
Greg Kroah-Hartman 74eb9c06b1 Second set of new device support, cleanups and features for IIO in the 5.4 cycle
Revised pull request to fix up a missing Signed-off-by and roll in
 a fix in the lsm9ds1 support after I broke it when applying.
 Revised again because the fix changed a hash meaning a fix
 that previously followed it now had the wrong fixes tag.
 
 A few fixes in here that could have gone a faster path but aren't quite
 worth the rush for 5.3.
 
 New device support
 * ad7606
   - Support the ad7606b which adds a software controlled mode alongside
     the pin controlled only approach of the ad7606. Including dt-bindings.
 * lsm6dsx
   - Add support for the gyro and accelerometer part of the lsm9ds1 which is
     a compound device also including a magnetometer (st_sensors driver).
     Includes bindings and precursor rework of the driver.
 
 Features
 * ad7192
   - Add support for low pass filter control.
   - DT binding docs.
 
 Cleanups and minor fixes
 * MAINTAINERS
   - Fix a typo in a path.
   - Add entry for ad7606
 * ad5380
   - Fix a failure to dereference a pointer before atempting to assign the
     value.
 * ad7192
   - Drop platform data as not used in mainline and we now have full DT bindings.
 * ad7606
   - YAML conversion for dt-bindings.
 * adis16240
   - Rework write_raw to make it more readable using GENMASK.
 * adis16460
   - Fix and issue with an unsigned variable holding potential negatives.
 * cros_ec
   - Fix missing default of calibration vector so that we get 'something'
     before calibration is complete on a given axis.
 * hid-sensors
   - Use int_pow instead of opencoding.
 * isl29501
   - rename dt-binding docs to include renesas inline with other renesas parts
     and general current convention.
 * kxcjk1013
   - Improve comments on the 'unusual' ACPI ids used to identify which sensor
     is which in certain laptops.
 * lsm6dsx
   - Add one bit to the fifo status masks for a number of parts.
   - Drop a reserved entry from the sensitivity values to tidy up interface.
   - Use core conversion macro from G to m/s^2 for lsm9ds1 to make it easier
     to relate to the datasheet and consistent with other parts supported.
 * max1027
   - Use device managed APIs to avoid manual error handling and cleanup.
 * rfd77402
   - Typo in Kconfig help.
 * sc27xx
   - Switch to polling mode from interrupts as interrupt handling typically
     to slow for very short sleeps.
 * st-sensors
   - Fix some missing selects for regmap.
 * tools
   - Add a .gitignore containing the binary outputs.
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCAAvFiEEbilms4eEBlKRJoGxVIU0mcT0FogFAl1uyTgRHGppYzIzQGtl
 cm5lbC5vcmcACgkQVIU0mcT0Foideg//fknN/aM40zRZlClkWx9XqUsByS/3XUAl
 dZL//5DGh566D8/auBeacQxt6SzOFRpj2XwWI/K8mGJi39y9LFOywOn4dDgOBh3x
 VWe/1eCNFg9Y1eMCXncYHBtxxobuV3UKEjVtYFtzg210HP/KM6C3fWdPTpmj1zNZ
 PYSnKGiBGxeJHMCUjN0QweifIRvTy0MLkxPc9CUHcFq0XiMD2enI4TwHYuZ/CNQw
 oisDPPksbPTW5R547vLEnQe/p16MtoFMX57yehbzKIp6qYBEVR+D5ne5kxct8x80
 Ma7YVWLyWTxYF/MwLi3felIniEeyYhgTFVhy2rhZGt6eKDmNFTwTrJG5iTweeHQm
 3FJPbZ04lDjE3RhoETGDc2aSqY5/Xy1nnOJcMjZ1twbDxPGmN2/rCP3YxYRmGL/P
 VCsCZYeQF6cKi7FyFiViqALTPH0k/Ebklol1f/IG8CuFCs8r/m6kKMeSJX3+miHZ
 gIxA2lX5uj8FIiB1bZxORN76W5PzxLji5IiCPy1KtlBin3E3oWM3nQLXNHpzp2Fw
 5A8IyHb/qDoKnO1MlTkprIxdIzKqV4gtWqkY1kTBYyNyreMP/dsiw/lC1rnzWMm/
 v7JHuTbO/Ay5gvT58goK7FD77CyvRTvy3bmi7PNkWJyogWpnRTLiPusMDz7FwxK4
 Ffrbi7+qijk=
 =rPVR
 -----END PGP SIGNATURE-----

Merge tag 'iio-for-5.4b-take3' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next

Jonathan writes:

Second set of new device support, cleanups and features for IIO in the 5.4 cycle

Revised pull request to fix up a missing Signed-off-by and roll in
a fix in the lsm9ds1 support after I broke it when applying.
Revised again because the fix changed a hash meaning a fix
that previously followed it now had the wrong fixes tag.

A few fixes in here that could have gone a faster path but aren't quite
worth the rush for 5.3.

New device support
* ad7606
  - Support the ad7606b which adds a software controlled mode alongside
    the pin controlled only approach of the ad7606. Including dt-bindings.
* lsm6dsx
  - Add support for the gyro and accelerometer part of the lsm9ds1 which is
    a compound device also including a magnetometer (st_sensors driver).
    Includes bindings and precursor rework of the driver.

Features
* ad7192
  - Add support for low pass filter control.
  - DT binding docs.

Cleanups and minor fixes
* MAINTAINERS
  - Fix a typo in a path.
  - Add entry for ad7606
* ad5380
  - Fix a failure to dereference a pointer before atempting to assign the
    value.
* ad7192
  - Drop platform data as not used in mainline and we now have full DT bindings.
* ad7606
  - YAML conversion for dt-bindings.
* adis16240
  - Rework write_raw to make it more readable using GENMASK.
* adis16460
  - Fix and issue with an unsigned variable holding potential negatives.
* cros_ec
  - Fix missing default of calibration vector so that we get 'something'
    before calibration is complete on a given axis.
* hid-sensors
  - Use int_pow instead of opencoding.
* isl29501
  - rename dt-binding docs to include renesas inline with other renesas parts
    and general current convention.
* kxcjk1013
  - Improve comments on the 'unusual' ACPI ids used to identify which sensor
    is which in certain laptops.
* lsm6dsx
  - Add one bit to the fifo status masks for a number of parts.
  - Drop a reserved entry from the sensitivity values to tidy up interface.
  - Use core conversion macro from G to m/s^2 for lsm9ds1 to make it easier
    to relate to the datasheet and consistent with other parts supported.
* max1027
  - Use device managed APIs to avoid manual error handling and cleanup.
* rfd77402
  - Typo in Kconfig help.
* sc27xx
  - Switch to polling mode from interrupts as interrupt handling typically
    to slow for very short sleeps.
* st-sensors
  - Fix some missing selects for regmap.
* tools
  - Add a .gitignore containing the binary outputs.

* tag 'iio-for-5.4b-take3' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (27 commits)
  iio: imu: st_lsm6dsx: rely on IIO_G_TO_M_S_2 for gain definition for LSM9DS1
  iio: imu: st_lsm6dsx: remove invalid gain value for LSM9DS1
  iio: cros_ec: set calibscale for 3d MEMS to unit vector
  iio: dac: ad5380: fix incorrect assignment to val
  iio: imu: st_lsm6dsx: Fix FIFO diff mask for tagged fifo
  dt-bindings: iio: imu: st_lsm6dsx: add lsm9ds1 device bindings
  iio: imu: st_lsm6dsx: add support for accel/gyro unit of lsm9ds1
  iio: imu: st_lsm6dsx: move register definitions to sensor_settings struct
  iio: imu: st_lsm6dsx: introduce update_fifo function pointer
  dt-bindings: iio: light: isl29501: Rename bindings documentation file
  Kconfig: Fix the reference to the RFD77402 ToF sensor in the 'help' section
  iio: st_sensors: Fix build error
  dt-bindings: iio: adc: Add AD7606B ADC documentation
  dt-bindings: iio: adc: Migrate AD7606 documentation to yaml
  MAINTAINERS: Add Beniamin Bia for AD7606 driver
  iio: adc: ad7606: Add support for AD7606B ADC
  tools: iio: add .gitignore
  iio: adc: sc27xx: Change to polling mode to read data
  iio: hid-sensor-attributes: Convert to use int_pow()
  iio: adc: max1027: Use device-managed APIs
  ...
2019-09-03 22:27:46 +02:00
Guenter Roeck 2c9d5b5e32 hwmon: Remove ads1015 driver
A driver for ADS1015 with more functionality is available in the iio
subsystem.

Remove the hwmon driver as duplicate. If the chip is used for hardware
monitoring, the iio->hwmon bridge should be used.

Cc: Dirk Eibach <eibach@gdsys.de>
Link: https://lore.kernel.org/r/1562004758-13025-1-git-send-email-linux@roeck-us.net
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2019-09-03 12:47:17 -07:00
Stefan Popa d2a415c86c iio: adc: ad7606: Add support for AD7606B ADC
The AD7606B is a 16-bit ADC that supports simultaneous sampling of 8
channels. It is pin compatible to AD7606, but adds extra modes by
writing to the register map.

The AD7606B can be configured to work in software mode by setting all
oversampling pins to high. This mode is selected by default.
The oversampling ratio is configured from the OS_MODE register (address
0x08) with the addition of OS=128 and OS=256 that were not available in
hardware mode.

The device is configured to output data on a single spi channel, but this
configuration must be done right after restart. That is why the delay was
removed for devices which doesn't require it.

Moreover, in software mode, the range gpio has no longer its function.
Instead, the scale can be configured individually for each channel from
the RANGE_CH registers (address 0x03 to 0x06). Besides the already
supported ±10 V and ±5 V ranges, software mode can also accommodate the
±2.5 V range.

Signed-off-by: Stefan Popa <stefan.popa@analog.com>
Co-developed-by: Beniamin Bia <beniamin.bia@analog.com>
Signed-off-by: Beniamin Bia <beniamin.bia@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-08-25 16:11:00 +01:00
Greg Kroah-Hartman c6d6832ce3 Merge 5.3-rc5 into staging-next
We need the staging fixes in here as well.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-19 07:13:42 +02:00
Freeman Liu 8de877d2bb iio: adc: sc27xx: Change to polling mode to read data
On Spreadtrum platform, the headphone will read one ADC channel multiple
times to identify the headphone type, and the headphone identification is
sensitive of the ADC reading time. And we found it will take longer time
to reading ADC data by using interrupt mode comparing with the polling
mode, thus we should change to polling mode to improve the efficiency
of reading data, which can identify the headphone type successfully.

Signed-off-by: Freeman Liu <freeman.liu@unisoc.com>
Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-08-18 20:26:47 +01:00
Chuhong Yuan 2715a28105 iio: adc: max1027: Use device-managed APIs
Use device-managed APIs to simplify the code.

Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-08-18 20:16:46 +01:00
Greg Kroah-Hartman 6aed51d891 First set of new device support, features and cleanups for IIO in the 5.4 cycle
Note includes a merge from i3c tree to get support needed for stm_lsm6dsx driver
 support for l3c devices.  Done from immutable branch.
 
 A counter subsystem patche in here as well.
 
 Alongside the new device support (which is always good), Chuhong's work
 on using devres managed APIs has cleaned up a number of drivers.
 
 New device support
 * adis16460
   - New driver based on ADIS framework which needed addition of support
     for cs_change_delay. Includes device tree binding.
 * cros_ec
   - Support fo the veyron-minnie which uses an older interface.
 * lsm6dsx
   - Support for LSM6DSTR-C gyro + magnetometer sensor (new IDs mainly)
   - Support for ISM330DHCX acc + gyro sensor (extensive rework needed!)
 * Maxim 5432
   - New driver support MAX5432-MAX5435 family of potentiometers.
 * noa1305
   - New driver for this ON Semiconductor Ambient light sensor.
 
 Features and cleanups
 * tree wide
   - Drop error prints after platform_get_irq as already prints errors
     internally if any occur.
 * docs
   - Document mounting matrix.
   - Fix a missing newline at end of file.
 * ad2s1210
   - Switch to device managed APIs for all of probe and drop explicit remove.
 * ad7192
   - Add of_device_id array to explicity handling DT bindings.
 * ad7606
   - Lots of rework leading to support for software configure modes in ad7616
     parts.
   - Debugfs register access support.
 * am2315
   - Switch to device managed APIs for all of probe and drop explicit remove.
 * apds9960
   - Typo in module description.
 * cm36651
   - Convert to i2c_new_dummy_device.
   - Swithc to device managed APIs for all of probe adn drop explicit remove.
 * cros_ec
   - Calibscale support for accel, gyro and magnetometer.
   - Tidy up some error codes to return the error from the stack rather than
     -EIO.
   - Determine protocol version.
   - Add a sign vector to the core to fix sensor rotation if necessary.
     Cannot just be done with mount matrix as already in use in many devices.
   - Tidy up INFO_SCALE being in both the separate and shared lists.
   - Drop a lot of dplicate code from the cros-ec-accel-legacy driver
     and use the core provided code instead.
   - Make frequency range available to userspace.
 * counter / ftm-quaddec
   - Switch to device managed APIs for all of probe adn drop explicit remove.
 * hdc100x
   - Switch to device managed APIs for all of probe and drop explicit remove.
 * hi8435
   - Use gpiod_set_value_cansleep as we don't care here and there is a
     board out there where it needs to sleep.
   - Switch to device managed APIs for all of probe and drop explict remove.
 * hp03
   - Convert to i2c_new_dummy_device.
 * maxim thermocouple
   - Switch to device managed APIs for all of probe and drop explicit remove.
 * mmc35240
   - Fix typo in constant naming.
 * mpu6050
   - Use devm_add_action_or_reset in place of explicit error handling.
   - Make text in Kconfig more explicit about which parts are supported.
 * mxc4005
   - Switch to device managed APIs for all of probe and drop explicit remove.
 * pms7003
   - Convert device tree bindings to yaml.
   - Add a MAINTAINERS entry
 * sc27xx
   - Introduce a local struct device *dev pointer to avoid lots of deref.
   - Use devm_add_action_or_reset in place of explicit error handling.
 * sca3000
   - Typo fix in naming.
 * si1145
   - Switch to device managed APIs for all of probe and drop explicit remove.
 * st_sensors
   - Lots of rework to enable switch to regmap.
   - Regmap conversion at the end.
   - Tidy up some inconsistencies in buffer setup ops.
   - Tidy up an oddity by dropping get_irq_data_ready function in favour
     of direct access.
   - Stop allocating buffer in buffer enable in favour of just embedding
     a large enough constant size buffer in the iio_priv accessed structure.
 * st_lsm6dsx
   - l3c device support (LSM6DSO and LSM6DSR)
   - tidy up irq return logic which was strangely written.
   - fix up an ABI quirk where this driver used separate scale
     attributes, even though they were always shared by type.
 * stk33xx
   - Device tree bindings include manufacturer ID.
 * stm32-adc
   - Add control for supply to analog switches including DT bindings.
 * stm32 timer
   - Drop the quadrature mode support.  Believed there were no users so
     take this opportunity to drop this unwanted ABI.
 * tsl2772
   - Switch to device mangage APIs for all of probe and drop explicit remove.
   - Use regulator_bulk_* APIs to reduce repitition.
 * veml6070
   - Convert to i2c_new_dummy_device.
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCAAvFiEEbilms4eEBlKRJoGxVIU0mcT0FogFAl1RxVQRHGppYzIzQGtl
 cm5lbC5vcmcACgkQVIU0mcT0FohP8xAAjbWf431vsHQSt0Lmn4coh0XCBT26R9ys
 ybIga540Mcy1q91H+biBenShLVImCBtXEBJ57YdVjtLgkr1HJAJjvxCXdE79TJet
 Ak39CmTcTGrRyzYin2MOpWJJgCFc4Fg+E/kB8K7KIcperzQ48GDCzL5aJE/PksME
 Ay/rZDno+vPKGLmvxYCuSpmINq1YhVMQu/IPYO5sc6zRdDtEV29TAdZ/x8aaD2oM
 r1E22hm0h2wVLQRpbLUA5XUgoetQGmIYaUgbJPkpvxhuQYIlbLavODP7S0xDqAbT
 VCRzrzeR8eHxA+EeZDE8IWC5xbmFTUBdUHhHfCDETONOi5CjaPC/QnowNOi1IC0H
 k5XgBAO6Zju5QWpu+nHVdjwdJ1RftLVeCPatXorHLWWJv6UP8j/cNNKDAvBTlvhq
 yfG/zW1VMTr/Q2VkokHnr2D8JxcARf/+AcR1BOu+pVszJ/+kgnXVNu3QLMilCTnN
 +fzEfbErL7BfUBh19IqdB40XOojppuavyzAruiOjLGVrFRk3lwFP8FvVDy8MtPbO
 /roYxohwc1M/kK3+Sl+4LfY2mX7orStZ5NNAYcu9yzg/6vv3Oh5Pxw2UsDto4MCC
 ikDffzIGxXnJUzi3uIBthyvTHMX2y/EykikbjMkfsGOtCiFdcPGUl4iirsWkpebj
 zrpff+V1vXM=
 =aez5
 -----END PGP SIGNATURE-----

Merge tag 'iio-for-5.4a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next

Jonathan writes:

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

Note includes a merge from i3c tree to get support needed for stm_lsm6dsx driver
support for l3c devices.  Done from immutable branch.

A counter subsystem patche in here as well.

Alongside the new device support (which is always good), Chuhong's work
on using devres managed APIs has cleaned up a number of drivers.

New device support
* adis16460
  - New driver based on ADIS framework which needed addition of support
    for cs_change_delay. Includes device tree binding.
* cros_ec
  - Support fo the veyron-minnie which uses an older interface.
* lsm6dsx
  - Support for LSM6DSTR-C gyro + magnetometer sensor (new IDs mainly)
  - Support for ISM330DHCX acc + gyro sensor (extensive rework needed!)
* Maxim 5432
  - New driver support MAX5432-MAX5435 family of potentiometers.
* noa1305
  - New driver for this ON Semiconductor Ambient light sensor.

Features and cleanups
* tree wide
  - Drop error prints after platform_get_irq as already prints errors
    internally if any occur.
* docs
  - Document mounting matrix.
  - Fix a missing newline at end of file.
* ad2s1210
  - Switch to device managed APIs for all of probe and drop explicit remove.
* ad7192
  - Add of_device_id array to explicity handling DT bindings.
* ad7606
  - Lots of rework leading to support for software configure modes in ad7616
    parts.
  - Debugfs register access support.
* am2315
  - Switch to device managed APIs for all of probe and drop explicit remove.
* apds9960
  - Typo in module description.
* cm36651
  - Convert to i2c_new_dummy_device.
  - Swithc to device managed APIs for all of probe adn drop explicit remove.
* cros_ec
  - Calibscale support for accel, gyro and magnetometer.
  - Tidy up some error codes to return the error from the stack rather than
    -EIO.
  - Determine protocol version.
  - Add a sign vector to the core to fix sensor rotation if necessary.
    Cannot just be done with mount matrix as already in use in many devices.
  - Tidy up INFO_SCALE being in both the separate and shared lists.
  - Drop a lot of dplicate code from the cros-ec-accel-legacy driver
    and use the core provided code instead.
  - Make frequency range available to userspace.
* counter / ftm-quaddec
  - Switch to device managed APIs for all of probe adn drop explicit remove.
* hdc100x
  - Switch to device managed APIs for all of probe and drop explicit remove.
* hi8435
  - Use gpiod_set_value_cansleep as we don't care here and there is a
    board out there where it needs to sleep.
  - Switch to device managed APIs for all of probe and drop explict remove.
* hp03
  - Convert to i2c_new_dummy_device.
* maxim thermocouple
  - Switch to device managed APIs for all of probe and drop explicit remove.
* mmc35240
  - Fix typo in constant naming.
* mpu6050
  - Use devm_add_action_or_reset in place of explicit error handling.
  - Make text in Kconfig more explicit about which parts are supported.
* mxc4005
  - Switch to device managed APIs for all of probe and drop explicit remove.
* pms7003
  - Convert device tree bindings to yaml.
  - Add a MAINTAINERS entry
* sc27xx
  - Introduce a local struct device *dev pointer to avoid lots of deref.
  - Use devm_add_action_or_reset in place of explicit error handling.
* sca3000
  - Typo fix in naming.
* si1145
  - Switch to device managed APIs for all of probe and drop explicit remove.
* st_sensors
  - Lots of rework to enable switch to regmap.
  - Regmap conversion at the end.
  - Tidy up some inconsistencies in buffer setup ops.
  - Tidy up an oddity by dropping get_irq_data_ready function in favour
    of direct access.
  - Stop allocating buffer in buffer enable in favour of just embedding
    a large enough constant size buffer in the iio_priv accessed structure.
* st_lsm6dsx
  - l3c device support (LSM6DSO and LSM6DSR)
  - tidy up irq return logic which was strangely written.
  - fix up an ABI quirk where this driver used separate scale
    attributes, even though they were always shared by type.
* stk33xx
  - Device tree bindings include manufacturer ID.
* stm32-adc
  - Add control for supply to analog switches including DT bindings.
* stm32 timer
  - Drop the quadrature mode support.  Believed there were no users so
    take this opportunity to drop this unwanted ABI.
* tsl2772
  - Switch to device mangage APIs for all of probe and drop explicit remove.
  - Use regulator_bulk_* APIs to reduce repitition.
* veml6070
  - Convert to i2c_new_dummy_device.

* tag 'iio-for-5.4a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (84 commits)
  iio: hi8435: Drop hi8435_remove() by using devres for remaining elements
  iio: hi8435: Use gpiod_set_value_cansleep()
  iio:st_sensors: remove buffer allocation at each buffer enable
  iio: imu: inv_mpu6050: be more explicit on supported chips
  iio: light: noa1305: Add support for NOA1305
  dt-bindings: Add binding document for NOA1305
  iio: remove get_irq_data_ready() function pointer and use IRQ number directly
  iio: imu: st_lsm6dsx: make IIO_CHAN_INFO_SCALE shared by type
  iio: tsl2772: Use regulator_bulk_() APIs
  iio: tsl2772: Use devm_iio_device_register
  iio: tsl2772: Use devm_add_action_or_reset for tsl2772_chip_off
  iio: tsl2772: Use devm_add_action_or_reset
  iio: Remove dev_err() usage after platform_get_irq()
  iio: light: si1145: Use device-managed APIs
  iio:pressure: preenable/postenable/predisable fixup for ST press buffer
  iio:magn: preenable/postenable/predisable fixup for ST magn buffer
  iio:gyro: preenable/postenable/predisable fixup for ST gyro buffer
  iio:accel: preenable/postenable/predisable fixup for ST accel buffer
  dt-bindings: iio: imu: st_lsm6dsx: add ism330dhcx device bindings
  iio: imu: st_lsm6dsx: add support to ISM330DHCX
  ...
2019-08-12 22:52:44 +02:00
Andrey Smirnov ef19ee60f9 iio: hi8435: Drop hi8435_remove() by using devres for remaining elements
Convert the remainder of hi8435_probe() to use devres and get rid of
hi8435_remove().

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Cc: linux-kernel@vger.kernel.org
Cc: linux-iio@vger.kernel.org
Cc: Chris Healy <cphealy@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-08-11 09:59:38 +01:00
Andrey Smirnov 6822dc9daa iio: hi8435: Use gpiod_set_value_cansleep()
Use gpiod_set_value_cansleep() instead of gpiod_set_value() to support
the case when reset pin is connected to a GPIO expander. See ZII VF610
SCU4 AIB for one such example.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Cc: linux-kernel@vger.kernel.org
Cc: linux-iio@vger.kernel.org
Cc: Jonathan Cameron <jic23@kernel.org>
Cc: Chris Healy <cphealy@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-08-11 09:46:13 +01:00
Jacopo Mondi b9ddd50911 iio: adc: max9611: Fix temperature reading in probe
The max9611 driver reads the die temperature at probe time to validate
the communication channel. Use the actual read value to perform the test
instead of the read function return value, which was mistakenly used so
far.

The temperature reading test was only successful because the 0 return
value is in the range of supported temperatures.

Fixes: 69780a3bbc ("iio: adc: Add Maxim max9611 ADC driver")
Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-08-05 17:42:24 +01:00
Stephen Boyd 7c279229f9 iio: Remove dev_err() usage after platform_get_irq()
We don't need dev_err() messages when platform_get_irq() fails now that
platform_get_irq() prints an error message itself when something goes
wrong. Let's remove these prints with a simple semantic patch.

// <smpl>
@@
expression ret;
struct platform_device *E;
@@

ret =
(
platform_get_irq(E, ...)
|
platform_get_irq_byname(E, ...)
);

if ( \( ret < 0 \| ret <= 0 \) )
{
(
-if (ret != -EPROBE_DEFER)
-{ ...
-dev_err(...);
-... }
|
...
-dev_err(...);
)
...
}
// </smpl>

While we're here, remove braces on if statements that only have one
statement (manually).

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
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-08-05 15:59:14 +01:00
Beniamin Bia a444fa597e iio: adc: ad7606: Add debug mode for ad7616
Support for register access was added for devices which have software
mode.

Signed-off-by: Beniamin Bia <beniamin.bia@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-07-28 08:56:45 +01:00
Beniamin Bia f2a22e1e17 iio: adc: ad7606: Add support for software mode for ad7616
Support for ad7616 running in software was added. In order
to activate the software mode, HW_RNGSEL pins must be pulled low.
Oversampling and input ranges are now configured in corresponding
registers. Ad7616 has multiple scale options when it is configured
in software mode.
Also, in order to support multiple devices in software mode, the spi
calculation of registers address must be generic. Because
the length of address and bit which specifies the read/write operation is
different for every device, calculation of address was made generic.

Signed-off-by: Beniamin Bia <beniamin.bia@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-07-28 08:56:08 +01:00
Beniamin Bia c5d93137af iio: adc: ad7606: Allow reconfigration after reset
According to datasheet, ad7616 require at least 15ms after a restart
to fully reconfigure and being able to receive new commands via spi.

Signed-off-by: Beniamin Bia <beniamin.bia@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-07-28 08:54:32 +01:00
Beniamin Bia a0c648c07c iio: adc: ad7606: Move spi dependent features to spi file
Because software mode and register access are only available in spi, they
were moved in spi file and are accessbile via bops structure.
The write_os/scale will be overwritten by sw_mode_config function.
This patch was made in order to support devices in software mode without
making the driver dependent to spi and increase the abstraction of the
core.

Signed-off-by: Beniamin Bia <beniamin.bia@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-07-28 08:53:59 +01:00
Beniamin Bia 7677f73158 iio: adc: ad7606: Move common channel definition to header
The common channel definition which are going to be used by both core
file but also spi file, were moved in header file. Some devices have
different channel definitions when are used in software mode, feature
available only with spi, and those definitions will be added in spi file.

Signed-off-by: Beniamin Bia <beniamin.bia@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-07-28 08:53:18 +01:00
Arnd Bergmann 90c6260c19 iio: adc: gyroadc: fix uninitialized return code
gcc-9 complains about a blatant uninitialized variable use that
all earlier compiler versions missed:

drivers/iio/adc/rcar-gyroadc.c:510:5: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized]

Return -EINVAL instead here and a few lines above it where
we accidentally return 0 on failure.

Cc: stable@vger.kernel.org
Fixes: 059c53b323 ("iio: adc: Add Renesas GyroADC driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-07-27 21:56:59 +01:00
Fabrice Gasnier 3a81bde545 iio: adc: stm32-adc: add analog switches supply control
On stm32h7 and stm32mp1, the ADC inputs are multiplexed with analog
switches which have reduced performances when their supply is below 2.7V
(vdda by default):
- 3.3V embedded booster can be used, to get full ADC performances
  (increases power consumption).
- vdd supply can be selected if above 2.7V by setting ANASWVDD syscfg bit,
  on STM32MP1 only.

Make this optional, since this is a trade-off between analog performance
and power consumption.

Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-07-27 20:11:16 +01:00
Fuqian Huang 46916ded76 iio: adc: sc27xx: Replace devm_add_action() followed by failure action with devm_add_action_or_reset()
devm_add_action_or_reset() is introduced as a helper function which
internally calls devm_add_action(). If devm_add_action() fails
then it will execute the action mentioned and return the error code.
This reduce source code size (avoid writing the action twice)
and reduce the likelyhood of bugs.

Signed-off-by: Fuqian Huang <huangfq.daxian@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-07-27 20:11:14 +01:00
Fuqian Huang a0b4dddaa1 iio: adc: sc27xx: Introduce local variable 'struct device *dev'
Introduce local variable 'struct device *dev' and use it instead of
dereferencing it repeatly.

Signed-off-by: Fuqian Huang <huangfq.daxian@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-07-27 20:11:14 +01:00
Maarten ter Huurne 5a304e1a4e IIO: Ingenic JZ47xx: Set clock divider on probe
The SADC component can run at up to 8 MHz on JZ4725B, but is fed
a 12 MHz input clock (EXT). Divide it by two to get 6 MHz, then
set up another divider to match, to produce a 10us clock.

If the clock dividers are left on their power-on defaults (a divider
of 1), the SADC mostly works, but will occasionally produce erroneous
readings. This led to button presses being detected out of nowhere on
the RS90 every few minutes. With this change, no ghost button presses
were logged in almost a day worth of testing.

The ADCLK register for configuring clock dividers doesn't exist on
JZ4740, so avoid writing it there.

A function has been introduced rather than a flag because there is a lot
of variation between the ADCLK registers on JZ47xx SoCs, both in
the internal layout of the register and in the frequency range
supported by the SADC. So this solution should make it easier
to add support for other JZ47xx SoCs later.

Fixes: 1a78daea10 ("iio: adc: probe should set clock divider")
Signed-off-by: Maarten ter Huurne <maarten@treewalker.org>
Signed-off-by: Artur Rojek <contact@artur-rojek.eu>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-07-14 16:02:08 +01:00
Joe Perches ae8cc91a7d iio: adc: max9611: Fix misuse of GENMASK macro
Arguments are supposed to be ordered high then low.

Signed-off-by: Joe Perches <joe@perches.com>
Fixes: 69780a3bbc ("iio: adc: Add Maxim max9611 ADC driver")
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-07-14 12:53:28 +01:00
Greg Kroah-Hartman c55cc97a25 Second set of IIO device support, features, cleanups and minor fixes for 5.3.
A few bits for the counters subsystem mixed in here as well.
 There are some late breaking fixes as well, which aren't so urgent
 they can't wait for the merge window.
 
 New Device Support
 * adf4371
   - New driver + bindings.
   - Support the adf4372 PLL. Mostly ID and bindings.
 * ad8366 (note includes rework of driver needed to allow support for these).
   - Support the ADL5240 variable gain amplifier (VGA).
   - Support the ADA4961 digital gain amplifier (DGA).
 * dps310
   - New driver, in several parts from different authors for this temp
     and pressure sensor.
   - Includes errata workaround for a temperature reading issue.
 * stk3310
   - Support the stk3335, mostly ID.
 
 Features and cleanups
 * core
   - drop error handling on debugfs registration.
   - harden by making sure we don't overrun iio_chan_info_postfix.
 * docs
   - convert remaining docs to rst. At somepoint we'll fit these few
     into the main IIO docs.
   - improve sampling_frequency_available docs but explaining the
     range form.
 * ad_sigma_delta
   - Drop a pointless goto.
 * ad2s1210
   - Drop pointless platform data null check seeing as we don't actually
     use platform data anymore.
 * ad7124
   - Relax limitation on channel numbers to allow pseudo different channels.
   - Support control of whether the input is buffered via DT.
   - Use dynamic allocation for channel configuration to make it easier
     to support new devices.
   - YAML binding conversion.
 * ad7150
   - Comment tidy up.
   - Consistent and simple if (ret) handling of i2c errors.
   - FIELD_GET and GENMASK.
   - Ternary rather than !!(condition) for readability.
   - Use macros to avoid repetition of channel definitions.
 * ad7606
   - Add software channel config (rather that pin controlled)
   - Refactor to simplify addition of new part in future.
 * ad7746
   - of_deivce_id table.
 * ad7780
   - MAINTAINERS entry
   - YAML DT bindings.
 * ad8366
   - Stop using core mlock in favour of well scoped local lock.
   - SPDX + copyright date update.
 * ad9834
   - of_device_id table
 * adf4371
   - Add support for output stage muting before lock on has occured.
 * adis library
   - MAINTAINERS entry to reflect that this now Alexandru's problem ;)
 * adis162xx:
   - Fix a slightly incorrect set of comments and print statements on
     minimum supported voltage.
 * adis16203
   - of_device_id table.
 * adis16240
   - Add of_device_id table (in two parts as first patch only used it for
     MODULE_DEVICE_TABLE.)
 * adt7316-spi
   - of_device_id table
 * adxl372
   - YAML DT binding conversion.
   - Cleanup use of buffer callback functions (precursor to core rework).
 * bh1710
   - Simplify getting the i2c adapter from the client.
 * dht11
   - Mote to newer GPIO consumer interface.
 * kxcjk-1013.c
   - Add binding for sensor in display of some ultrabooks after userspace
     tools updated for it not be a problem to report two similar sensors.
 * imx7d
   - drop unused variables.
   - white space
   - define instead of variable for clock frequency that is fixed.
   - drop pointless error message.
 * messon_saradc
   - SPDX
 * sps30
   - MAINTAINERS entry
   - YAML binding conversion.
 * st_accel
   - Tidy up ordering in various buffer related callbacks. This is
     part of a long running effort to simplify the core code.
 * stm32-dfsdm:
   - Manage the resolution cleanly in triggerd modes.
   - Add fast mode support which allows more flexible filter choices.
   - Add a comment on the reason for a 16 bit record when technically
     not 'required'.
 * st_lsm6dsx
   - Embed device name in the sensor_settings struct as i3c doesn't
     have a convenient name field to use for this.
 * xilinx-adc
   - Relax constraints on supported platforms to reflect that this
     can used with FPGAs on PCIe cards and hence many architectures.
 * counters/ftm-quaddec
   - Fix some formatting io MODULE_AUTHOR
   - MAINTAINERS entry
 
 Fixes
 * tools
   - fix incorrect handling of 32 bit channels.
 * sca3000
   - Potential endian bug that is unlikely to bite anyone (be64 host
     seems unlikely for this old part).
 * stm32-adc
   - Add vdda-supply. On some boards it needs to be turned on to supply
     the ADC.  DT bindings included.
 * stm32-dfsdm
   - Fix output resolution to work with filter orders other than 3.
   - Fix output datatype as it's signed and previously claimed not to be.
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCAAvFiEEbilms4eEBlKRJoGxVIU0mcT0FogFAl0VHIkRHGppYzIzQGtl
 cm5lbC5vcmcACgkQVIU0mcT0FojyxhAAgrLRy2wlHjQCAh0S6J22LKs02uPX1qvY
 nm1aI/av2DGcMCV2NF6J1sW2Mocvtt5a79/1f/wRqDzOHBrTpFr0Q0Ngwijv9bzc
 fv6NwfHlWolmXynKx8wK4b6Sa3KVCkltojEVpEVbhkuMkafSQ+pQzYF1Uf7enOrX
 j3Gq6NYaCks4YtFZsBphgzo3DC0mh7CfunlPiOdVcgcg4Pj/KZY9QCX86fJx972x
 YI3BRFHnDSMDOxOTjeqeKvMiqU2zLPlqLSEOCUw2XCrh6HI9qFiU+LVsYx6SP0tx
 aJ2q+qYc9raOTANHk7O2JZYWv/52JXvtKcFSLiuQdABjaAI20xEr1QAZYVYUiXmg
 dFH6lBsWvQyAy5F/SyZ5tavZvTfGsNDB5LhlpEggeO2W6cIIL4CLfHimB2EcxFSH
 utqEA72HQZosEUKut1jbmG6iYMiRnHS72pLOqkJ6HC/2/pZfoEWlEH9x/S3xbBsW
 918ISs9852VwjebQwck96+Dh0LwiKOl8Aii5ONzfNObJB6/JbULPoKKArsMdENQA
 mqDXLOMz6GspY3JgiVDCXAwg2x2Ht/ictR6svRJtOTLiBU2Iybpm/HRkPePhoePF
 HLw8fhwE+mOSWr22KhzjUJBHEAkoejo/14XOgKSTkO9V6amLlOWRDV3uK2PksmdI
 7DQyYhX9Tos=
 =a3vh
 -----END PGP SIGNATURE-----

Merge tag 'iio-for-5.3b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next

Jonathan writes:

Second set of IIO device support, features, cleanups and minor fixes for 5.3.

A few bits for the counters subsystem mixed in here as well.
There are some late breaking fixes as well, which aren't so urgent
they can't wait for the merge window.

New Device Support
* adf4371
  - New driver + bindings.
  - Support the adf4372 PLL. Mostly ID and bindings.
* ad8366 (note includes rework of driver needed to allow support for these).
  - Support the ADL5240 variable gain amplifier (VGA).
  - Support the ADA4961 digital gain amplifier (DGA).
* dps310
  - New driver, in several parts from different authors for this temp
    and pressure sensor.
  - Includes errata workaround for a temperature reading issue.
* stk3310
  - Support the stk3335, mostly ID.

Features and cleanups
* core
  - drop error handling on debugfs registration.
  - harden by making sure we don't overrun iio_chan_info_postfix.
* docs
  - convert remaining docs to rst. At somepoint we'll fit these few
    into the main IIO docs.
  - improve sampling_frequency_available docs but explaining the
    range form.
* ad_sigma_delta
  - Drop a pointless goto.
* ad2s1210
  - Drop pointless platform data null check seeing as we don't actually
    use platform data anymore.
* ad7124
  - Relax limitation on channel numbers to allow pseudo different channels.
  - Support control of whether the input is buffered via DT.
  - Use dynamic allocation for channel configuration to make it easier
    to support new devices.
  - YAML binding conversion.
* ad7150
  - Comment tidy up.
  - Consistent and simple if (ret) handling of i2c errors.
  - FIELD_GET and GENMASK.
  - Ternary rather than !!(condition) for readability.
  - Use macros to avoid repetition of channel definitions.
* ad7606
  - Add software channel config (rather that pin controlled)
  - Refactor to simplify addition of new part in future.
* ad7746
  - of_deivce_id table.
* ad7780
  - MAINTAINERS entry
  - YAML DT bindings.
* ad8366
  - Stop using core mlock in favour of well scoped local lock.
  - SPDX + copyright date update.
* ad9834
  - of_device_id table
* adf4371
  - Add support for output stage muting before lock on has occured.
* adis library
  - MAINTAINERS entry to reflect that this now Alexandru's problem ;)
* adis162xx:
  - Fix a slightly incorrect set of comments and print statements on
    minimum supported voltage.
* adis16203
  - of_device_id table.
* adis16240
  - Add of_device_id table (in two parts as first patch only used it for
    MODULE_DEVICE_TABLE.)
* adt7316-spi
  - of_device_id table
* adxl372
  - YAML DT binding conversion.
  - Cleanup use of buffer callback functions (precursor to core rework).
* bh1710
  - Simplify getting the i2c adapter from the client.
* dht11
  - Mote to newer GPIO consumer interface.
* kxcjk-1013.c
  - Add binding for sensor in display of some ultrabooks after userspace
    tools updated for it not be a problem to report two similar sensors.
* imx7d
  - drop unused variables.
  - white space
  - define instead of variable for clock frequency that is fixed.
  - drop pointless error message.
* messon_saradc
  - SPDX
* sps30
  - MAINTAINERS entry
  - YAML binding conversion.
* st_accel
  - Tidy up ordering in various buffer related callbacks. This is
    part of a long running effort to simplify the core code.
* stm32-dfsdm:
  - Manage the resolution cleanly in triggerd modes.
  - Add fast mode support which allows more flexible filter choices.
  - Add a comment on the reason for a 16 bit record when technically
    not 'required'.
* st_lsm6dsx
  - Embed device name in the sensor_settings struct as i3c doesn't
    have a convenient name field to use for this.
* xilinx-adc
  - Relax constraints on supported platforms to reflect that this
    can used with FPGAs on PCIe cards and hence many architectures.
* counters/ftm-quaddec
  - Fix some formatting io MODULE_AUTHOR
  - MAINTAINERS entry

Fixes
* tools
  - fix incorrect handling of 32 bit channels.
* sca3000
  - Potential endian bug that is unlikely to bite anyone (be64 host
    seems unlikely for this old part).
* stm32-adc
  - Add vdda-supply. On some boards it needs to be turned on to supply
    the ADC.  DT bindings included.
* stm32-dfsdm
  - Fix output resolution to work with filter orders other than 3.
  - Fix output datatype as it's signed and previously claimed not to be.

* tag 'iio-for-5.3b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (68 commits)
  iio: iio-utils: Fix possible incorrect mask calculation
  iio: frequency: adf4371: Add support for output stage mute
  dt-bindings: iio: frequency: Add ADF4372 PLL documentation
  iio: frequency: adf4371: Add support for ADF4372 PLL
  dt-bindings: iio: adc: Add buffered input property
  Convert AD7124 bindings documentation to YAML format.
  iio: adc: ad7124: Shift to dynamic allocation for channel configuration
  iio: adc: ad7124: Add buffered input support
  iio: adc: ad7124: Remove input number limitation
  MAINTAINERS: add ADIS IMU driver library entry
  iio: adis162xx: fix low-power docs & reports
  counter/ftm-quaddec: Add missing '>' in MODULE_AUTHOR
  iio: core: no need to check return value of debugfs_create functions
  docs: iio: convert to ReST
  iio: adc: stm32-adc: add missing vdda-supply
  dt-bindings: iio: adc: stm32: add missing vdda supply
  iio: adc: stm32-dfsdm: add comment for 16 bits record
  iio: adc: stm32-dfsdm: add fast mode support
  iio: adc: stm32-dfsdm: manage data resolution in trigger mode
  iio: adc: stm32-dfsdm: fix data type
  ...
2019-07-01 10:58:13 +02:00
Mircea Caprioru 1478a388f4 iio: adc: ad7124: Shift to dynamic allocation for channel configuration
This patch changes the channel configuration member of the device
structure from a fixed size array to a dynamic allocated one with a size
equal to the number of channels specified in the device tree. This will
ensure a more flexibility for compatible devices.

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

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

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

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

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

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

Signed-off-by: Mircea Caprioru <mircea.caprioru@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-06-26 21:24:21 +01:00
Greg Kroah-Hartman 90b45399b4 Merge 5.2-rc6 into staging-next
We want the fixes and this resolves a merge issue as well.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-23 13:29:03 +02:00
Fabrice Gasnier 7685010fca iio: adc: stm32-adc: add missing vdda-supply
Add missing vdda-supply, analog power supply, to STM32 ADC. When vdda is
an independent supply, it needs to be properly turned on or off to supply
the ADC.

Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Fixes: 1add698802 ("iio: adc: Add support for STM32 ADC core").
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-06-22 10:37:26 +01:00
Olivier Moysan 18eaffab90 iio: adc: stm32-dfsdm: add comment for 16 bits record
Add a comment on DMA configuration for 16 bits record.

Signed-off-by: Olivier Moysan <olivier.moysan@st.com>
Acked-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-06-22 10:32:43 +01:00
Olivier Moysan d716204fd5 iio: adc: stm32-dfsdm: add fast mode support
The use of fast mode allows to get a larger set of solution
for filter parameters. This can be useful to reach a better
output sample resolution, when fast mode can be used.

Fast mode is selected at startup if it is relevant.
The startup is performed in postenable callback context,
where there are too tight time constraints for filter parameters
computation. For this reason both fast and non fast filter parameters
are pre-computed previously.

Signed-off-by: Olivier Moysan <olivier.moysan@st.com>
Acked-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-06-22 10:29:19 +01:00
Olivier Moysan 102afde629 iio: adc: stm32-dfsdm: manage data resolution in trigger mode
Add output sample resolution management in scan mode.
Add stm32_dfsdm_process_data() function to share sample
processing between continuous and trigger modes.

Signed-off-by: Olivier Moysan <olivier.moysan@st.com>
Acked-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-06-22 10:23:53 +01:00
Olivier Moysan c6013bf50e iio: adc: stm32-dfsdm: fix data type
Fix the data type as DFSDM raw output is complements 2,
24bits left aligned in a 32-bit register.
This change does not affect AUDIO path
- Set data as signed for IIO (as for AUDIO)
- Set 8 bit right shift for IIO.
The 8 LSBs bits of data contains channel info and are masked.

Signed-off-by: Olivier Moysan <olivier.moysan@st.com>
Fixes: e2e6771c64 ("IIO: ADC: add STM32 DFSDM sigma delta ADC support")
Acked-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-06-22 10:20:21 +01:00
Olivier Moysan 12c8398d80 iio: adc: stm32-dfsdm: fix output resolution
In buffered mode, output samples are shifted left
unconditionally. This works for filter order 3,
but this shift is not adapted for other filter orders.
Compute required shift, left or right, and shift
output data accordingly.
Add also saturation management to avoid wrap-around
when maximum positive sample is reached.

Signed-off-by: Olivier Moysan <olivier.moysan@st.com>
Fixes: eca949800d ("IIO: ADC: add stm32 DFSDM support for PDM microphone")
Acked-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-06-22 10:18:51 +01:00
Thomas Gleixner d2912cb15b treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500
Based on 2 normalized pattern(s):

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license version 2 as
  published by the free software foundation

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license version 2 as
  published by the free software foundation #

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-only

has been chosen to replace the boilerplate/reference in 4122 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Enrico Weigelt <info@metux.net>
Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Reviewed-by: Allison Randal <allison@lohutok.net>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-19 17:09:55 +02:00
Thomas Gleixner cb849fc5f0 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 459
Based on 1 normalized pattern(s):

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license version 2 as
  published by the free software foundation the gpl this program is
  distributed in the hope that it will be useful but without any
  warranty without even the implied warranty of merchantability or
  fitness for a particular purpose see the gnu general public license
  version 2 gplv2 for more details you should have received a copy of
  the gnu general public license version 2 gplv2 along with this
  source code

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-only

has been chosen to replace the boilerplate/reference in 16 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Enrico Weigelt <info@metux.net>
Reviewed-by: Allison Randal <allison@lohutok.net>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190604081201.771169395@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-19 17:09:09 +02:00
Robert Hancock 8bb0d36cba iio: adc: xilinx: support all platforms
Since the XADC logic can be used with standalone Xilinx FPGAs, this
driver can potentially be used with many different platforms, not just
the Zynq and MicroBlaze platforms this driver was allowed to be built
for. There should be no platform-specific code in this driver, so just
delete the platform dependency.

Signed-off-by: Robert Hancock <hancock@sedsystems.ca>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-06-17 21:06:49 +01:00
Alexandru Ardelean 387c1d7706 iio: ad_sigma_delta: return directly in ad_sd_buffer_postenable()
There is nothing being done after the `err_predisable` label, so just
remove it.

Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-06-17 21:06:48 +01:00
Fabio Estevam 9f3bf94f65 iio: imx7d_adc: Remove unneeded 'average_en' member
average_en is always true, so there is not really need for
this structure member.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-06-17 21:06:44 +01:00
Fabio Estevam f5d2f9c293 iio: imx7d_adc: Fit into a single line
All the parameters of devm_request_irq() can fit into a
single line, so place them all in a single line
for better readability.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-06-17 21:06:44 +01:00
Fabio Estevam 9ce92da84f iio: imx7d_adc: Introduce a definition for the input clock
Since the input clock is always 24MHz, there is no need for storing
this value into a variable.

Use a definition instead, which is more appropriate in this case.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-06-17 21:06:44 +01:00
Fabio Estevam fe93116459 iio: imx7d_adc: Remove unneeded error message
In case of ioremap failure, the core code will take care of printing
the error message, so there is no need for having a local error
message in the driver.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-06-17 21:06:44 +01:00
Beniamin Bia 3c23e9e808 iio: adc: ad7606: Add software configuration
Because this driver will support multiple configurations for software,
the software configuration was made generic.

Signed-off-by: Beniamin Bia <beniamin.bia@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-06-16 16:45:22 +01:00
Beniamin Bia 88dd031350 iio: adc: ad7606: Move oversampling and scale options to chip info
The device dependent options which are going to be different for devices
which will be supported  in the future by this driver,
were moved in chip info for a more generic driver. This patch allows
supporting more devices by the driver. Also, it is an intermediate
step of adding support for ad7616 in software mode.

Signed-off-by: Beniamin Bia <beniamin.bia@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-06-16 16:45:22 +01:00
Neil Armstrong 47dd8378f9 iio: adc: meson_saradc: update with SPDX Licence identifier
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-06-16 16:45:21 +01:00
Thomas Gleixner 3c910ecbdd treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 446
Based on 1 normalized pattern(s):

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license version 2 as
  published by the free software foundation you should have received a
  copy of the gnu general public license along with this program if
  not see http www gnu org licenses

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-only

has been chosen to replace the boilerplate/reference in 30 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Allison Randal <allison@lohutok.net>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190531190115.962665879@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-05 17:37:18 +02:00
Thomas Gleixner b886d83c5b treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441
Based on 1 normalized pattern(s):

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license as published by
  the free software foundation version 2 of the license

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-only

has been chosen to replace the boilerplate/reference in 315 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Allison Randal <allison@lohutok.net>
Reviewed-by: Armijn Hemel <armijn@tjaldur.nl>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190531190115.503150771@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-05 17:37:17 +02:00
Thomas Gleixner 75a6faf617 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 422
Based on 1 normalized pattern(s):

  this program is free software you can redistribute it and or modify
  it under the terms and conditions of the gnu general public license
  version 2 as published by the free software foundation

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-only

has been chosen to replace the boilerplate/reference in 101 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Allison Randal <allison@lohutok.net>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190531190113.822954939@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-05 17:37:15 +02:00
Thomas Gleixner a10e763b87 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 372
Based on 1 normalized pattern(s):

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license as published by
  the free software foundation version 2

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-only

has been chosen to replace the boilerplate/reference in 135 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Allison Randal <allison@lohutok.net>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190531081036.435762997@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-05 17:37:10 +02:00
Thomas Gleixner 2b27bdcc20 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 336
Based on 1 normalized pattern(s):

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license version 2 as
  published by the free software foundation this program is
  distributed in the hope that it will be useful but without any
  warranty without even the implied warranty of merchantability or
  fitness for a particular purpose see the gnu general public license
  for more details you should have received a copy of the gnu general
  public license along with this program if not write to the free
  software foundation inc 51 franklin st fifth floor boston ma 02110
  1301 usa

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-only

has been chosen to replace the boilerplate/reference in 246 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Alexios Zavras <alexios.zavras@intel.com>
Reviewed-by: Allison Randal <allison@lohutok.net>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190530000436.674189849@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-05 17:37:07 +02:00
Thomas Gleixner 36edc93958 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 330
Based on 1 normalized pattern(s):

  this file is subject to the terms and conditions of version 2 of the
  gnu general public license see the file copying in the main
  directory of this archive for more details

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-only

has been chosen to replace the boilerplate/reference in 55 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Allison Randal <allison@lohutok.net>
Reviewed-by: Alexios Zavras <alexios.zavras@intel.com>
Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190530000436.108941081@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-05 17:37:06 +02:00
Thomas Gleixner 2025cf9e19 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 288
Based on 1 normalized pattern(s):

  this program is free software you can redistribute it and or modify
  it under the terms and conditions of the gnu general public license
  version 2 as published by the free software foundation this program
  is distributed in the hope it will be useful but without any
  warranty without even the implied warranty of merchantability or
  fitness for a particular purpose see the gnu general public license
  for more details

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-only

has been chosen to replace the boilerplate/reference in 263 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Allison Randal <allison@lohutok.net>
Reviewed-by: Alexios Zavras <alexios.zavras@intel.com>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190529141901.208660670@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-05 17:36:37 +02:00
Thomas Gleixner 8e8e69d67e treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 285
Based on 1 normalized pattern(s):

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license as published by
  the free software foundation version 2 of the license this program
  is distributed in the hope that it will be useful but without any
  warranty without even the implied warranty of merchantability or
  fitness for a particular purpose see the gnu general public license
  for more details

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-only

has been chosen to replace the boilerplate/reference in 100 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Alexios Zavras <alexios.zavras@intel.com>
Reviewed-by: Allison Randal <allison@lohutok.net>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190529141900.918357685@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-05 17:36:37 +02:00
Thomas Gleixner 97fb5e8d9b treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 284
Based on 1 normalized pattern(s):

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license version 2 and
  only version 2 as published by the free software foundation this
  program is distributed in the hope that it will be useful but
  without any warranty without even the implied warranty of
  merchantability or fitness for a particular purpose see the gnu
  general public license for more details

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-only

has been chosen to replace the boilerplate/reference in 294 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Allison Randal <allison@lohutok.net>
Reviewed-by: Alexios Zavras <alexios.zavras@intel.com>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190529141900.825281744@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-05 17:36:37 +02:00
Thomas Gleixner 9c92ab6191 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 282
Based on 1 normalized pattern(s):

  this software is licensed under the terms of the gnu general public
  license version 2 as published by the free software foundation and
  may be copied distributed and modified under those terms this
  program is distributed in the hope that it will be useful but
  without any warranty without even the implied warranty of
  merchantability or fitness for a particular purpose see the gnu
  general public license for more details

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-only

has been chosen to replace the boilerplate/reference in 285 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Alexios Zavras <alexios.zavras@intel.com>
Reviewed-by: Allison Randal <allison@lohutok.net>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190529141900.642774971@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-05 17:36:37 +02:00
Thomas Gleixner 3e5580c465 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 253
Based on 1 normalized pattern(s):

  license gplv2

and 1 additional normalized pattern(s):

  this program is free software you can redistribute it and or modify it
  under the terms and conditions of the gnu general public license version
  2 as published by the free software foundation this program is
  distributed in the hope it will be useful but without any warranty
  without even the implied warranty of merchantability or fitness for a
  particular purpose see the gnu general public license for more details

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-only

has been chosen to replace the boilerplate/reference in 5 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Richard Fontana <rfontana@redhat.com>
Reviewed-by: Allison Randal <allison@lohutok.net>
Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Reviewed-by: Steve Winslow <swinslow@gmail.com>
Reviewed-by: Alexios Zavras <alexios.zavras@intel.com>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190529141332.723143934@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-05 17:30:27 +02:00
Greg Kroah-Hartman 23004ec330 Merge 5.2-rc3 into staging-next
We need the staging fixes in here as well.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-03 07:27:16 +02:00
Linus Torvalds 2f4c533499 SPDX update for 5.2-rc3, round 1
Here is another set of reviewed patches that adds SPDX tags to different
 kernel files, based on a set of rules that are being used to parse the
 comments to try to determine that the license of the file is
 "GPL-2.0-or-later" or "GPL-2.0-only".  Only the "obvious" versions of
 these matches are included here, a number of "non-obvious" variants of
 text have been found but those have been postponed for later review and
 analysis.
 
 There is also a patch in here to add the proper SPDX header to a bunch
 of Kbuild files that we have missed in the past due to new files being
 added and forgetting that Kbuild uses two different file names for
 Makefiles.  This issue was reported by the Kbuild maintainer.
 
 These patches have been out for review on the linux-spdx@vger mailing
 list, and while they were created by automatic tools, they were
 hand-verified by a bunch of different people, all whom names are on the
 patches are reviewers.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 
 iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCXPCHLg8cZ3JlZ0Brcm9h
 aC5jb20ACgkQMUfUDdst+ykxyACgql6ktH+Tv8Ho1747kKPiFca1Jq0AoK5HORXI
 yB0DSTXYNjMtH41ypnsZ
 =x2f8
 -----END PGP SIGNATURE-----

Merge tag 'spdx-5.2-rc3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core

Pull yet more SPDX updates from Greg KH:
 "Here is another set of reviewed patches that adds SPDX tags to
  different kernel files, based on a set of rules that are being used to
  parse the comments to try to determine that the license of the file is
  "GPL-2.0-or-later" or "GPL-2.0-only". Only the "obvious" versions of
  these matches are included here, a number of "non-obvious" variants of
  text have been found but those have been postponed for later review
  and analysis.

  There is also a patch in here to add the proper SPDX header to a bunch
  of Kbuild files that we have missed in the past due to new files being
  added and forgetting that Kbuild uses two different file names for
  Makefiles. This issue was reported by the Kbuild maintainer.

  These patches have been out for review on the linux-spdx@vger mailing
  list, and while they were created by automatic tools, they were
  hand-verified by a bunch of different people, all whom names are on
  the patches are reviewers"

* tag 'spdx-5.2-rc3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (82 commits)
  treewide: Add SPDX license identifier - Kbuild
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 225
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 224
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 223
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 222
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 221
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 220
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 218
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 217
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 216
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 215
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 214
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 213
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 211
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 210
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 209
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 207
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 206
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 203
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 201
  ...
2019-05-31 08:34:32 -07:00
Linus Torvalds 2209a3055d Staging/IIO driver fixes for 5.2-rc3
Here are some Staging and IIO driver fixes to resolve some reported
 problems for 5.2-rc3.
 
 Nothing major here, just some tiny changes, full details are in the
 shortlog.
 
 All have been in linux-next for a while with no reported issues.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 
 iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCXPCE/w8cZ3JlZ0Brcm9h
 aC5jb20ACgkQMUfUDdst+ylLwQCdFRL6v7IHdGYQ6cAk/tjOcyYY0IEAoNRAdZU7
 n/JfHbtKvS7VpYzPzRvO
 =LjTj
 -----END PGP SIGNATURE-----

Merge tag 'staging-5.2-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

Pull staging and IIO driver fixes from Greg KH:
 "Here are some Staging and IIO driver fixes to resolve some reported
  problems for 5.2-rc3.

  Nothing major here, just some tiny changes, full details are in the
  shortlog.

  All have been in linux-next for a while with no reported issues"

* tag 'staging-5.2-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
  staging: kpc2000: Add dependency on MFD_CORE to kconfig symbol 'KPC2000'
  staging: wilc1000: Fix some double unlock bugs in wilc_wlan_cleanup()
  staging: vc04_services: prevent integer overflow in create_pagelist()
  Staging: vc04_services: Fix a couple error codes
  staging: wlan-ng: fix adapter initialization failure
  staging: kpc2000: double unlock in error handling in kpc_dma_transfer()
  staging: kpc2000: Fix build error without CONFIG_UIO
  staging: kpc2000: fix build error on xtensa
  staging: erofs: set sb->s_root to NULL when failing from __getname()
  iio: adc: ti-ads8688: fix timestamp is not updated in buffer
  iio: dac: ds4422/ds4424 fix chip verification
  iio: imu: mpu6050: Fix FIFO layout for ICM20602
  iio: adc: ads124: avoid buffer overflow
  iio: adc: modify NPCM ADC read reference voltage
2019-05-31 08:31:45 -07:00
Thomas Gleixner fda8d26e61 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 177
Based on 1 normalized pattern(s):

  licensed under the gpl 2

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-only

has been chosen to replace the boilerplate/reference in 135 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Allison Randal <allison@lohutok.net>
Reviewed-by: Richard Fontana <rfontana@redhat.com>
Reviewed-by: Alexios Zavras <alexios.zavras@intel.com>
Reviewed-by: Steve Winslow <swinslow@gmail.com>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190528170026.071193225@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-30 11:29:19 -07:00
Thomas Gleixner 1802d0beec treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174
Based on 1 normalized pattern(s):

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license version 2 as
  published by the free software foundation this program is
  distributed in the hope that it will be useful but without any
  warranty without even the implied warranty of merchantability or
  fitness for a particular purpose see the gnu general public license
  for more details

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-only

has been chosen to replace the boilerplate/reference in 655 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Allison Randal <allison@lohutok.net>
Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Reviewed-by: Richard Fontana <rfontana@redhat.com>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190527070034.575739538@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-30 11:26:41 -07:00
Thomas Gleixner c942fddf87 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157
Based on 3 normalized pattern(s):

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license as published by
  the free software foundation either version 2 of the license or at
  your option any later version this program is distributed in the
  hope that it will be useful but without any warranty without even
  the implied warranty of merchantability or fitness for a particular
  purpose see the gnu general public license for more details

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license as published by
  the free software foundation either version 2 of the license or at
  your option any later version [author] [kishon] [vijay] [abraham]
  [i] [kishon]@[ti] [com] this program is distributed in the hope that
  it will be useful but without any warranty without even the implied
  warranty of merchantability or fitness for a particular purpose see
  the gnu general public license for more details

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license as published by
  the free software foundation either version 2 of the license or at
  your option any later version [author] [graeme] [gregory]
  [gg]@[slimlogic] [co] [uk] [author] [kishon] [vijay] [abraham] [i]
  [kishon]@[ti] [com] [based] [on] [twl6030]_[usb] [c] [author] [hema]
  [hk] [hemahk]@[ti] [com] this program is distributed in the hope
  that it will be useful but without any warranty without even the
  implied warranty of merchantability or fitness for a particular
  purpose see the gnu general public license for more details

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-or-later

has been chosen to replace the boilerplate/reference in 1105 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Allison Randal <allison@lohutok.net>
Reviewed-by: Richard Fontana <rfontana@redhat.com>
Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190527070033.202006027@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-30 11:26:37 -07:00
Thomas Gleixner 2874c5fd28 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152
Based on 1 normalized pattern(s):

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license as published by
  the free software foundation either version 2 of the license or at
  your option any later version

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-or-later

has been chosen to replace the boilerplate/reference in 3029 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Allison Randal <allison@lohutok.net>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190527070032.746973796@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-30 11:26:32 -07:00
Thomas Gleixner 80503b23b2 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 149
Based on 1 normalized pattern(s):

  licensed under the gpl 2 or later

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-or-later

has been chosen to replace the boilerplate/reference in 82 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Allison Randal <allison@lohutok.net>
Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Reviewed-by: Richard Fontana <rfontana@redhat.com>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190524100845.150836982@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-30 11:25:18 -07:00
Thomas Gleixner c51cb3f554 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 71
Based on 1 normalized pattern(s):

  licensed under the gplv2 or later

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-or-later

has been chosen to replace the boilerplate/reference in 5 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Richard Fontana <rfontana@redhat.com>
Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Reviewed-by: Allison Randal <allison@lohutok.net>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190520071859.659568621@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-24 17:36:47 +02:00
Thomas Gleixner 74ba9207e1 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 61
Based on 1 normalized pattern(s):

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license as published by
  the free software foundation either version 2 of the license or at
  your option any later version this program is distributed in the
  hope that it will be useful but without any warranty without even
  the implied warranty of merchantability or fitness for a particular
  purpose see the gnu general public license for more details you
  should have received a copy of the gnu general public license along
  with this program if not write to the free software foundation inc
  675 mass ave cambridge ma 02139 usa

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-or-later

has been chosen to replace the boilerplate/reference in 441 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
Reviewed-by: Richard Fontana <rfontana@redhat.com>
Reviewed-by: Allison Randal <allison@lohutok.net>
Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190520071858.739733335@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-24 17:36:45 +02:00
Thomas Gleixner ec8f24b7fa treewide: Add SPDX license identifier - Makefile/Kconfig
Add SPDX license identifiers to all Make/Kconfig files which:

 - Have no license information of any form

These files fall under the project license, GPL v2 only. The resulting SPDX
license identifier is:

  GPL-2.0-only

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-21 10:50:46 +02:00
Thomas Gleixner 09c434b8a0 treewide: Add SPDX license identifier for more missed files
Add SPDX license identifiers to all files which:

 - Have no license information of any form

 - Have MODULE_LICENCE("GPL*") inside which was used in the initial
   scan/conversion to ignore the file

These files fall under the project license, GPL v2 only. The resulting SPDX
license identifier is:

  GPL-2.0-only

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-21 10:50:45 +02:00
Greg Kroah-Hartman 083a685c2e First set of IIO fixes for the 5.2 cycle.
* ads124
   - Avoid a buffer overrun when setting an array to 0.
 * ads8688
   - Don't use the pollfunc timestamp as it isn't set and would be wrong
     anyway for a device that does sampling on demand.
 * ds4422
   - Fix masking on register used for chip verification. Wrong address
     was being read.
 * mpu6050
   - Fix the fifo layout for ICM20602 to avoid underreading and hence failure
     to move on to the next record in the fifo.
 * NPCM ADC
   - Make sure there is actually a valid regulator before reading its voltage.
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCAAvFiEEbilms4eEBlKRJoGxVIU0mcT0FogFAlzhFEARHGppYzIzQGtl
 cm5lbC5vcmcACgkQVIU0mcT0FojNMg//SCVSRt1KmsRDNdtCyUtgrs2BMISBQ5zP
 XpDvHajk9lPJvt/rbdKNJPC23N0qjV0fIfaMjsN1mTrbeL3JQE7r+17iCJ1EL+dj
 H2BFQlzMN9bPt9wx/VeQnTqPiTuwNpB5/eNb3mfGKGDkKmmfnL0+DDJEQycBgfK7
 gRgX4XGsMYLmKPAJvrQdSvMvu0V8UTAkZNBdcMydhl9Jba9elXPqI5kYFi7pNajD
 09fAGKhkeHd9whRNa2O6wKyRXh+c7regPAMtwjwlmv4dsmRHocYeLQOI05guuKf1
 /+0I+ptOf8RRHGOFX8j7rXua9Q2B+SzXsmoH4RlJLb23Jcqz7/ZDfcAGGVPndlME
 R3vGsYsoSLkmbRkVQ9ygDrzRsNnFKw/pR+u+zKdi/DH3C9EUI5JmRAkJSloElmrr
 VE1ZC7HXxUiKjfZaBLFeuugt65QGfxsGp+UsuFIgg0WQGk7yVWdC8RL9SZUy3wEq
 xFcfiWfbJp/LnVjs6aUBAV8cROswBv/ebcQZgOSPC/j8HyU6xRzmXVt4urBVwKVd
 gr3G+w7JhxCyByXJp7vqFtOmYeHB1X1UY8GNzgxsz9q2A1wtlEsXGpIh/arDY4r9
 toiSQAPAoVRBoLYfj+32EWgPR0iahjE81QZwWAqSzgBmompTQ1ByAyieOC4whgOe
 Lau/nLtAvGU=
 =nq1b
 -----END PGP SIGNATURE-----

Merge tag 'iio-fixes-for-5.2a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus:

Jonathan writes:

First set of IIO fixes for the 5.2 cycle.

* ads124
  - Avoid a buffer overrun when setting an array to 0.
* ads8688
  - Don't use the pollfunc timestamp as it isn't set and would be wrong
    anyway for a device that does sampling on demand.
* ds4422
  - Fix masking on register used for chip verification. Wrong address
    was being read.
* mpu6050
  - Fix the fifo layout for ICM20602 to avoid underreading and hence failure
    to move on to the next record in the fifo.
* NPCM ADC
  - Make sure there is actually a valid regulator before reading its voltage.

* tag 'iio-fixes-for-5.2a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio:
  iio: adc: ti-ads8688: fix timestamp is not updated in buffer
  iio: dac: ds4422/ds4424 fix chip verification
  iio: imu: mpu6050: Fix FIFO layout for ICM20602
  iio: adc: ads124: avoid buffer overflow
  iio: adc: modify NPCM ADC read reference voltage
2019-05-20 09:15:14 +02:00
Chun-Hung Wu 6d97024dce iio: adc: mediatek: mt6577-auxadc, add mt6765 support
1. Add calibrated sample data support
2. Use of_match_table to decide each platform's
   feature set

Signed-off-by: Chun-Hung Wu <chun-hung.wu@mediatek.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-05-19 09:18:30 +01:00
Yangtao Li 5887c83647 iio: adc: sun4i-gpadc-iio convert to SPDX license tags
Updates license to use SPDX-License-Identifier.

Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-05-18 09:55:01 +01:00
Sean Nyekjaer e6d1229831 iio: adc: ti-ads8688: fix timestamp is not updated in buffer
When using the hrtimer iio trigger timestamp isn't updated.
If we use iio_get_time_ns it is updated correctly.

Fixes: 2a86487786 ("iio: adc: ti-ads8688: add trigger and buffer support")
Signed-off-by: Sean Nyekjaer <sean@geanix.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-05-11 12:50:18 +01:00
Philippe Schenker ed1f310ee2 iio: stmpe-adc: Reset possible interrupts
Clear any interrupt that still is on the device on every channel
this driver is activated for in probe and specific channels in
the timeout handler.

Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-05-11 11:18:34 +01:00
Philippe Schenker e813dde6f8 iio: stmpe-adc: Use wait_for_completion_timeout
Use wait_for_completion_timeout instead of
wait_for_completion_interuptible_timeout.

The interruptible variant gets constantly interrupted if a user
program is compiled with the -pg option.
The killable variant was not used due to the fact that a second
program, reading on this device, that gets killed is then also killing
that wait.

Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-05-11 11:15:37 +01:00
Philippe Schenker 4bd44bb2b4 iio: stmpe-adc: Enable all stmpe-adc interrupts just once
This commit will enable the interrupts of all channels handled by this
driver only once in the probe function.

This will improve performance because one byte less has to be written over
i2c on each read out of the adc. On the fastest ADC mode this will improve
read out speed by 15%.

Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-05-11 11:09:02 +01:00
Philippe Schenker 263d21cd5e iio: stmpe-adc: Reinit completion struct on begin conversion
In some cases, the wait_completion got interrupted. This caused the
error-handling to mutex_unlock the function. The before turned on
interrupt then got called anyway. In the ISR then completion() was
called causing wrong adc-values returned in a following adc-readout.

Reinitialise completion struct to make sure the counter is zero
when beginning a new adc-conversion.

Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-05-11 11:00:11 +01:00
Philippe Schenker 2abd293703 iio: stmpe-adc: Add compatible name
Add the compatible name to the driver so it gets loaded when the proper
node in DT is detected.

Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-05-11 10:57:59 +01:00
Philippe Schenker b1f4c9a3c7 iio: stmpe-adc: Remove unnecessary assignment
Remove unnecessary assignment. This could potentially cause an issue, if
the wait function runs into a timeout. Furthermore is this assignment also
not there in stmpe_read_temp()

Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-05-05 16:38:01 +01:00
Geert Uytterhoeven 5c25531d4b iio: adc: rcar-gyroadc: Remove devm_iio_device_alloc() error printing
devm_iio_device_alloc() can only fail due to a memory or IDA allocation
failure.  Hence there is no need to print a message, as the memory
allocation or IIO core code already takes care of that.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-05-05 12:51:07 +01:00
Fabien Dessenne d2fc015696 iio: adc: stm32-dfsdm: missing error case during probe
During probe, check the devm_ioremap_resource() error value.
Also return the devm_clk_get() error value instead of -EINVAL.

Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com>
Acked-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-27 14:09:28 +01:00
Fabien Dessenne 3e53ef91f8 iio: adc: stm32-dfsdm: manage the get_irq error case
During probe, check the "get_irq" error value.

Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com>
Acked-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-27 14:07:51 +01:00
Kefeng Wang e3faedf71d iio: adc: at91: Use dev_get_drvdata()
Using dev_get_drvdata directly.

Cc: Ludovic Desroches <ludovic.desroches@microchip.com>
Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: linux-iio@vger.kernel.org
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-27 13:07:12 +01:00
Greg Kroah-Hartman bf402c08eb Second set of IIO new device support, features and cleanup for the 5.2 cycle.
New device suport
 * ad7606
   - Support the AD7616 16 channel, 12bit ADC.
 * fxas21002c
   - New driver for this gyroscope with I2C and SPI support.
 * lsm6dsx
   - Support the lsm6dsr, new device information structure and dt bindings.
 * srf04
   - Addition device IDs for mb1000, mb1010, mb1020, mb1030 and mb1040 +
     support of different required trigger pulse lengths.
 * st-accel
   - Support the ls2de12, new device info and dt bindings.
 * ti-ads8344
   - New driver for this 8 channel, 16 bit SPI ADC.
 
 Binding conversions to yaml - we have started doing these in general for IIO.
 * avia-hx711
 * bmp085
 
 Cleanups and minor fixes / additions
 * ad5758
   - Fixup for some changes between preproduction parts and final part.
 * ad7606
   - Refactor handling of oversampling to make it easy to vary between
     supported devices.
 * ad9832
   - Organise includes.
   - Clock framework to handle clocks.
 * ad9834
   - Drop unnecessary parenthesis.
 * bmc150
   - Use __func__ rather than hardcoding.
 * dummy_evgen.
   - Fix a memleak on error in probe.
 * kxcjk1013
   - Add KXCJ91008 ACPI ID as seen in the wild.
   - Use __func__ rather than hardcoding.
 * imx7d
   - Local dev variable to simplify code a bit.
   - dev_err replaces pr_err to give more info.
   - devm_platform_ioremap_resource for small reduction in boilerplate.
   - Simplify probe and remove by sharing suspend / resume logic.
   - Devm for iio_device_register as remove only contains the unregister.
 * lsm6dsx
   - Remove a variable that was never read.
   - Open code values where they are effectively described by what is assigned
     to them rather than using uninformative defines.
 * max31856
   - Avoid an unintialized ret variable in a path that can't actually occur
     but is hard for a static checker to know.
 * max9611
   - White space
 * mpu3050
   - Reduce a sleep worst case by switching from msleep to usleep_range.
 * qcom-spmi-adc5
   - Add MODULE_DEVICE_TABLE to assist autoloading of this as a module.
 * stm32-dfsdm
   - Fix missing dependencies.
 * stm32-timer trigger
   - Fix a build issue when disabled.
 * ti-ads7950
   - Fix mising dependency on CONFIG_GPIOLIB.
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCAAvFiEEbilms4eEBlKRJoGxVIU0mcT0FogFAlzAvGYRHGppYzIzQGtl
 cm5lbC5vcmcACgkQVIU0mcT0FoiurRAAtP0JCVyeh1y7xLhJevl7pm3YZ5vdPPNw
 VlaB0zbjH9kJM3KehdZZDxgE+5ZZ66wVCtq4quLb7/kHhHCJ97kPPT1sqdVI/sfQ
 KnwOIJ7JSC+fXxmpBWDyDMvB1NXGWHmNJHAw7SGtJa1/lVdHxPnZ5bMmdfFMadh5
 eNOX5NOxTinafp2sX8M4LPeyOCp2mV4iIUNr14rl2TZruv+xP3Y4N9RTfJDclgCI
 iuK9f6wneSFQ6it48sBE0MGX76az1WvufOEbpl9hWYDoYKl721Yc9WoP2QzTtKMb
 +3Klq/rEMyJjrzm/mu1G/hkPDgnYwsPBAb24b4qSacv70tXlwbwzTEaPu/3avb5r
 22h+fsU61nU1m0GFtNjwwe6p0bm6H3UKHjRaspfq63tEZUUZfRdapmLLTDCRZfcK
 NNRJsqgRvUcqNgR5P/1PBSK+xvp2btgTDy7SrwnrC06RBQ6XY0vq3PpjpTXygH/z
 zbLmNiufIP3k0Z0g2o2PMmHl2tF3ue8LCq4p1FyU1iV8qn7qL40+8LkkZQihDpGT
 i2sMYxexO9qHmm2/GLxrwDTOnLacw2YZRIGthwtVCB8iA1NKkfVCxi1AfasSMJYc
 t5uGmNQKIdXMV0olzflXMoXJ1pTKncTlqKicgWwDeCLUcq4XhobKSoiE5VfCWL+V
 7UBlgLznT/o=
 =McKo
 -----END PGP SIGNATURE-----

Merge tag 'iio-for-5.2b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next

Jonathan writes:

Second set of IIO new device support, features and cleanup for the 5.2 cycle.

New device suport
* ad7606
  - Support the AD7616 16 channel, 12bit ADC.
* fxas21002c
  - New driver for this gyroscope with I2C and SPI support.
* lsm6dsx
  - Support the lsm6dsr, new device information structure and dt bindings.
* srf04
  - Addition device IDs for mb1000, mb1010, mb1020, mb1030 and mb1040 +
    support of different required trigger pulse lengths.
* st-accel
  - Support the ls2de12, new device info and dt bindings.
* ti-ads8344
  - New driver for this 8 channel, 16 bit SPI ADC.

Binding conversions to yaml - we have started doing these in general for IIO.
* avia-hx711
* bmp085

Cleanups and minor fixes / additions
* ad5758
  - Fixup for some changes between preproduction parts and final part.
* ad7606
  - Refactor handling of oversampling to make it easy to vary between
    supported devices.
* ad9832
  - Organise includes.
  - Clock framework to handle clocks.
* ad9834
  - Drop unnecessary parenthesis.
* bmc150
  - Use __func__ rather than hardcoding.
* dummy_evgen.
  - Fix a memleak on error in probe.
* kxcjk1013
  - Add KXCJ91008 ACPI ID as seen in the wild.
  - Use __func__ rather than hardcoding.
* imx7d
  - Local dev variable to simplify code a bit.
  - dev_err replaces pr_err to give more info.
  - devm_platform_ioremap_resource for small reduction in boilerplate.
  - Simplify probe and remove by sharing suspend / resume logic.
  - Devm for iio_device_register as remove only contains the unregister.
* lsm6dsx
  - Remove a variable that was never read.
  - Open code values where they are effectively described by what is assigned
    to them rather than using uninformative defines.
* max31856
  - Avoid an unintialized ret variable in a path that can't actually occur
    but is hard for a static checker to know.
* max9611
  - White space
* mpu3050
  - Reduce a sleep worst case by switching from msleep to usleep_range.
* qcom-spmi-adc5
  - Add MODULE_DEVICE_TABLE to assist autoloading of this as a module.
* stm32-dfsdm
  - Fix missing dependencies.
* stm32-timer trigger
  - Fix a build issue when disabled.
* ti-ads7950
  - Fix mising dependency on CONFIG_GPIOLIB.

* tag 'iio-for-5.2b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (42 commits)
  iio: adc: qcom-spmi-adc5: Fix of-based module autoloading
  iio: dummy_evgen: fix possible memleak in evgen init
  iio:accel:Switch hardcoded function name with a reference to __func__ making the code more maintainable
  iio: adc: stm32-dfsdm: fix triggered buffer build dependency
  iio: adc: stm32-dfsdm: fix unmet direct dependencies detected
  iio: trigger: stm32-timer: fix build issue when disabled
  iio: imx7d_adc: Use devm_iio_device_register()
  iio: imx7d_adc: Simplify imx7d_adc_remove() with imx7d_adc_suspend()
  iio: imx7d_adc: Simplify imx7d_adc_probe() with imx7d_adc_resume()
  drivers/iio/gyro/mpu3050-core.c: This patch fix the following checkpatch warning.
  iio: dac: ad5758: Modifications for new revision
  iio: imu: st_lsm6dsx: inline per-sensor data
  iio: adc: Add driver for the TI ADS8344 A/DC chips
  dt-bindings: iio: adc: Add bindings for TI ADS8344 A/DC chips
  MAINTAINERS: add entry for fxas21002c gyro driver
  iio: gyro: fxas21002c: add spi driver
  iio: gyro: fxas21002c: add i2c driver
  iio: gyro: add core driver for fxas21002c
  iio: gyro: add DT bindings to fxas21002c
  Kconfig: change configuration of srf04 ultrasonic iio sensor
  ...
2019-04-25 10:50:51 +02:00
Bjorn Andersson 447ccb4e08 iio: adc: qcom-spmi-adc5: Fix of-based module autoloading
The of_device_id table needs to be registered as module alias in order
for automatic module loading to pick the kernel module based on the
DeviceTree compatible. So add MODULE_DEVICE_TABLE() to make this happen.

Fixes: e13d757279 ("iio: adc: Add QCOM SPMI PMIC5 ADC driver")
Cc: stable@vger.kernel.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-22 11:51:29 +01:00
Fabrice Gasnier 80696785ea iio: adc: stm32-dfsdm: fix triggered buffer build dependency
This fixes build errors seen when CONFIG_STM32_DFSDM_ADC is set, as
stm32-dfsdm-adc driver now also relies on triggered buffer API:

Fixes: 11646e81d7 ("iio: adc: stm32-dfsdm: add support for buffer modes")

Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-22 11:34:15 +01:00
Fabrice Gasnier ba7ecfe43d iio: adc: stm32-dfsdm: fix unmet direct dependencies detected
This fixes unmet direct dependencies seen when CONFIG_STM32_DFSDM_ADC
is selected:

WARNING: unmet direct dependencies detected for IIO_BUFFER_HW_CONSUMER
  Depends on [n]: IIO [=y] && IIO_BUFFER [=n]
  Selected by [y]:
  - STM32_DFSDM_ADC [=y] && IIO [=y] && (ARCH_STM32 [=y] && OF [=y] ||
    COMPILE_TEST [=n])

Fixes: e2e6771c64 ("IIO: ADC: add STM32 DFSDM sigma delta ADC support")

Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-22 11:34:15 +01:00
Andrey Smirnov 9c6126940d iio: imx7d_adc: Use devm_iio_device_register()
Use devm_iio_device_register() and drop imx7d_adc_remove().

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
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: Chris Healy <cphealy@gmail.com>
Cc: linux-iio@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-22 11:34:14 +01:00
Andrey Smirnov b846676066 iio: imx7d_adc: Simplify imx7d_adc_remove() with imx7d_adc_suspend()
Since imx7d_adc_remove() does exactly the same thing as
imx7d_adc_suspend() we can use the latter together with
devm_add_action_or_reset() to simplify the former. Rename
imx7d_adc_suspend() to imx7d_adc_disable() for clarity while at it.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
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: Chris Healy <cphealy@gmail.com>
Cc: linux-iio@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-22 11:34:14 +01:00
Andrey Smirnov 4fe86cdf92 iio: imx7d_adc: Simplify imx7d_adc_probe() with imx7d_adc_resume()
Initialization sequence performed in imx7d_adc_resume() is exactly the
same as the one being done in imx7d_adc_probe(). Make use of the
former in the latter to avoid code duplication. Rename
imx7d_adc_resume() to imx7d_adc_enable() for clarity while at it.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
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: Chris Healy <cphealy@gmail.com>
Cc: linux-iio@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-22 11:34:14 +01:00
Gregory CLEMENT 8dd2d7c0fe iio: adc: Add driver for the TI ADS8344 A/DC chips
This adds support for the Texas Instruments ADS8344 ADC chip. This chip
has a 16-bit 8-Channel ADC and is access directly through SPI.

Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-22 11:34:13 +01:00
Greg Kroah-Hartman 817de6b859 Merge 5.1-rc6 into staging-next
We want the fixes in here as well as this resolves an iio driver merge
issue.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-21 23:18:44 +02:00