]> Git Repo - linux.git/commitdiff
Merge tag 'iio-for-4.11b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23...
authorGreg Kroah-Hartman <[email protected]>
Mon, 23 Jan 2017 08:23:23 +0000 (09:23 +0100)
committerGreg Kroah-Hartman <[email protected]>
Mon, 23 Jan 2017 08:23:23 +0000 (09:23 +0100)
Jonathan writes:

Second round of IIO new device support, cleanups and features for the 4.11 cycle

New device support:
* lsm6dsx imu
  - new driver and bindings.
* max11100 adc
  - new driver and bindings.
* tlc4541
  - new driver
* tmp007 thermopile
  - new driver.

Core
* in kernel interfaces
  - pass through raw values if no scaling provided and a processed value is
    requested.
* trigger
  - close a race condition in acquiring trigger reference.
  - constify device_type structures.
  - rework the viio_trigger_alloc function to be much neater and easier to
  read.
  - free trigger resources correctly on some error paths. Avoids putting a
  module we don't have.

Documentation
* ABI
  - specify a unit for proximity measurements.

Cleanups and features
* ads1015
  - constify iio_info structure.
* ads7950 cleanups following merge in previous pull
  - Add device tree bindings
  - Drop the ti prefix from the module name in common with other drivers.
  - Change regulator name to vref to match datasheet and other drivers.
* ak8974
  - remove a redundant zero timeout check.
* bmi160
  - use variable names for sizeof instead of types.
* cm3605
  - mark PM functions as __maybe_unused to avoid a build warning.
