]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Merge tag 'iio-for-4.13a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23...
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 29 May 2017 13:53:42 +0000 (15:53 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 29 May 2017 13:53:42 +0000 (15:53 +0200)
Jonathan writes:

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

Two entirely new drivers in here plus the usual range of cleanups and features.

New device support
* ad5064
  - add ltc2631, ltc2633 and ltc2635 support.
* bma180
  - trivial support for bma250e (new id)
* hid-sensor-rotation
  - add relative orientation and geometric orientation support.
* isl29028
  - add isl29030 support (its effectively the same part from a driver point of
  view)
* maxim_thermocouple
  - add max31856 id.
* meson-saradc
  - add meson8b SoC adc support.
* ti-adc084s021
  - new driver and bindings.
* ti-adc108s102
  - new driver and bindings.

Staging graduations
* isl29028

Features
* bma180
  - ACPI enumeration for BMA250E which is used in various x86 tablets.
* hi8453
  - add raw access rather than only events.
* hid-sensor-hub
  - Implement batch mode in which we can set a threshold on the amount of time
  between data coming from the fifos.  This is the first device to do this
  rather than use a watershed on the number of samples.
* hts221
  - power management support
* lsm6dsx
  - add system power management support.
* rpr0521
  - sampling frequency read / write
* stm32-trigger
  - add support for TRG02 triggers.
* tsl2583
  - runtime power management support.

Cleanups
* core
  - inkern: fix a double unlock in iio_read_available_channel_raw when raw
  value doesn't appear to be raw (error path).
  - fixup accidental sizeof pointer in iio_device_add_mask_type.
* docs
  - fix an accidental duplicated line in sysfs-bus-iio-meas-spec.
* tools
  - use local include/uapi headers to ensure always up to date.
  - increase length of allowed trigger names.
* ad9834
  - symbolic to octal permissions.
ade7753
  - symbolic to octal permissions.
  - fix indentation
ade7754
  - symbolic to octal permissions.
ade7758
  - symbolic to octal permissions.
ade7854
  - symbolic to octal permissions.
* as3935
  - move out of storm check to given consistent results for raw and processed
  values.
* bmp280
  - fix bme280 naming in Kconfig help.
* hi8435
  - avoid garbage on event after enable.
  - add missing in_voltage_sensing_mode_available to list possible enum options.
  - handle the reset gpio with the obvious polarity rather than relying on
  DT to provide it correctly.
* hid-sensors
  - fix a wrong error path scrubbing of return values.
* hid-sensors-accel
  - drop static on a local variable
* hid-sensors-rotation
  - Add missing scale and offset property parsing support.
* ina2xx
  - Fix a bad use of GENMASK and some typos and whitespace issues.
* isl29018
  - only declare the ACPI table when ACPI is enabled.
* isl29028
  - fix proximity sleep times.
* lsm6dsx
  - replace ifdef CONFIG_PM with __maybe_unused to avoid the complexity of
  dealing with the various PM config variables.
* meson-saradc
  - mark meson_sar_adc_data static and const.
* rcar-gyroadc
  - derive the interface clock speed from the fck clock on the basis they are
  the same actual clock.
  - drop the now unused if clock from the bindings.
* rpr0521
  - disable sensor when marked as such rather than always enabling it.
  - poweroff if probe fails and we can talk to device.
  - make sure device powered off when it doesn't need to be on.
  - use sizeof rather than hardcoded size on value read.
  - whitespace fixup.
  - reorder channel numbers ready for buffered support which didn't quite
  make this pull request.
* st-accel
  - fix platform data initialization to allow remove and reprobe.
* st-pressure
  - fix platform data initialization to allow remove and reprobe.
* tsl2x7x
  - S_IRUGO, S_IWUSR to octal values
  - rename driver for consistency with more recent drivers
  - drop FSF mailing address
  - replace DEVICE_ATTR macros with the shorter DEVICE_ATTR_RW form and
  relevant function renames.
* zpa2326
  - report an error for consistency with other error paths.

1  2 
Documentation/devicetree/bindings/trivial-devices.txt
drivers/iio/adc/Kconfig
drivers/iio/adc/Makefile
drivers/iio/industrialio-core.c

index 3e0a34c88e07759bdd076e98d43a4c988e1de4cc,010e2ac43f62d53c3da2edd040f1943e50392258..35f406dd86b6c191a9dd21cf7e1c3b5091d01dd4
@@@ -55,6 -55,7 +55,7 @@@ gmt,g751              G751: Digital Temperature Sen
  infineon,slb9635tt    Infineon SLB9635 (Soft-) I2C TPM (old protocol, max 100khz)
  infineon,slb9645tt    Infineon SLB9645 I2C TPM (new protocol, max 400khz)
  isil,isl29028         Intersil ISL29028 Ambient Light and Proximity Sensor
+ isil,isl29030         Intersil ISL29030 Ambient Light and Proximity Sensor
  maxim,ds1050          5 Bit Programmable, Pulse-Width Modulator
  maxim,max1237         Low-Power, 4-/12-Channel, 2-Wire Serial, 12-Bit ADCs
  maxim,max6625         9-Bit/12-Bit Temperature Sensors with I²C-Compatible Serial Interface
@@@ -160,7 -161,6 +161,7 @@@ sii,s35390a                2-wire CMOS real-time cloc
  silabs,si7020         Relative Humidity and Temperature Sensors
  skyworks,sky81452     Skyworks SKY81452: Six-Channel White LED Driver with Touch Panel Bias Supply
  st,24c256             i2c serial eeprom  (24cxx)
 +st,m41t0              Serial real-time clock (RTC)
  st,m41t00             Serial real-time clock (RTC)
  st,m41t62             Serial real-time clock (RTC) with alarm
  st,m41t80             M41T80 - SERIAL ACCESS RTC WITH ALARMS
diff --combined drivers/iio/adc/Kconfig
index 401f47b51d83a394c919e13b5e8684116ea22446,2f2632991e0ef2048fd2a5949204854c14c17620..614fa41559b13059e715095efb99e0ffecc76578
@@@ -165,16 -165,6 +165,16 @@@ config AT91_SAMA5D2_AD
          To compile this driver as a module, choose M here: the module will be
          called at91-sama5d2_adc.
  
 +config AXP20X_ADC
 +      tristate "X-Powers AXP20X and AXP22X ADC driver"
 +      depends on MFD_AXP20X
 +      help
 +        Say yes here to have support for X-Powers power management IC (PMIC)
 +        AXP20X and AXP22X ADC devices.
 +
 +        To compile this driver as a module, choose M here: the module will be
 +        called axp20x_adc.
 +
  config AXP288_ADC
        tristate "X-Powers AXP288 ADC driver"
        depends on MFD_AXP20X
@@@ -261,19 -251,6 +261,19 @@@ config EXYNOS_AD
          To compile this driver as a module, choose M here: the module will be
          called exynos_adc.
  
 +config MXS_LRADC_ADC
 +      tristate "Freescale i.MX23/i.MX28 LRADC ADC"
 +      depends on MFD_MXS_LRADC
 +      select IIO_BUFFER
 +      select IIO_TRIGGERED_BUFFER
 +      help
 +        Say yes here to build support for the ADC functions of the
 +        i.MX23/i.MX28 LRADC. This includes general-purpose ADC readings,
 +        battery voltage measurement, and die temperature measurement.
 +
 +        This driver can also be built as a module. If so, the module will be
 +        called mxs-lradc-adc.
 +
  config FSL_MX25_ADC
        tristate "Freescale MX25 ADC driver"
        depends on MFD_MX25_TSADC
@@@ -500,6 -477,20 +500,6 @@@ config MESON_SARAD
          To compile this driver as a module, choose M here: the
          module will be called meson_saradc.
  
 -config MXS_LRADC
 -        tristate "Freescale i.MX23/i.MX28 LRADC"
 -        depends on (ARCH_MXS || COMPILE_TEST) && HAS_IOMEM
 -        depends on INPUT
 -        select STMP_DEVICE
 -        select IIO_BUFFER
 -        select IIO_TRIGGERED_BUFFER
 -        help
 -          Say yes here to build support for i.MX23/i.MX28 LRADC convertor
 -          built into these chips.
 -
 -          To compile this driver as a module, choose M here: the
 -          module will be called mxs-lradc.
 -
  config NAU7802
        tristate "Nuvoton NAU7802 ADC driver"
        depends on I2C
@@@ -679,6 -670,18 +679,18 @@@ config TI_ADC083
          This driver can also be built as a module. If so, the module will be
          called ti-adc0832.
  
+ config TI_ADC084S021
+       tristate "Texas Instruments ADC084S021"
+       depends on SPI
+       select IIO_BUFFER
+       select IIO_TRIGGERED_BUFFER
+       help
+         If you say yes here you get support for Texas Instruments ADC084S021
+         chips.
+         This driver can also be built as a module. If so, the module will be
+         called ti-adc084s021.
  config TI_ADC12138
        tristate "Texas Instruments ADC12130/ADC12132/ADC12138"
        depends on SPI
          This driver can also be built as a module. If so, the module will be
          called ti-adc12138.
  
+ config TI_ADC108S102
+       tristate "Texas Instruments ADC108S102 and ADC128S102 driver"
+       depends on SPI
+       select IIO_BUFFER
+       select IIO_TRIGGERED_BUFFER
+       help
+         Say yes here to build support for Texas Instruments ADC108S102 and
+         ADC128S102 ADC.
+         To compile this driver as a module, choose M here: the module will
+         be called ti-adc108s102.
  config TI_ADC128S052
        tristate "Texas Instruments ADC128S052/ADC122S021/ADC124S021"
        depends on SPI
diff --combined drivers/iio/adc/Makefile
index 9339bec4babe95d650a3131192c6e42354340626,9fb51e6f49cb6b8edccb0278307734aa2a570952..b546736a55413a1848098b6ad6a778130baf9af7
@@@ -17,7 -17,6 +17,7 @@@ obj-$(CONFIG_AD799X) += ad799x.
  obj-$(CONFIG_ASPEED_ADC) += aspeed_adc.o
  obj-$(CONFIG_AT91_ADC) += at91_adc.o
  obj-$(CONFIG_AT91_SAMA5D2_ADC) += at91-sama5d2_adc.o
 +obj-$(CONFIG_AXP20X_ADC) += axp20x_adc.o
  obj-$(CONFIG_AXP288_ADC) += axp288_adc.o
  obj-$(CONFIG_BCM_IPROC_ADC) += bcm_iproc_adc.o
  obj-$(CONFIG_BERLIN2_ADC) += berlin2-adc.o
@@@ -46,7 -45,7 +46,7 @@@ obj-$(CONFIG_MCP3422) += mcp3422.
  obj-$(CONFIG_MEDIATEK_MT6577_AUXADC) += mt6577_auxadc.o
  obj-$(CONFIG_MEN_Z188_ADC) += men_z188_adc.o
  obj-$(CONFIG_MESON_SARADC) += meson_saradc.o
 -obj-$(CONFIG_MXS_LRADC) += mxs-lradc.o
 +obj-$(CONFIG_MXS_LRADC_ADC) += mxs-lradc-adc.o
  obj-$(CONFIG_NAU7802) += nau7802.o
  obj-$(CONFIG_PALMAS_GPADC) += palmas_gpadc.o
  obj-$(CONFIG_QCOM_SPMI_IADC) += qcom-spmi-iadc.o
@@@ -62,7 -61,9 +62,9 @@@ obj-$(CONFIG_STM32_ADC_CORE) += stm32-a
  obj-$(CONFIG_STM32_ADC) += stm32-adc.o
  obj-$(CONFIG_TI_ADC081C) += ti-adc081c.o
  obj-$(CONFIG_TI_ADC0832) += ti-adc0832.o
+ obj-$(CONFIG_TI_ADC084S021) += ti-adc084s021.o
  obj-$(CONFIG_TI_ADC12138) += ti-adc12138.o
+ obj-$(CONFIG_TI_ADC108S102) += ti-adc108s102.o
  obj-$(CONFIG_TI_ADC128S052) += ti-adc128s052.o
  obj-$(CONFIG_TI_ADC161S626) += ti-adc161s626.o
  obj-$(CONFIG_TI_ADS1015) += ti-ads1015.o
index 57c14da5708fd5f5f1713689321e7dd5abb1d9e8,795f53c4d75d6e54ed58e58ca626192fb716079d..4a1de59d153aacedcd7e5519ebc241fe02c643f3
@@@ -1089,7 -1089,7 +1089,7 @@@ static int iio_device_add_info_mask_typ
  {
        int i, ret, attrcount = 0;
  
-       for_each_set_bit(i, infomask, sizeof(infomask)*8) {
+       for_each_set_bit(i, infomask, sizeof(*infomask)*8) {
                if (i >= ARRAY_SIZE(iio_chan_info_postfix))
                        return -EINVAL;
                ret = __iio_add_chan_devattr(iio_chan_info_postfix[i],
@@@ -1118,7 -1118,7 +1118,7 @@@ static int iio_device_add_info_mask_typ
        int i, ret, attrcount = 0;
        char *avail_postfix;
  
-       for_each_set_bit(i, infomask, sizeof(infomask) * 8) {
+       for_each_set_bit(i, infomask, sizeof(*infomask) * 8) {
                avail_postfix = kasprintf(GFP_KERNEL,
                                          "%s_available",
                                          iio_chan_info_postfix[i]);
@@@ -1719,13 -1719,18 +1719,13 @@@ int iio_device_register(struct iio_dev 
  
        cdev_init(&indio_dev->chrdev, &iio_buffer_fileops);
        indio_dev->chrdev.owner = indio_dev->info->driver_module;
 -      indio_dev->chrdev.kobj.parent = &indio_dev->dev.kobj;
 -      ret = cdev_add(&indio_dev->chrdev, indio_dev->dev.devt, 1);
 -      if (ret < 0)
 -              goto error_unreg_eventset;
  
 -      ret = device_add(&indio_dev->dev);
 +      ret = cdev_device_add(&indio_dev->chrdev, &indio_dev->dev);
        if (ret < 0)
 -              goto error_cdev_del;
 +              goto error_unreg_eventset;
  
        return 0;
 -error_cdev_del:
 -      cdev_del(&indio_dev->chrdev);
 +
  error_unreg_eventset:
        iio_device_unregister_eventset(indio_dev);
  error_free_sysfs:
@@@ -1746,8 -1751,10 +1746,8 @@@ void iio_device_unregister(struct iio_d
  {
        mutex_lock(&indio_dev->info_exist_lock);
  
 -      device_del(&indio_dev->dev);
 +      cdev_device_del(&indio_dev->chrdev, &indio_dev->dev);
  
 -      if (indio_dev->chrdev.dev)
 -              cdev_del(&indio_dev->chrdev);
        iio_device_unregister_debugfs(indio_dev);
  
        iio_disable_all_buffers(indio_dev);