First set of fixes for IIO in the 5.14 cycle

adi,adis:
  - Ensure GPIO pin direction set explicitly in driver.
 fxls8952af:
  - Fix use of ret when not initialized.
  - Fix issue with use of module symbol from built in.
 hdc100x:
  - Add a margin to conversion time as some parts run to slowly.
 palmas-adc:
  - Fix a wrong exit condition that leads to adc period always being set
    to maximum value.
 st,sensors:
  - Drop a wrong restriction on number of interrupts in dt binding.
 ti-ads7950:
  - Ensure CS deasserted after channel read.
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCAAvFiEEbilms4eEBlKRJoGxVIU0mcT0FogFAmERfNIRHGppYzIzQGtl
 cm5lbC5vcmcACgkQVIU0mcT0FogwjBAAkUPCOqv2sxWGVz6/cKEkSj2VqV2loVqf
 9AhC0CcnR2XNrmNxqRXoNe7jImETkkZsYEwj0F7U4FTJ2ihrAzGEEM0J2Cw8Ii5Z
 r8Loj6ywJrGsaF06nU5LZe6HHfF72irNWQbpkVo3Nxa6dRx+VXQG1UliQRErSaCu
 JXA9R6pwwp+0HC0Ro4h0e4fZxf1DKmZQcwkkWO/MrqluUlHSdbH1xg2jGsbJCMsW
 kie185yNzQ5mpM6AaAK2Ef4q7r3GabvcMxfRJ/3/4toJ77rtFdVOrKTvfqfHuL6T
 zwGeRrvWfhwI8bcqds/pKi5UwgxzHn3LOhU9tZe6atZjYXA2EPmj4TPsfP6myQt2
 L6QrpXzZH4sfGeLQs+pzcD7lzUsZQOn0fF0Acw1yCzTkWcoJoh5Wils+e2zRomZn
 CHov95SCOUssIdLE4g8il9EURJdbCAJY1M70wKz2maoYqAoZn3iotNASy797Ejz0
 TsWG4cLGllHGn9XkJxPT72b0D+MImbPqfEXSq4I0uiko5A5dEyAQoUDP2zU4dXCG
 thiStpyTLxVLGRxOWG1DEeqx6l3MNMyZxyoXLHoUSUsm0M9KHQ+cDI65kWQCX6U/
 urL5qOVIfmIqxmqLhR/BDar9WCqRyXFaOgri3ZDyisByOoA9oZ4vfzVQ+YQFg0fN
 Q02FSpQIVoM=
 =yqHg
 -----END PGP SIGNATURE-----

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

Jonathan writes:

First set of fixes for IIO in the 5.14 cycle

adi,adis:
 - Ensure GPIO pin direction set explicitly in driver.
fxls8952af:
 - Fix use of ret when not initialized.
 - Fix issue with use of module symbol from built in.
hdc100x:
 - Add a margin to conversion time as some parts run to slowly.
palmas-adc:
 - Fix a wrong exit condition that leads to adc period always being set
   to maximum value.
st,sensors:
 - Drop a wrong restriction on number of interrupts in dt binding.
ti-ads7950:
 - Ensure CS deasserted after channel read.

* tag 'iio-fixes-5.14a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio:
  iio: adc: Fix incorrect exit of for-loop
  iio: humidity: hdc100x: Add margin to the conversion time
  dt-bindings: iio: st: Remove wrong items length check
  iio: accel: fxls8962af: fix i2c dependency
  iio: adis: set GPIO reset pin direction
  iio: adc: ti-ads7950: Ensure CS is deasserted after reading channels
  iio: accel: fxls8962af: fix potential use of uninitialized symbol
This commit is contained in:
Greg Kroah-Hartman 2021-08-10 08:54:36 +02:00
commit a5056c0bc2
7 changed files with 10 additions and 49 deletions

View File