* isl29028 (on it's way towards moving out of staging).
  - alignment fixes and newline improvements.
  - combine proxim_get and read_proxim for simpler code.
  - drop unused ISL29028_DEV_ATTR macro
  - move some error logging into functions to cut out repitition.
  - make error messages more consistent.
  - tidy up some brackets.
  - drop the enable flag that nothing uses.
  - only set proximity rate and ALS scale when relevant channel type is enabled.
  - runtime pm support.
* lsm6dsx
  - fix wrong values for gyro sensitivitiy.
* mag3110
  - claim direct mode during sysfs reads to avoid a race condition.
* max1363
  - export OF device table IDs as module aliases.
* max30100
  - use msleep for long uncritical delays.
* mcp4531
  - export OF device table as module aliases.
* ms5611
  - claim direct mode during sysfs reads to avoid a race condition.
* opt3001
  - export OF device table as module aliases.
* sx9500
  - claim direct mode during oversampling changes to avoid a race condition.

1  2 
drivers/iio/adc/Kconfig
drivers/iio/imu/bmi160/bmi160_core.c

diff --combined drivers/iio/adc/Kconfig
index 8e7764c3cc84063c5290c5945aaa2d2519408c62,0d55f73eadef0b3601ba83a62e4d00eea4efc9d9..1a73e03defac134cee6ac89fdcb8969fe6f6cbce
@@@ -326,6 -326,15 +326,15 @@@ config MAX102
          To compile this driver as a module, choose M here: the module will be
          called max1027.
  
+ config MAX11100
+       tristate "Maxim max11100 ADC driver"
+       depends on SPI_MASTER
+       help
+         Say yes here to build support for Maxim max11100 SPI ADC
+         To compile this driver as a module, choose M here: the module will be
+         called max11100.
  config MAX1363
        tristate "Maxim max1363 ADC driver"
        depends on I2C
@@@ -593,7 -602,7 +602,7 @@@ config TI_ADS868
  
  config TI_AM335X_ADC
        tristate "TI's AM335X ADC driver"
 -      depends on MFD_TI_AM335X_TSCADC
 +      depends on MFD_TI_AM335X_TSCADC && HAS_DMA
        select IIO_BUFFER
        select IIO_KFIFO_BUF
        help
          To compile this driver as a module, choose M here: the module will be
          called ti_am335x_adc.
  
+ config TI_TLC4541
+       tristate "Texas Instruments TLC4541 ADC driver"
+       depends on SPI
+       select IIO_BUFFER
+       select IIO_TRIGGERED_BUFFER
+       help
+         Say yes here to build support for Texas Instruments TLC4541 / TLC3541
+         ADC chips.
+         This driver can also be built as a module. If so, the module will be
+         called ti-tlc4541.
  config TWL4030_MADC
        tristate "TWL4030 MADC (Monitoring A/D Converter)"
        depends on TWL4030_CORE
index c9e319bff58b314f626797f9dbf36339eb76be04,1e7c88bdf47249d38cbc4a01c661ad6147c435cc..cfd225ed1c8da57b7a7726ff32aca80e8cb70e1a
  
  #define BMI160_REG_DUMMY              0x7F
  
 -#define BMI160_ACCEL_PMU_MIN_USLEEP   3200
 -#define BMI160_ACCEL_PMU_MAX_USLEEP   3800
 -#define BMI160_GYRO_PMU_MIN_USLEEP    55000
 -#define BMI160_GYRO_PMU_MAX_USLEEP    80000
 +#define BMI160_ACCEL_PMU_MIN_USLEEP   3800
 +#define BMI160_GYRO_PMU_MIN_USLEEP    80000
  #define BMI160_SOFTRESET_USLEEP               1000
  
  #define BMI160_CHANNEL(_type, _axis, _index) {                        \
@@@ -149,9 -151,20 +149,9 @@@ static struct bmi160_regs bmi160_regs[
        },
  };
  
 -struct bmi160_pmu_time {
 -      unsigned long min;
 -      unsigned long max;
 -};
 -
 -static struct bmi160_pmu_time bmi160_pmu_time[] = {
 -      [BMI160_ACCEL] = {
 -              .min = BMI160_ACCEL_PMU_MIN_USLEEP,
 -              .max = BMI160_ACCEL_PMU_MAX_USLEEP
 -      },
 -      [BMI160_GYRO] = {
 -              .min = BMI160_GYRO_PMU_MIN_USLEEP,
 -              .max = BMI160_GYRO_PMU_MIN_USLEEP,
 -      },
 +static unsigned long bmi160_pmu_time[] = {
 +      [BMI160_ACCEL] = BMI160_ACCEL_PMU_MIN_USLEEP,
 +      [BMI160_GYRO] = BMI160_GYRO_PMU_MIN_USLEEP,
  };
  
  struct bmi160_scale {
@@@ -276,7 -289,7 +276,7 @@@ int bmi160_set_mode(struct bmi160_data 
        if (ret < 0)
                return ret;
  
 -      usleep_range(bmi160_pmu_time[t].min, bmi160_pmu_time[t].max);
 +      usleep_range(bmi160_pmu_time[t], bmi160_pmu_time[t] + 1000);
  
        return 0;
  }
@@@ -325,9 -338,9 +325,9 @@@ static int bmi160_get_data(struct bmi16
        __le16 sample;
        enum bmi160_sensor_type t = bmi160_to_sensor(chan_type);
  
-       reg = bmi160_regs[t].data + (axis - IIO_MOD_X) * sizeof(__le16);
+       reg = bmi160_regs[t].data + (axis - IIO_MOD_X) * sizeof(sample);
  
-       ret = regmap_bulk_read(data->regmap, reg, &sample, sizeof(__le16));
+       ret = regmap_bulk_read(data->regmap, reg, &sample, sizeof(sample));
        if (ret < 0)
                return ret;
  
@@@ -392,8 -405,8 +392,8 @@@ static irqreturn_t bmi160_trigger_handl
  
        for_each_set_bit(i, indio_dev->active_scan_mask,
                         indio_dev->masklength) {
-               ret = regmap_bulk_read(data->regmap, base + i * sizeof(__le16),
-                                      &sample, sizeof(__le16));
+               ret = regmap_bulk_read(data->regmap, base + i * sizeof(sample),
+                                      &sample, sizeof(sample));
                if (ret < 0)
                        goto done;
                buf[j++] = sample;
This page took 0.085053 seconds and 4 git commands to generate.