Merge tag 'iio-for-4.7b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio...
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 26 Apr 2016 22:07:23 +0000 (15:07 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 26 Apr 2016 22:07:23 +0000 (15:07 -0700)
Jonathan writes:

2nd set of new device support, features and cleanup for IIO in the 4.7 cycle.

Bit of a bumper set for new drivers but plenty of other stuff here as well!

New device support
* ad5592R ADC/DAC
  - new driver supporting ad5592r and ad5593r combined ADC/DAC and gpio chips.
* Aosong am2315 relative humidity
  - new driver with triggered buffer support in follow up patch.
* bmi160 imu
  - new driver
* bmp280
  - bmp180 support - note there is support in the misc/bmp085 driver. Intent
    is to remove that driver long term.
* invensense mpu6050
  - cleanup leading to explicit support of mpu9150 with a good few cleanups
    along the way.
* Hope RF hp03 pressure and temperature sensor.
  - new driver
* maxim DS1803 potentiometer
  - new driver
* maxim max44000 light and proximity sensor
  - new driver built in a series of steps to support pretty much everything.
* ROHM BH1780 light sensor
  - new driver. There is an existing driver in misc that this is pretty much
    intended to replace.  The discussion on whether to support the non standard
    interface of that driver is some way is continuing.
* st-gyro
  - lsm9ds0-gyro.  The accel/magn side of this will take a while longer as
    extensions to the st library are needed for cases where two types of sensor
    share a single i2c address.
* ti-adc081c
  - support the adc101c and adc121c
* Vishay VEML6070 UV sensor
  - new driver.

New features
* core
  - devm_ APIs for channel_get and channel_get_all.  The first user of these
    is the generic ADC based thermal driver.  As it is going through the
    thermal tree these will be picked up as a patch to that next cycle as that
    is how the author preferred to do it.
  - mounting matrix support.  This new core support allows devices to provide
    to userspace (typically from the device tree) allowing compensation for how
    the sensor is mounted on the device.  First examples are on UAVs but it
    has a more mundane use on typical phone where the chip may be on the front
    or the back of the circuit board and soldered at any angle. Includes
    support for this ABI in ak8975 (which has an older interface, now
    deprecated) and mpu6050.
* tools
  - add a -a option to enable all available channels in generic_buffer sample.
    Makes it somewhat easier to use.
* adis library and drivers
  - support manual self test flag clearing.  This has technically been broken
    for a very long time - result is an offset on readings as the applied field
    is on all the time.
* ak8975
  - triggered buffer support
* bmc150
  - spi support (including splitting the driver into core and i2c parts)
* bmp280
  - oversampling support.
* dht11
  - improved logging - useful to debug timing issues on this quirky device.
* st-sensors
  - read each channel invidivually as not all support the optimization of
  reading in bulk.  This is technically a fix, but will need to be backported
  if desired.
  - support open drain and shared interrupts.
* ti-adc081c
  - triggered buffer support.

Cleanups
* inkern
  - white space fix.
* ad7606
  - use the iio_device_claim_direct_mode call rather than open coding equiv.
* ad799x
  - white space fix.
* ad9523
  - unsigned -> unsigned int
* apds9660
  - brace location tidying up.
  - silence an uninitialized variable warning.
* ak8975
  - else and brace on same line fix.
* at91_adc
  - white space fixes.
* bmc150
  - use regmap stored copy of the device pointer rather than having an
    additional copy.
* bmg160
  - use regmap stored copy of the device pointer rather than having an
    additional copy.
* hid-sensors
  - white space fixes.
* mcp3422
  - white space fix.
* mma7455
  - use regmap to retrieve the device struct rather than carrying another copy
    in the private data.
* ms_sensors
  - white space fix.
* mxs-lradc
  - move current bindings out of staging - some will be shortly deprecated but
    the reality is that we have device trees out there using them so they will
    need to be supported for some time.  They accidentally got left behind
    when the driver graduated from staging.
  - white space cleanup.
  - set INPUT_PROP_DIRECT.
  - move ts config into a better function.
  - move the STMP reset out of the ADC init.
* vf610_adc
  - case label indenting fix.

1  2 
drivers/iio/accel/bmc150-accel-core.c
drivers/iio/gyro/bmg160_core.c
drivers/iio/imu/inv_mpu6050/Kconfig
drivers/iio/light/apds9960.c

index 2a0735d6955d92a0ff650dc024b1bb3d2a7d0795,91a52c275d0ec8021cc2f7bfd29ed3b0a67d6d4e..197e693e7e7b795e9002e10430fd3f41399f96a7
@@@ -546,9 -550,10 +550,10 @@@ static int bmc150_accel_get_axis(struc
                                 struct iio_chan_spec const *chan,
                                 int *val)
  {
+       struct device *dev = regmap_get_device(data->regmap);
        int ret;
        int axis = chan->scan_index;
 -      unsigned int raw_val;
 +      __le16 raw_val;
  
        mutex_lock(&data->mutex);
        ret = bmc150_accel_set_power_state(data, true);
        }
  
        ret = regmap_bulk_read(data->regmap, BMC150_ACCEL_AXIS_TO_REG(axis),
 -                             &raw_val, 2);
 +                             &raw_val, sizeof(raw_val));
        if (ret < 0) {
-               dev_err(data->dev, "Error reading axis %d\n", axis);
+               dev_err(dev, "Error reading axis %d\n", axis);
                bmc150_accel_set_power_state(data, false);
                mutex_unlock(&data->mutex);
                return ret;
index dd2f850a2f0bbb0888e4e13fdc3b81f4ed627229,b2b1071c189204a9d629a9eb94c6ceee268b4997..7ccc044063f65e3429f170571d318b026be9f59d
@@@ -450,8 -451,9 +451,9 @@@ static int bmg160_get_temp(struct bmg16
  
  static int bmg160_get_axis(struct bmg160_data *data, int axis, int *val)
  {
+       struct device *dev = regmap_get_device(data->regmap);
        int ret;
 -      unsigned int raw_val;
 +      __le16 raw_val;
  
        mutex_lock(&data->mutex);
        ret = bmg160_set_power_state(data, true);
        }
  
        ret = regmap_bulk_read(data->regmap, BMG160_AXIS_TO_REG(axis), &raw_val,
 -                             2);
 +                             sizeof(raw_val));
        if (ret < 0) {
-               dev_err(data->dev, "Error reading axis %d\n", axis);
+               dev_err(dev, "Error reading axis %d\n", axis);
                bmg160_set_power_state(data, false);
                mutex_unlock(&data->mutex);
                return ret;
index 847455a2d6bb0275bdc9636eb23f1f7e00bdc653,c05d474587d24857a5d67ffce8c0c1e8941a8c82..f756feecfa4ca966e381e2d7a79e1de38014ea4e
@@@ -9,14 -9,13 +9,12 @@@ config INV_MPU6050_II
  
  config INV_MPU6050_I2C
        tristate "Invensense MPU6050 devices (I2C)"
 -      depends on I2C
 +      depends on I2C_MUX
        select INV_MPU6050_IIO
 -      select I2C_MUX
        select REGMAP_I2C
        help
-         This driver supports the Invensense MPU6050 devices.
-         This driver can also support MPU6500 in MPU6050 compatibility mode
-         and also in MPU6500 mode with some limitations.
-         It is a gyroscope/accelerometer combo device.
+         This driver supports the Invensense MPU6050/6500/9150 motion tracking
+         devices over I2C.
          This driver can be built as a module. The module will be called
          inv-mpu6050-i2c.
  
Simple merge