@ -152,47 +152,6 @@ allOf:
maxItems: 1
st,drdy-int-pin: false
- if:
properties:
compatible:
enum:
# Two intertial interrupts i.e. accelerometer/gyro interrupts
- st,h3lis331dl-accel
- st,l3g4200d-gyro
- st,l3g4is-gyro
- st,l3gd20-gyro
- st,l3gd20h-gyro
- st,lis2de12
- st,lis2dw12
- st,lis2hh12
- st,lis2dh12-accel
- st,lis331dl-accel
- st,lis331dlh-accel
- st,lis3de
- st,lis3dh-accel
- st,lis3dhh
- st,lis3mdl-magn
- st,lng2dm-accel
- st,lps331ap-press
- st,lsm303agr-accel
- st,lsm303dlh-accel
- st,lsm303dlhc-accel
- st,lsm303dlm-accel
- st,lsm330-accel
- st,lsm330-gyro
- st,lsm330d-accel
- st,lsm330d-gyro
- st,lsm330dl-accel
- st,lsm330dl-gyro
- st,lsm330dlc-accel
- st,lsm330dlc-gyro
- st,lsm9ds0-gyro
- st,lsm9ds1-magn
then:
properties:
interrupts:
maxItems: 2
required:
- compatible
- reg

View File

@ -231,6 +231,7 @@ config DMARD10
config FXLS8962AF
tristate
depends on I2C || !I2C # cannot be built-in for modular I2C
config FXLS8962AF_I2C
tristate "NXP FXLS8962AF/FXLS8964AF Accelerometer I2C Driver"
@ -247,6 +248,7 @@ config FXLS8962AF_I2C
config FXLS8962AF_SPI
tristate "NXP FXLS8962AF/FXLS8964AF Accelerometer SPI Driver"
depends on SPI
depends on I2C || !I2C
select FXLS8962AF
select REGMAP_SPI
help

View File

@ -637,7 +637,7 @@ static int fxls8962af_i2c_raw_read_errata3(struct fxls8962af_data *data,
return ret;
}
return ret;
return 0;
}
static int fxls8962af_fifo_transfer(struct fxls8962af_data *data,

View File

@ -664,8 +664,8 @@ static int palmas_adc_wakeup_configure(struct palmas_gpadc *adc)
adc_period = adc->auto_conversion_period;
for (i = 0; i < 16; ++i) {
if (((1000 * (1 << i)) / 32) < adc_period)
continue;
if (((1000 * (1 << i)) / 32) >= adc_period)
break;
}
if (i > 0)
i--;

View File

@ -568,7 +568,6 @@ static int ti_ads7950_probe(struct spi_device *spi)
st->ring_xfer.tx_buf = &st->tx_buf[0];
st->ring_xfer.rx_buf = &st->rx_buf[0];
/* len will be set later */
st->ring_xfer.cs_change = true;
spi_message_add_tail(&st->ring_xfer, &st->ring_msg);

View File

@ -25,6 +25,8 @@
#include <linux/iio/trigger_consumer.h>
#include <linux/iio/triggered_buffer.h>
#include <linux/time.h>
#define HDC100X_REG_TEMP 0x00
#define HDC100X_REG_HUMIDITY 0x01
@ -166,7 +168,7 @@ static int hdc100x_get_measurement(struct hdc100x_data *data,
struct iio_chan_spec const *chan)
{
struct i2c_client *client = data->client;
int delay = data->adc_int_us[chan->address];
int delay = data->adc_int_us[chan->address] + 1*USEC_PER_MSEC;
int ret;
__be16 val;
@ -316,7 +318,7 @@ static irqreturn_t hdc100x_trigger_handler(int irq, void *p)
struct iio_dev *indio_dev = pf->indio_dev;
struct hdc100x_data *data = iio_priv(indio_dev);
struct i2c_client *client = data->client;
int delay = data->adc_int_us[0] + data->adc_int_us[1];
int delay = data->adc_int_us[0] + data->adc_int_us[1] + 2*USEC_PER_MSEC;
int ret;
/* dual read starts at temp register */

View File

@ -411,12 +411,11 @@ int __adis_initial_startup(struct adis *adis)
int ret;
/* check if the device has rst pin low */
gpio = devm_gpiod_get_optional(&adis->spi->dev, "reset", GPIOD_ASIS);
gpio = devm_gpiod_get_optional(&adis->spi->dev, "reset", GPIOD_OUT_HIGH);
if (IS_ERR(gpio))
return PTR_ERR(gpio);
if (gpio) {
gpiod_set_value_cansleep(gpio, 1);
msleep(10);
/* bring device out of reset */
gpiod_set_value_cansleep(gpio, 0);