]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge tag 'iio-for-4.1a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio...
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 24 Mar 2015 21:53:52 +0000 (22:53 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 24 Mar 2015 21:53:52 +0000 (22:53 +0100)
Jonathan writes:

First set of new drivers, cleanups and functionality for IIO in the 4.1 cycle.

New drivers
* CM3323 color sensor.
* MS5611 pressure and temperature sensor.

New functionality
* mup6050 - create mux clients for devices described via ACPI. The reasoning
     and approach taken in this patch are complex.  Basically there is no
     otherway of finding out what is there than by some esoteric look ups in
     the ACPI data.
* cm3232 - PM support
* itg3200 - suspend/resume support
* mcp320x - add more ADCs to the kconfig to reflect what the driver supports
     (this patch and the bindings got left behind when the support was added
      a while back).

Docs / utils
* ti-adc128s052 - DT bindings.
* mcp3422 - DT bindings.
* mcp320x - DT bindings
* ABI docs for event threshold scale attributes, in_magn_offset, proximity
  scan_element and thresh falling/rising values for accelerometers.  All
  elements long in use that have slipped by being explicitly documented.
* Tidy up the tools previously in drivers/staging/iio/Documentation and move
  them out to /tools/iio. Yet another move that should have happened long ago.
  This time Roberta Dobrescu did the leg work.  Thanks!

Core Cleanups
* Export userspace IIO headers.  We should have done the appropriate header
  splitting a long time ago. Thanks to Daniel for sorting this out.

* Refactor the registring of attributes for buffers to move all non-custom
  ones to a vector allowing easier additions to the current set in the future.

Driver Cleanups
* gpiod related cleanups.  Make use of the additional parameter to specify
   initial direciton to avoid extra code.
* bmc150 - Various refactorings to reduce code repitition and prepare for
           hardware buffer support.  Some of these cleanups are good even
   without the new functionality.
* kmx61 - direct use of index to an array avoiding a structure element which
          was always the index to an element in an array of that structure.
* vf610 - avoid incorrect type for return from wait_for_completion_timeout.
* gp2ap020a00f - use put_unaligned_le32 for slight code simplification.
ade7754 - improve error handling including suppressing some build warnings.
ade7759 - improve error handling including suppressing some build warnings.
* hmc5843 - Long line and indentation fixes. Also some constifying of various
      constant data.
ade7854 - 80+ character line splitting.
* ad2s1210 - fix wrong printf format string.
* mxs-lradc - fix wrong printf format string.
ade7954-i2c - code alignment fixes and other trivial but worthwhile bits.
* periodic rtc trigger - make the frequency type an unsigned int as it
  is always treated as such.
* jsa1212 - constify struct regmap_config as it is constant.
* ad7793 - typo in the MODULE_DESCRIPTION
* mma9551 - check gpiod_to_irq errors.  Note that this doesn't actually cause
    any trouble but is worth tidying up as obviously incorrect.
* mlx90614 - refactor the register symbols to make it clear which reads are to
    RAM not PROM.

1  2 
MAINTAINERS
drivers/iio/imu/inv_mpu6050/inv_mpu_core.c
drivers/iio/light/Kconfig
drivers/staging/iio/adc/mxs-lradc.c
drivers/staging/iio/magnetometer/hmc5843_i2c.c
drivers/staging/iio/meter/ade7754.c
drivers/staging/iio/meter/ade7759.c
drivers/staging/iio/resolver/ad2s1210.c
include/uapi/linux/Kbuild
tools/iio/generic_buffer.c
tools/iio/iio_utils.c

diff --combined MAINTAINERS
index ccf1c898afb1f0bddf05e82de42b0d0fbc93f8f0,6fb6bdc2eb3ff455bfef694f0fdf780684a4a9f5..036284f6cf45dc477d78784278e347a97f982e49
@@@ -34,7 -34,7 +34,7 @@@ trivial patch so apply some common sens
        generalized kernel feature ready for next time.
  
        PLEASE check your patch with the automated style checker
 -      (scripts/checkpatch.pl) to catch trival style violations.
 +      (scripts/checkpatch.pl) to catch trivial style violations.
        See Documentation/CodingStyle for guidance here.
  
        PLEASE CC: the maintainers and mailing lists that are generated
@@@ -270,12 -270,12 +270,12 @@@ F:      drivers/acpi
  F:    drivers/pnp/pnpacpi/
  F:    include/linux/acpi.h
  F:    include/acpi/
 -F:    Documentation/acpi
 +F:    Documentation/acpi/
  F:    Documentation/ABI/testing/sysfs-bus-acpi
  F:    drivers/pci/*acpi*
  F:    drivers/pci/*/*acpi*
  F:    drivers/pci/*/*/*acpi*
 -F:    tools/power/acpi
 +F:    tools/power/acpi/
  
  ACPI COMPONENT ARCHITECTURE (ACPICA)
  M:    Robert Moore <robert.moore@intel.com>
@@@ -563,12 -563,6 +563,12 @@@ S:       Odd Fixe
  L:    linux-alpha@vger.kernel.org
  F:    arch/alpha/
  
 +ALTERA MAILBOX DRIVER
 +M:    Ley Foon Tan <lftan@altera.com>
 +L:    nios2-dev@lists.rocketboards.org (moderated for non-subscribers)
 +S:    Maintained
 +F:    drivers/mailbox/mailbox-altera.c
 +
  ALTERA TRIPLE SPEED ETHERNET DRIVER
  M:    Vince Bridgers <vbridger@opensource.altera.com>
  L:    netdev@vger.kernel.org
@@@ -630,8 -624,6 +630,8 @@@ L:      dri-devel@lists.freedesktop.or
  T:      git git://people.freedesktop.org/~gabbayo/linux.git
  S:      Supported
  F:      drivers/gpu/drm/amd/amdkfd/
 +F:    drivers/gpu/drm/amd/include/cik_structs.h
 +F:    drivers/gpu/drm/amd/include/kgd_kfd_interface.h
  F:      drivers/gpu/drm/radeon/radeon_kfd.c
  F:      drivers/gpu/drm/radeon/radeon_kfd.h
  F:      include/uapi/linux/kfd_ioctl.h
@@@ -667,13 -659,6 +667,13 @@@ L:       linux-media@vger.kernel.or
  S:    Maintained
  F:    drivers/media/i2c/ad9389b*
  
 +ANALOG DEVICES INC ADV7180 DRIVER
 +M:    Lars-Peter Clausen <lars@metafoo.de>
 +L:    linux-media@vger.kernel.org
 +W:    http://ez.analog.com/community/linux-device-drivers
 +S:    Supported
 +F:    drivers/media/i2c/adv7180.c
 +
  ANALOG DEVICES INC ADV7511 DRIVER
  M:    Hans Verkuil <hans.verkuil@cisco.com>
  L:    linux-media@vger.kernel.org
@@@ -725,7 -710,7 +725,7 @@@ F: staging/iio/trigger/iio-trig-bfin-ti
  
  ANDROID DRIVERS
  M:    Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -M:    Arve Hjønnevåg <arve@android.com>
 +M:    Arve Hjønnevåg <arve@android.com>
  M:    Riley Andrews <riandrews@android.com>
  T:    git git://git.kernel.org/pub/scm/linux/kernel/gregkh/staging.git
  L:    devel@driverdev.osuosl.org
@@@ -895,7 -880,6 +895,7 @@@ F: arch/arm/boot/dts/at91*.dt
  F:    arch/arm/boot/dts/at91*.dtsi
  F:    arch/arm/boot/dts/sama*.dts
  F:    arch/arm/boot/dts/sama*.dtsi
 +F:    arch/arm/include/debug/at91.S
  
  ARM/ATMEL AT91 Clock Support
  M:    Boris Brezillon <boris.brezillon@free-electrons.com>
@@@ -977,7 -961,7 +977,7 @@@ S: Maintaine
  F:    arch/arm/mach-prima2/
  F:    drivers/clk/sirf/
  F:    drivers/clocksource/timer-prima2.c
 -F:    drivers/clocksource/timer-marco.c
 +F:    drivers/clocksource/timer-atlas7.c
  N:    [^a-z]sirf
  
  ARM/EBSA110 MACHINE SUPPORT
@@@ -1030,16 -1014,6 +1030,16 @@@ F:    arch/arm/mach-mxs
  F:    arch/arm/boot/dts/imx*
  F:    arch/arm/configs/imx*_defconfig
  
 +ARM/FREESCALE VYBRID ARM ARCHITECTURE
 +M:    Shawn Guo <shawn.guo@linaro.org>
 +M:    Sascha Hauer <kernel@pengutronix.de>
 +R:    Stefan Agner <stefan@agner.ch>
 +L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 +S:    Maintained
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux.git
 +F:    arch/arm/mach-imx/*vf610*
 +F:    arch/arm/boot/dts/vf*
 +
  ARM/GLOMATION GESBC9312SX MACHINE SUPPORT
  M:    Lennert Buytenhek <kernel@wantstofly.org>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
@@@ -1186,7 -1160,6 +1186,7 @@@ M:      Sebastian Hesselbarth <sebastian.hes
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  S:    Maintained
  F:    arch/arm/mach-mvebu/
 +F:    drivers/rtc/armada38x-rtc
  
  ARM/Marvell Berlin SoC support
  M:    Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
@@@ -1198,7 -1171,6 +1198,7 @@@ ARM/Marvell Dove/MV78xx0/Orion SOC supp
  M:    Jason Cooper <jason@lakedaemon.net>
  M:    Andrew Lunn <andrew@lunn.ch>
  M:    Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
 +M:    Gregory Clement <gregory.clement@free-electrons.com>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  S:    Maintained
  F:    arch/arm/mach-dove/
@@@ -1321,13 -1293,10 +1321,13 @@@ S:   Maintaine
  
  ARM/QUALCOMM SUPPORT
  M:    Kumar Gala <galak@codeaurora.org>
 +M:    Andy Gross <agross@codeaurora.org>
  M:    David Brown <davidb@codeaurora.org>
  L:    linux-arm-msm@vger.kernel.org
 +L:    linux-soc@vger.kernel.org
  S:    Maintained
  F:    arch/arm/mach-qcom/
 +F:    drivers/soc/qcom/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/galak/linux-qcom.git
  
  ARM/RADISYS ENP2611 MACHINE SUPPORT
@@@ -1429,6 -1398,7 +1429,6 @@@ F:      arch/arm/configs/ape6evm_defconfi
  F:    arch/arm/configs/armadillo800eva_defconfig
  F:    arch/arm/configs/bockw_defconfig
  F:    arch/arm/configs/kzm9g_defconfig
 -F:    arch/arm/configs/lager_defconfig
  F:    arch/arm/configs/mackerel_defconfig
  F:    arch/arm/configs/marzen_defconfig
  F:    arch/arm/configs/shmobile_defconfig
@@@ -1616,14 -1586,12 +1616,14 @@@ N:   xilin
  F:    drivers/clocksource/cadence_ttc_timer.c
  F:    drivers/i2c/busses/i2c-cadence.c
  F:    drivers/mmc/host/sdhci-of-arasan.c
 +F:    drivers/edac/synopsys_edac.c
  
  ARM SMMU DRIVER
  M:    Will Deacon <will.deacon@arm.com>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  S:    Maintained
  F:    drivers/iommu/arm-smmu.c
 +F:    drivers/iommu/io-pgtable-arm.c
  
  ARM64 PORT (AARCH64 ARCHITECTURE)
  M:    Catalin Marinas <catalin.marinas@arm.com>
@@@ -1692,6 -1660,7 +1692,6 @@@ M:      Jiri Slaby <jirislaby@gmail.com
  M:    Nick Kossifidis <mickflemm@gmail.com>
  M:    "Luis R. Rodriguez" <mcgrof@do-not-panic.com>
  L:    linux-wireless@vger.kernel.org
 -L:    ath5k-devel@lists.ath5k.org
  W:    http://wireless.kernel.org/en/users/Drivers/ath5k
  S:    Maintained
  F:    drivers/net/wireless/ath/ath5k/
@@@ -1741,7 -1710,7 +1741,7 @@@ S:      Maintaine
  F:    drivers/net/ethernet/atheros/
  
  ATM
 -M:    Chas Williams <chas@cmf.nrl.navy.mil>
 +M:    Chas Williams <3chas3@gmail.com>
  L:    linux-atm-general@lists.sourceforge.net (moderated for non-subscribers)
  L:    netdev@vger.kernel.org
  W:    http://linux-atm.sourceforge.net
@@@ -2076,7 -2045,7 +2076,7 @@@ F:      include/net/bluetooth
  BONDING DRIVER
  M:    Jay Vosburgh <j.vosburgh@gmail.com>
  M:    Veaceslav Falico <vfalico@gmail.com>
 -M:    Andy Gospodarek <andy@greyhouse.net>
 +M:    Andy Gospodarek <gospo@cumulusnetworks.com>
  L:    netdev@vger.kernel.org
  W:    http://sourceforge.net/projects/bonding/
  S:    Supported
@@@ -2118,6 -2087,7 +2118,6 @@@ F:      drivers/net/ethernet/broadcom/bnx2x
  
  BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITECTURE
  M:    Christian Daudt <bcm@fixthebug.org>
 -M:    Matt Porter <mporter@linaro.org>
  M:    Florian Fainelli <f.fainelli@gmail.com>
  L:    bcm-kernel-feedback-list@broadcom.com
  T:    git git://github.com/broadcom/mach-bcm
@@@ -2157,7 -2127,7 +2157,7 @@@ F:      arch/arm/boot/dts/bcm470
  BROADCOM BCM63XX ARM ARCHITECTURE
  M:    Florian Fainelli <f.fainelli@gmail.com>
  L:    linux-arm-kernel@lists.infradead.org
 -T:    git git://git.github.com/brcm/linux.git
 +T:    git git://github.com/broadcom/arm-bcm63xx.git
  S:    Maintained
  F:    arch/arm/mach-bcm/bcm63xx.c
  F:    arch/arm/include/debug/bcm63xx.S
@@@ -2174,7 -2144,6 +2174,7 @@@ M:      Brian Norris <computersforpeace@gmai
  M:    Gregory Fong <gregory.0xf0@gmail.com>
  M:    Florian Fainelli <f.fainelli@gmail.com>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 +T:    git git://github.com/broadcom/stblinux.git
  S:    Maintained
  F:    arch/arm/mach-bcm/*brcmstb*
  F:    arch/arm/boot/dts/bcm7*.dts*
@@@ -2184,7 -2153,6 +2184,7 @@@ BROADCOM BMIPS MIPS ARCHITECTUR
  M:    Kevin Cernekee <cernekee@gmail.com>
  M:    Florian Fainelli <f.fainelli@gmail.com>
  L:    linux-mips@linux-mips.org
 +T:    git git://github.com/broadcom/stblinux.git
  S:    Maintained
  F:    arch/mips/bmips/*
  F:    arch/mips/include/asm/mach-bmips/*
@@@ -2227,7 -2195,7 +2227,7 @@@ M:      Ray Jui <rjui@broadcom.com
  M:    Scott Branden <sbranden@broadcom.com>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  L:    bcm-kernel-feedback-list@broadcom.com
 -T:    git git://git.github.com/brcm/linux.git
 +T:    git git://github.com/broadcom/cygnus-linux.git
  S:    Maintained
  N:    iproc
  N:    cygnus
@@@ -2379,9 -2347,8 +2379,9 @@@ F:      arch/x86/include/asm/tce.
  
  CAN NETWORK LAYER
  M:    Oliver Hartkopp <socketcan@hartkopp.net>
 +M:    Marc Kleine-Budde <mkl@pengutronix.de>
  L:    linux-can@vger.kernel.org
 -W:    http://gitorious.org/linux-can
 +W:    https://github.com/linux-can
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can.git
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next.git
  S:    Maintained
@@@ -2397,7 -2364,7 +2397,7 @@@ CAN NETWORK DRIVER
  M:    Wolfgang Grandegger <wg@grandegger.com>
  M:    Marc Kleine-Budde <mkl@pengutronix.de>
  L:    linux-can@vger.kernel.org
 -W:    http://gitorious.org/linux-can
 +W:    https://github.com/linux-can
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can.git
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next.git
  S:    Maintained
@@@ -2444,8 -2411,7 +2444,8 @@@ F:      arch/powerpc/oprofile/*cell
  F:    arch/powerpc/platforms/cell/
  
  CEPH DISTRIBUTED FILE SYSTEM CLIENT
 -M:    Sage Weil <sage@inktank.com>
 +M:    Yan, Zheng <zyan@redhat.com>
 +M:    Sage Weil <sage@redhat.com>
  L:    ceph-devel@vger.kernel.org
  W:    http://ceph.com/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client.git
@@@ -2982,12 -2948,6 +2982,12 @@@ S:    Supporte
  F:    drivers/input/touchscreen/cyttsp*
  F:    include/linux/input/cyttsp.h
  
 +DALLAS/MAXIM DS1685-FAMILY REAL TIME CLOCK
 +M:    Joshua Kinard <kumba@gentoo.org>
 +S:    Maintained
 +F:    drivers/rtc/rtc-ds1685.c
 +F:    include/linux/rtc/ds1685.h
 +
  DAMA SLAVE for AX.25
  M:    Joerg Reuter <jreuter@yaina.de>
  W:    http://yaina.de/jreuter/
@@@ -3064,7 -3024,6 +3064,7 @@@ F:      drivers/platform/x86/dell-laptop.
  
  DELL LAPTOP SMM DRIVER
  M:    Guenter Roeck <linux@roeck-us.net>
 +S:    Maintained
  F:    drivers/char/i8k.c
  F:    include/uapi/linux/i8k.h
  
@@@ -3080,7 -3039,7 +3080,7 @@@ S:      Maintaine
  F:    drivers/platform/x86/dell-wmi.c
  
  DESIGNWARE USB2 DRD IP DRIVER
 -M:    Paul Zimmerman <paulz@synopsys.com>
 +M:    John Youn <johnyoun@synopsys.com>
  L:    linux-usb@vger.kernel.org
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git
  S:    Maintained
@@@ -3176,12 -3135,6 +3176,12 @@@ L:    linux-i2c@vger.kernel.or
  S:    Maintained
  F:    drivers/i2c/busses/i2c-diolan-u2c.c
  
 +DIRECT ACCESS (DAX)
 +M:    Matthew Wilcox <willy@linux.intel.com>
 +L:    linux-fsdevel@vger.kernel.org
 +S:    Supported
 +F:    fs/dax.c
 +
  DIRECTORY NOTIFICATION (DNOTIFY)
  M:    Eric Paris <eparis@parisplace.org>
  S:    Maintained
@@@ -3266,7 -3219,6 +3266,7 @@@ F:      Documentation
  X:    Documentation/ABI/
  X:    Documentation/devicetree/
  X:    Documentation/[a-z][a-z]_[A-Z][A-Z]/
 +T:    git git://git.lwn.net/linux-2.6.git docs-next
  
  DOUBLETALK DRIVER
  M:    "James R. Van Zandt" <jrv@vanzandt.mv.com>
@@@ -3526,14 -3478,6 +3526,14 @@@ M:    "Maciej W. Rozycki" <macro@linux-mip
  S:    Maintained
  F:    drivers/tty/serial/dz.*
  
 +E3X0 POWER BUTTON DRIVER
 +M:    Moritz Fischer <moritz.fischer@ettus.com>
 +L:    usrp-users@lists.ettus.com
 +W:    http://www.ettus.com
 +S:    Supported
 +F:    drivers/input/misc/e3x0-button.c
 +F:    Documentation/devicetree/bindings/input/e3x0-button.txt
 +
  E4000 MEDIA DRIVER
  M:    Antti Palosaari <crope@iki.fi>
  L:    linux-media@vger.kernel.org
@@@ -3575,8 -3519,6 +3575,8 @@@ M:      Borislav Petkov <bp@alien8.de
  M:    Mauro Carvalho Chehab <mchehab@osg.samsung.com>
  L:    linux-edac@vger.kernel.org
  W:    bluesmoke.sourceforge.net
 +T:    git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp.git#for-next
 +T:    git://git.kernel.org/pub/linux/kernel/git/mchehab/linux-edac.git#linux_next
  S:    Supported
  F:    Documentation/edac.txt
  F:    drivers/edac/
@@@ -3948,7 -3890,7 +3948,7 @@@ S:      Maintaine
  F:    drivers/staging/fbtft/
  
  FCOE SUBSYSTEM (libfc, libfcoe, fcoe)
 -M:    Robert Love <robert.w.love@intel.com>
 +M:    Vasu Dev <vasu.dev@intel.com>
  L:    fcoe-devel@open-fcoe.org
  W:    www.Open-FCoE.org
  S:    Supported
@@@ -4104,12 -4046,6 +4104,12 @@@ S:    Maintaine
  F:    include/linux/platform_data/video-imxfb.h
  F:    drivers/video/fbdev/imxfb.c
  
 +FREESCALE QUAD SPI DRIVER
 +M:    Han Xu <han.xu@freescale.com>
 +L:    linux-mtd@lists.infradead.org
 +S:    Maintained
 +F:    drivers/mtd/spi-nor/fsl-quadspi.c
 +
  FREESCALE SOC FS_ENET DRIVER
  M:    Pantelis Antoniou <pantelis.antoniou@gmail.com>
  M:    Vitaly Bordug <vbordug@ru.mvista.com>
@@@ -4156,12 -4092,6 +4156,12 @@@ F:    sound/soc/fsl/fsl
  F:    sound/soc/fsl/imx*
  F:    sound/soc/fsl/mpc8610_hpcd.c
  
 +FREESCALE QORIQ MANAGEMENT COMPLEX DRIVER
 +M:    J. German Rivera <German.Rivera@freescale.com>
 +L:    linux-kernel@vger.kernel.org
 +S:    Maintained
 +F:    drivers/staging/fsl-mc/
 +
  FREEVXFS FILESYSTEM
  M:    Christoph Hellwig <hch@infradead.org>
  W:    ftp://ftp.openlinux.org/pub/people/hch/vxfs
@@@ -4256,11 -4186,6 +4256,11 @@@ W:    http://www.icp-vortex.com
  S:    Supported
  F:    drivers/scsi/gdt*
  
 +GDB KERNEL DEBUGGING HELPER SCRIPTS
 +M:    Jan Kiszka <jan.kiszka@siemens.com>
 +S:    Supported
 +F:    scripts/gdb/
 +
  GEMTEK FM RADIO RECEIVER DRIVER
  M:    Hans Verkuil <hverkuil@xs4all.nl>
  L:    linux-media@vger.kernel.org
@@@ -4495,7 -4420,6 +4495,7 @@@ F:      include/linux/hwmon*.
  HARDWARE RANDOM NUMBER GENERATOR CORE
  M:    Matt Mackall <mpm@selenic.com>
  M:    Herbert Xu <herbert@gondor.apana.org.au>
 +L:    linux-crypto@vger.kernel.org
  S:    Odd fixes
  F:    Documentation/hw_random.txt
  F:    drivers/char/hw_random/
@@@ -4947,6 -4871,7 +4947,7 @@@ S:      Maintaine
  F:    drivers/iio/
  F:    drivers/staging/iio/
  F:    include/linux/iio/
+ F:    tools/iio/
  
  IKANOS/ADI EAGLE ADSL USB DRIVER
  M:    Matthieu Castet <castet.matthieu@free.fr>
@@@ -4981,7 -4906,7 +4982,7 @@@ F:      drivers/ipack
  
  INTEGRITY MEASUREMENT ARCHITECTURE (IMA)
  M:    Mimi Zohar <zohar@linux.vnet.ibm.com>
 -M:    Dmitry Kasatkin <d.kasatkin@samsung.com>
 +M:    Dmitry Kasatkin <dmitry.kasatkin@gmail.com>
  L:    linux-ima-devel@lists.sourceforge.net
  L:    linux-ima-user@lists.sourceforge.net
  L:    linux-security-module@vger.kernel.org
@@@ -5041,16 -4966,6 +5042,16 @@@ F:    Documentation/input/multi-touch-prot
  F:    drivers/input/input-mt.c
  K:    \b(ABS|SYN)_MT_
  
 +INTEL ASoC BDW/HSW DRIVERS
 +M:    Jie Yang <yang.jie@linux.intel.com>
 +L:    alsa-devel@alsa-project.org
 +S:    Supported
 +F:    sound/soc/intel/sst-haswell*
 +F:    sound/soc/intel/sst-dsp*
 +F:    sound/soc/intel/sst-firmware.c
 +F:    sound/soc/intel/broadwell.c
 +F:    sound/soc/intel/haswell.c
 +
  INTEL C600 SERIES SAS CONTROLLER DRIVER
  M:    Intel SCU Linux support <intel-linux-scu@intel.com>
  M:    Artur Paszkiewicz <artur.paszkiewicz@intel.com>
@@@ -5938,21 -5853,6 +5939,21 @@@ F:    Documentation/misc-devices/lis3lv02
  F:    drivers/misc/lis3lv02d/
  F:    drivers/platform/x86/hp_accel.c
  
 +LIVE PATCHING
 +M:    Josh Poimboeuf <jpoimboe@redhat.com>
 +M:    Seth Jennings <sjenning@redhat.com>
 +M:    Jiri Kosina <jkosina@suse.cz>
 +M:    Vojtech Pavlik <vojtech@suse.cz>
 +S:    Maintained
 +F:    kernel/livepatch/
 +F:    include/linux/livepatch.h
 +F:    arch/x86/include/asm/livepatch.h
 +F:    arch/x86/kernel/livepatch.c
 +F:    Documentation/ABI/testing/sysfs-kernel-livepatch
 +F:    samples/livepatch/
 +L:    live-patching@vger.kernel.org
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/jikos/livepatching.git
 +
  LLC (802.2)
  M:    Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
  S:    Maintained
@@@ -6251,33 -6151,6 +6252,33 @@@ F:    Documentation/devicetree/bindings/i2
  F:    drivers/hwmon/max6697.c
  F:    include/linux/platform_data/max6697.h
  
 +MAXIM MUIC CHARGER DRIVERS FOR EXYNOS BASED BOARDS
 +M:    Krzysztof Kozlowski <k.kozlowski@samsung.com>
 +L:    linux-pm@vger.kernel.org
 +S:    Supported
 +F:    drivers/power/max14577_charger.c
 +F:    drivers/power/max77693_charger.c
 +
 +MAXIM PMIC AND MUIC DRIVERS FOR EXYNOS BASED BOARDS
 +M:    Chanwoo Choi <cw00.choi@samsung.com>
 +M:    Krzysztof Kozlowski <k.kozlowski@samsung.com>
 +L:    linux-kernel@vger.kernel.org
 +S:    Supported
 +F:    drivers/*/max14577.c
 +F:    drivers/*/max77686.c
 +F:    drivers/*/max77693.c
 +F:    drivers/extcon/extcon-max14577.c
 +F:    drivers/extcon/extcon-max77693.c
 +F:    drivers/rtc/rtc-max77686.c
 +F:    drivers/clk/clk-max77686.c
 +F:    Documentation/devicetree/bindings/mfd/max14577.txt
 +F:    Documentation/devicetree/bindings/mfd/max77686.txt
 +F:    Documentation/devicetree/bindings/mfd/max77693.txt
 +F:    Documentation/devicetree/bindings/clock/maxim,max77686.txt
 +F:    include/linux/mfd/max14577*.h
 +F:    include/linux/mfd/max77686*.h
 +F:    include/linux/mfd/max77693*.h
 +
  MAXIRADIO FM RADIO RECEIVER DRIVER
  M:    Hans Verkuil <hverkuil@xs4all.nl>
  L:    linux-media@vger.kernel.org
@@@ -6308,6 -6181,14 +6309,6 @@@ F:     include/uapi/linux/meye.
  F:    include/uapi/linux/ivtv*
  F:    include/uapi/linux/uvcvideo.h
  
 -MEDIAVISION PRO MOVIE STUDIO DRIVER
 -M:    Hans Verkuil <hverkuil@xs4all.nl>
 -L:    linux-media@vger.kernel.org
 -T:    git git://linuxtv.org/media_tree.git
 -W:    http://linuxtv.org
 -S:    Odd Fixes
 -F:    drivers/media/parport/pms*
 -
  MEGARAID SCSI/SAS DRIVERS
  M:    Kashyap Desai <kashyap.desai@avagotech.com>
  M:    Sumit Saxena <sumit.saxena@avagotech.com>
@@@ -6725,10 -6606,9 +6726,10 @@@ F:    include/uapi/linux/netrom.
  F:    net/netrom/
  
  NETWORK BLOCK DEVICE (NBD)
 -M:    Paul Clements <Paul.Clements@steeleye.com>
 +M:    Markus Pargmann <mpa@pengutronix.de>
  S:    Maintained
  L:    nbd-general@lists.sourceforge.net
 +T:    git git://git.pengutronix.de/git/mpa/linux-nbd.git
  F:    Documentation/blockdev/nbd.txt
  F:    drivers/block/nbd.c
  F:    include/linux/nbd.h
@@@ -6757,7 -6637,6 +6758,7 @@@ F:      include/linux/netdevice.
  F:    include/uapi/linux/in.h
  F:    include/uapi/linux/net.h
  F:    include/uapi/linux/netdevice.h
 +F:    include/uapi/linux/net_namespace.h
  F:    tools/net/
  F:    tools/testing/selftests/net/
  F:    lib/random32.c
@@@ -6862,7 -6741,6 +6863,7 @@@ F:      Documentation/devicetree/bindings/ne
  
  NFS, SUNRPC, AND LOCKD CLIENTS
  M:    Trond Myklebust <trond.myklebust@primarydata.com>
 +M:    Anna Schumaker <anna.schumaker@netapp.com>
  L:    linux-nfs@vger.kernel.org
  W:    http://client.linux-nfs.org
  T:    git git://git.linux-nfs.org/projects/trondmy/linux-nfs.git
@@@ -6905,7 -6783,7 +6906,7 @@@ F:      drivers/scsi/nsp32
  NIOS2 ARCHITECTURE
  M:    Ley Foon Tan <lftan@altera.com>
  L:    nios2-dev@lists.rocketboards.org (moderated for non-subscribers)
 -T:    git git://git.rocketboards.org/linux-socfpga.git
 +T:    git git://git.rocketboards.org/linux-socfpga-next.git
  S:    Maintained
  F:    arch/nios2/
  
@@@ -7078,12 -6956,6 +7079,12 @@@ L:    linux-omap@vger.kernel.or
  S:    Maintained
  F:    arch/arm/mach-omap2/omap_hwmod.*
  
 +OMAP HWMOD DATA
 +M:    Paul Walmsley <paul@pwsan.com>
 +L:    linux-omap@vger.kernel.org
 +S:    Maintained
 +F:    arch/arm/mach-omap2/omap_hwmod*data*
 +
  OMAP HWMOD DATA FOR OMAP4-BASED DEVICES
  M:    Benoît Cousson <bcousson@baylibre.com>
  L:    linux-omap@vger.kernel.org
@@@ -7203,12 -7075,11 +7204,12 @@@ F:   arch/openrisc
  
  OPENVSWITCH
  M:    Pravin Shelar <pshelar@nicira.com>
 +L:    netdev@vger.kernel.org
  L:    dev@openvswitch.org
  W:    http://openvswitch.org
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/pshelar/openvswitch.git
  S:    Maintained
  F:    net/openvswitch/
 +F:    include/uapi/linux/openvswitch.h
  
  OPL4 DRIVER
  M:    Clemens Ladisch <clemens@ladisch.de>
@@@ -7230,7 -7101,8 +7231,7 @@@ ORACLE CLUSTER FILESYSTEM 2 (OCFS2
  M:    Mark Fasheh <mfasheh@suse.com>
  M:    Joel Becker <jlbec@evilplan.org>
  L:    ocfs2-devel@oss.oracle.com (moderated for non-subscribers)
 -W:    http://oss.oracle.com/projects/ocfs2/
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2.git
 +W:    http://ocfs2.wiki.kernel.org
  S:    Supported
  F:    Documentation/filesystems/ocfs2.txt
  F:    Documentation/filesystems/dlmfs.txt
@@@ -7319,7 -7191,7 +7320,7 @@@ M:      Alok Kataria <akataria@vmware.com
  M:    Rusty Russell <rusty@rustcorp.com.au>
  L:    virtualization@lists.linux-foundation.org
  S:    Supported
 -F:    Documentation/ia64/paravirt_ops.txt
 +F:    Documentation/virtual/paravirt_ops.txt
  F:    arch/*/kernel/paravirt*
  F:    arch/*/include/asm/paravirt.h
  
@@@ -7405,14 -7277,6 +7406,14 @@@ F:    include/linux/pci
  F:    arch/x86/pci/
  F:    arch/x86/kernel/quirks.c
  
 +PCI DRIVER FOR ARM VERSATILE PLATFORM
 +M:    Rob Herring <robh@kernel.org>
 +L:    linux-pci@vger.kernel.org
 +L:    linux-arm-kernel@lists.infradead.org
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/pci/versatile.txt
 +F:    drivers/pci/host/pci-versatile.c
 +
  PCI DRIVER FOR APPLIEDMICRO XGENE
  M:    Tanmay Inamdar <tinamdar@apm.com>
  L:    linux-pci@vger.kernel.org
@@@ -8014,9 -7878,17 +8015,9 @@@ T:     git git://github.com/KrasnikovEugene
  S:    Supported
  F:    drivers/net/wireless/ath/wcn36xx/
  
 -QUICKCAM PARALLEL PORT WEBCAMS
 -M:    Hans Verkuil <hverkuil@xs4all.nl>
 -L:    linux-media@vger.kernel.org
 -T:    git git://linuxtv.org/media_tree.git
 -W:    http://linuxtv.org
 -S:    Odd Fixes
 -F:    drivers/media/parport/*-qcam*
 -
  RADOS BLOCK DEVICE (RBD)
 -M:    Yehuda Sadeh <yehuda@inktank.com>
 -M:    Sage Weil <sage@inktank.com>
 +M:    Ilya Dryomov <idryomov@gmail.com>
 +M:    Sage Weil <sage@redhat.com>
  M:    Alex Elder <elder@kernel.org>
  M:    ceph-devel@vger.kernel.org
  W:    http://ceph.com/
@@@ -8202,13 -8074,6 +8203,13 @@@ S:    Maintaine
  F:    Documentation/rfkill.txt
  F:    net/rfkill/
  
 +RHASHTABLE
 +M:    Thomas Graf <tgraf@suug.ch>
 +L:    netdev@vger.kernel.org
 +S:    Maintained
 +F:    lib/rhashtable.c
 +F:    include/linux/rhashtable.h
 +
  RICOH SMARTMEDIA/XD DRIVER
  M:    Maxim Levitsky <maximlevitsky@gmail.com>
  S:    Maintained
@@@ -8497,14 -8362,6 +8498,14 @@@ S:    Supporte
  L:    netdev@vger.kernel.org
  F:    drivers/net/ethernet/samsung/sxgbe/
  
 +SAMSUNG THERMAL DRIVER
 +M:    Lukasz Majewski <l.majewski@samsung.com>
 +L:    linux-pm@vger.kernel.org
 +L:    linux-samsung-soc@vger.kernel.org
 +S:    Supported
 +T:    https://github.com/lmajewski/linux-samsung-thermal.git
 +F:    drivers/thermal/samsung/
 +
  SAMSUNG USB2 PHY DRIVER
  M:    Kamil Debski <k.debski@samsung.com>
  L:    linux-kernel@vger.kernel.org
@@@ -8528,7 -8385,6 +8529,7 @@@ SYNOPSYS DESIGNWARE DMAC DRIVE
  M:    Viresh Kumar <viresh.linux@gmail.com>
  M:    Andy Shevchenko <andriy.shevchenko@linux.intel.com>
  S:    Maintained
 +F:    include/linux/dma/dw.h
  F:    include/linux/platform_data/dma-dw.h
  F:    drivers/dma/dw/
  
@@@ -8560,6 -8416,12 +8561,6 @@@ F:     kernel/time/clocksource.
  F:    kernel/time/time*.c
  F:    kernel/time/ntp.c
  
 -TLG2300 VIDEO4LINUX-2 DRIVER
 -M:    Huang Shijie <shijie8@gmail.com>
 -M:    Hans Verkuil <hverkuil@xs4all.nl>
 -S:    Odd Fixes
 -F:    drivers/media/usb/tlg2300/
 -
  SC1200 WDT DRIVER
  M:    Zwane Mwaikambo <zwanem@gmail.com>
  S:    Maintained
@@@ -8591,7 -8453,7 +8592,7 @@@ S:      Maintaine
  F:    drivers/scsi/sr*
  
  SCSI RDMA PROTOCOL (SRP) INITIATOR
 -M:    Bart Van Assche <bvanassche@acm.org>
 +M:    Bart Van Assche <bart.vanassche@sandisk.com>
  L:    linux-rdma@vger.kernel.org
  S:    Supported
  W:    http://www.openfabrics.org
@@@ -8925,15 -8787,6 +8926,15 @@@ S:    Maintaine
  F:    drivers/media/platform/davinci/
  F:    include/media/davinci/
  
 +TI AM437X VPFE DRIVER
 +M:    Lad, Prabhakar <prabhakar.csengg@gmail.com>
 +L:    linux-media@vger.kernel.org
 +W:    http://linuxtv.org/
 +Q:    http://patchwork.linuxtv.org/project/linux-media/list/
 +T:    git git://linuxtv.org/mhadli/v4l-dvb-davinci_devices.git
 +S:    Maintained
 +F:    drivers/media/platform/am437x/
 +
  SIS 190 ETHERNET DRIVER
  M:    Francois Romieu <romieu@fr.zoreil.com>
  L:    netdev@vger.kernel.org
@@@ -9015,8 -8868,6 +9016,8 @@@ F:      drivers/media/i2c/smiapp
  F:    include/media/smiapp.h
  F:    drivers/media/i2c/smiapp-pll.c
  F:    drivers/media/i2c/smiapp-pll.h
 +F:    include/uapi/linux/smiapp.h
 +F:    Documentation/devicetree/bindings/media/i2c/nokia,smia.txt
  
  SMM665 HARDWARE MONITOR DRIVER
  M:    Guenter Roeck <linux@roeck-us.net>
@@@ -9083,7 -8934,6 +9084,7 @@@ SOFTLOGIC 6x10 MPEG CODE
  M:    Bluecherry Maintainers <maintainers@bluecherrydvr.com>
  M:    Andrey Utkin <andrey.utkin@corp.bluecherry.net>
  M:    Andrey Utkin <andrey.krieger.utkin@gmail.com>
 +M:    Ismael Luceno <ismael@iodev.co.uk>
  L:    linux-media@vger.kernel.org
  S:    Supported
  F:    drivers/media/pci/solo6x10/
@@@ -9364,14 -9214,6 +9365,14 @@@ L:    linux-fbdev@vger.kernel.or
  S:    Maintained
  F:    drivers/staging/sm7xxfb/
  
 +STAGING - SILICON MOTION SM750 FRAME BUFFER DRIVER
 +M:    Sudip Mukherjee <sudipm.mukherjee@gmail.com>
 +M:    Teddy Wang <teddy.wang@siliconmotion.com>
 +M:    Sudip Mukherjee <sudip@vectorindia.org>
 +L:    linux-fbdev@vger.kernel.org
 +S:    Maintained
 +F:    drivers/staging/sm750fb/
 +
  STAGING - SLICOSS
  M:    Lior Dotan <liodot@gmail.com>
  M:    Christopher Harrer <charrer@alacritech.com>
@@@ -9412,13 -9254,6 +9413,13 @@@ F:    arch/m68k/sun3*
  F:    arch/m68k/include/asm/sun3*
  F:    drivers/net/ethernet/i825xx/sun3*
  
 +SUN4I LOW RES ADC ATTACHED TABLET KEYS DRIVER
 +M:    Hans de Goede <hdegoede@redhat.com>
 +L:    linux-input@vger.kernel.org
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
 +F:    drivers/input/keyboard/sun4i-lradc-keys.c
 +
  SUNDANCE NETWORK DRIVER
  M:    Denis Kirjanov <kda@linux-powerpc.org>
  L:    netdev@vger.kernel.org
@@@ -9427,6 -9262,7 +9428,6 @@@ F:      drivers/net/ethernet/dlink/sundance.
  
  SUPERH
  L:    linux-sh@vger.kernel.org
 -W:    http://www.linux-sh.org
  Q:    http://patchwork.kernel.org/project/linux-sh/list/
  S:    Orphan
  F:    Documentation/sh/
@@@ -9751,11 -9587,6 +9752,11 @@@ L:    linux-omap@vger.kernel.or
  S:    Maintained
  F:    drivers/thermal/ti-soc-thermal/
  
 +TI CDCE706 CLOCK DRIVER
 +M:    Max Filippov <jcmvbkbc@gmail.com>
 +S:    Maintained
 +F:    drivers/clk/clk-cdce706.c
 +
  TI CLOCK DRIVER
  M:    Tero Kristo <t-kristo@ti.com>
  L:    linux-omap@vger.kernel.org
@@@ -9810,13 -9641,6 +9811,13 @@@ F:    drivers/power/lp8788-charger.
  F:    drivers/regulator/lp8788-*.c
  F:    include/linux/mfd/lp8788*.h
  
 +TI NETCP ETHERNET DRIVER
 +M:    Wingman Kwok <w-kwok2@ti.com>
 +M:    Murali Karicheri <m-karicheri2@ti.com>
 +L:    netdev@vger.kernel.org
 +S:    Maintained
 +F:    drivers/net/ethernet/ti/netcp*
 +
  TI TWL4030 SERIES SOC CODEC DRIVER
  M:    Peter Ujfalusi <peter.ujfalusi@ti.com>
  L:    alsa-devel@alsa-project.org (moderated for non-subscribers)
@@@ -9844,7 -9668,7 +9845,7 @@@ F:      net/tipc
  
  TILE ARCHITECTURE
  M:    Chris Metcalf <cmetcalf@ezchip.com>
 -W:    http://www.tilera.com/scm/
 +W:    http://www.ezchip.com/scm/
  S:    Supported
  F:    arch/tile/
  F:    drivers/char/tile-srom.c
@@@ -9937,21 -9761,13 +9938,21 @@@ F:   drivers/media/pci/tw68
  
  TPM DEVICE DRIVER
  M:    Peter Huewe <peterhuewe@gmx.de>
 -M:    Ashley Lai <ashley@ashleylai.com>
  M:    Marcel Selhorst <tpmdd@selhorst.net>
  W:    http://tpmdd.sourceforge.net
  L:    tpmdd-devel@lists.sourceforge.net (moderated for non-subscribers)
 +Q:    git git://github.com/PeterHuewe/linux-tpmdd.git
 +T:    https://github.com/PeterHuewe/linux-tpmdd
  S:    Maintained
  F:    drivers/char/tpm/
  
 +TPM IBM_VTPM DEVICE DRIVER
 +M:    Ashley Lai <ashleydlai@gmail.com>
 +W:    http://tpmdd.sourceforge.net
 +L:    tpmdd-devel@lists.sourceforge.net (moderated for non-subscribers)
 +S:    Maintained
 +F:    drivers/char/tpm/tpm_ibmvtpm*
 +
  TRACING
  M:    Steven Rostedt <rostedt@goodmis.org>
  M:    Ingo Molnar <mingo@redhat.com>
@@@ -10106,15 -9922,20 +10107,15 @@@ F: drivers/scsi/ufs
  
  UNSORTED BLOCK IMAGES (UBI)
  M:    Artem Bityutskiy <dedekind1@gmail.com>
 +M:    Richard Weinberger <richard@nod.at>
  W:    http://www.linux-mtd.infradead.org/
  L:    linux-mtd@lists.infradead.org
  T:    git git://git.infradead.org/ubifs-2.6.git
 -S:    Maintained
 +S:    Supported
  F:    drivers/mtd/ubi/
  F:    include/linux/mtd/ubi.h
  F:    include/uapi/mtd/ubi-user.h
  
 -UNSORTED BLOCK IMAGES (UBI) Fastmap
 -M:    Richard Weinberger <richard@nod.at>
 -L:    linux-mtd@lists.infradead.org
 -S:    Maintained
 -F:    drivers/mtd/ubi/fastmap.c
 -
  USB ACM DRIVER
  M:    Oliver Neukum <oliver@neukum.org>
  L:    linux-usb@vger.kernel.org
@@@ -10221,13 -10042,6 +10222,13 @@@ S: Maintaine
  F:    Documentation/usb/ohci.txt
  F:    drivers/usb/host/ohci*
  
 +USB OTG FSM (Finite State Machine)
 +M:    Peter Chen <Peter.Chen@freescale.com>
 +T:    git git://github.com/hzpeterchen/linux-usb.git
 +L:    linux-usb@vger.kernel.org
 +S:    Maintained
 +F:    drivers/usb/common/usb-otg-fsm.c
 +
  USB OVER IP DRIVER
  M:    Valentina Manea <valentina.manea.m@gmail.com>
  M:    Shuah Khan <shuah.kh@samsung.com>
@@@ -10811,7 -10625,6 +10812,7 @@@ F:   drivers/pci/*xen
  
  XEN BLOCK SUBSYSTEM
  M:    Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
 +M:    Roger Pau Monné <roger.pau@citrix.com>
  L:    xen-devel@lists.xenproject.org (moderated for non-subscribers)
  S:    Supported
  F:    drivers/block/xen-blkback/*
@@@ -10867,7 -10680,6 +10868,7 @@@ M:   Max Filippov <jcmvbkbc@gmail.com
  L:    linux-xtensa@linux-xtensa.org
  S:    Maintained
  F:    drivers/spi/spi-xtensa-xtfpga.c
 +F:    sound/soc/xtensa/xtfpga-i2s.c
  
  YAM DRIVER FOR AX.25
  M:    Jean-Paul Roubelat <jpr@f6fbb.org>
index d8d5bed65e072cae577968edb78e2e592c2a5bfa,c42e08ee92dadce01520829dbdf1f8cf6c63c272..5613f3ab9f96a903c709a54559c83fe679fa6f15
@@@ -780,11 -780,7 +780,11 @@@ static int inv_mpu_probe(struct i2c_cli
  
        i2c_set_clientdata(client, indio_dev);
        indio_dev->dev.parent = &client->dev;
 -      indio_dev->name = id->name;
 +      /* id will be NULL when enumerated via ACPI */
 +      if (id)
 +              indio_dev->name = (char *)id->name;
 +      else
 +              indio_dev->name = (char *)dev_name(&client->dev);
        indio_dev->channels = inv_mpu_channels;
        indio_dev->num_channels = ARRAY_SIZE(inv_mpu_channels);
  
                goto out_unreg_device;
        }
  
+       result = inv_mpu_acpi_create_mux_client(st);
+       if (result)
+               goto out_del_mux;
        return 0;
  
+ out_del_mux:
+       i2c_del_mux_adapter(st->mux_adapter);
  out_unreg_device:
        iio_device_unregister(indio_dev);
  out_remove_trigger:
@@@ -841,6 -843,7 +847,7 @@@ static int inv_mpu_remove(struct i2c_cl
        struct iio_dev *indio_dev = i2c_get_clientdata(client);
        struct inv_mpu6050_state *st = iio_priv(indio_dev);
  
+       inv_mpu_acpi_delete_mux_client(st);
        i2c_del_mux_adapter(st->mux_adapter);
        iio_device_unregister(indio_dev);
        inv_mpu6050_remove_trigger(st);
index a224afd6380c84eff7c76996c7c38eb621493140,cd937d9293ffe1cbe849500a38da986d45b9f720..01a1a16ab7be8fcc4ae7df6a2782caa377b271a7
@@@ -59,6 -59,16 +59,16 @@@ config CM323
         To compile this driver as a module, choose M here:
         the module will be called cm3232.
  
+ config CM3323
+       depends on I2C
+       tristate "Capella CM3323 color light sensor"
+       help
+        Say Y here if you want to build a driver for Capela CM3323
+        color sensor.
+        To compile this driver as a module, choose M here: the module will
+        be called cm3323.
  config CM36651
        depends on I2C
        tristate "CM36651 driver"
@@@ -73,7 -83,6 +83,7 @@@
  config GP2AP020A00F
        tristate "Sharp GP2AP020A00F Proximity/ALS sensor"
        depends on I2C
 +      select REGMAP_I2C
        select IIO_BUFFER
        select IIO_TRIGGERED_BUFFER
        select IRQ_WORK
@@@ -127,7 -136,6 +137,7 @@@ config HID_SENSOR_PRO
  config JSA1212
        tristate "JSA1212 ALS and proximity sensor driver"
        depends on I2C
 +      select REGMAP_I2C
        help
         Say Y here if you want to build a IIO driver for JSA1212
         proximity & ALS sensor device.
index 816174388f13347447c495700e3dad85e7c269db,d5f8ea96f4bc10c61e4b2ed202fbe3b9ca71b477..17f4ee7f8b76b82ca551d5455730ab306924b070
@@@ -214,17 -214,11 +214,17 @@@ struct mxs_lradc 
        unsigned long           is_divided;
  
        /*
 -       * Touchscreen LRADC channels receives a private slot in the CTRL4
 -       * register, the slot #7. Therefore only 7 slots instead of 8 in the
 -       * CTRL4 register can be mapped to LRADC channels when using the
 -       * touchscreen.
 -       *
 +       * When the touchscreen is enabled, we give it two private virtual
 +       * channels: #6 and #7. This means that only 6 virtual channels (instead
 +       * of 8) will be available for buffered capture.
 +       */
 +#define TOUCHSCREEN_VCHANNEL1         7
 +#define TOUCHSCREEN_VCHANNEL2         6
 +#define BUFFER_VCHANS_LIMITED         0x3f
 +#define BUFFER_VCHANS_ALL             0xff
 +      u8                      buffer_vchans;
 +
 +      /*
         * Furthermore, certain LRADC channels are shared between touchscreen
         * and/or touch-buttons and generic LRADC block. Therefore when using
         * either of these, these channels are not available for the regular
  #define       LRADC_CTRL4                             0x140
  #define       LRADC_CTRL4_LRADCSELECT_MASK(n)         (0xf << ((n) * 4))
  #define       LRADC_CTRL4_LRADCSELECT_OFFSET(n)       ((n) * 4)
 +#define       LRADC_CTRL4_LRADCSELECT(n, x) \
 +                              (((x) << LRADC_CTRL4_LRADCSELECT_OFFSET(n)) & \
 +                              LRADC_CTRL4_LRADCSELECT_MASK(n))
  
  #define LRADC_RESOLUTION                      12
  #define LRADC_SINGLE_SAMPLE_MASK              ((1 << LRADC_RESOLUTION) - 1)
@@@ -425,14 -416,6 +425,14 @@@ static bool mxs_lradc_check_touch_event
                                        LRADC_STATUS_TOUCH_DETECT_RAW);
  }
  
 +static void mxs_lradc_map_channel(struct mxs_lradc *lradc, unsigned vch,
 +                                unsigned ch)
 +{
 +      mxs_lradc_reg_clear(lradc, LRADC_CTRL4_LRADCSELECT_MASK(vch),
 +                              LRADC_CTRL4);
 +      mxs_lradc_reg_set(lradc, LRADC_CTRL4_LRADCSELECT(vch, ch), LRADC_CTRL4);
 +}
 +
  static void mxs_lradc_setup_ts_channel(struct mxs_lradc *lradc, unsigned ch)
  {
        /*
                LRADC_DELAY_DELAY(lradc->over_sample_delay - 1),
                        LRADC_DELAY(3));
  
 -      mxs_lradc_reg_clear(lradc, LRADC_CTRL1_LRADC_IRQ(2) |
 -                      LRADC_CTRL1_LRADC_IRQ(3) | LRADC_CTRL1_LRADC_IRQ(4) |
 -                      LRADC_CTRL1_LRADC_IRQ(5), LRADC_CTRL1);
 +      mxs_lradc_reg_clear(lradc, LRADC_CTRL1_LRADC_IRQ(ch), LRADC_CTRL1);
  
 -      /* wake us again, when the complete conversion is done */
 -      mxs_lradc_reg_set(lradc, LRADC_CTRL1_LRADC_IRQ_EN(ch), LRADC_CTRL1);
        /*
         * after changing the touchscreen plates setting
         * the signals need some initial time to settle. Start the
@@@ -522,8 -509,12 +522,8 @@@ static void mxs_lradc_setup_ts_pressure
                LRADC_DELAY_DELAY(lradc->over_sample_delay - 1),
                                        LRADC_DELAY(3));
  
 -      mxs_lradc_reg_clear(lradc, LRADC_CTRL1_LRADC_IRQ(2) |
 -                      LRADC_CTRL1_LRADC_IRQ(3) | LRADC_CTRL1_LRADC_IRQ(4) |
 -                      LRADC_CTRL1_LRADC_IRQ(5), LRADC_CTRL1);
 +      mxs_lradc_reg_clear(lradc, LRADC_CTRL1_LRADC_IRQ(ch2), LRADC_CTRL1);
  
 -      /* wake us again, when the conversions are done */
 -      mxs_lradc_reg_set(lradc, LRADC_CTRL1_LRADC_IRQ_EN(ch2), LRADC_CTRL1);
        /*
         * after changing the touchscreen plates setting
         * the signals need some initial time to settle. Start the
@@@ -589,6 -580,36 +589,6 @@@ static unsigned mxs_lradc_read_ts_press
  #define TS_CH_XM 4
  #define TS_CH_YM 5
  
 -static int mxs_lradc_read_ts_channel(struct mxs_lradc *lradc)
 -{
 -      u32 reg;
 -      int val;
 -
 -      reg = readl(lradc->base + LRADC_CTRL1);
 -
 -      /* only channels 3 to 5 are of interest here */
 -      if (reg & LRADC_CTRL1_LRADC_IRQ(TS_CH_YP)) {
 -              mxs_lradc_reg_clear(lradc, LRADC_CTRL1_LRADC_IRQ_EN(TS_CH_YP) |
 -                      LRADC_CTRL1_LRADC_IRQ(TS_CH_YP), LRADC_CTRL1);
 -              val = mxs_lradc_read_raw_channel(lradc, TS_CH_YP);
 -      } else if (reg & LRADC_CTRL1_LRADC_IRQ(TS_CH_XM)) {
 -              mxs_lradc_reg_clear(lradc, LRADC_CTRL1_LRADC_IRQ_EN(TS_CH_XM) |
 -                      LRADC_CTRL1_LRADC_IRQ(TS_CH_XM), LRADC_CTRL1);
 -              val = mxs_lradc_read_raw_channel(lradc, TS_CH_XM);
 -      } else if (reg & LRADC_CTRL1_LRADC_IRQ(TS_CH_YM)) {
 -              mxs_lradc_reg_clear(lradc, LRADC_CTRL1_LRADC_IRQ_EN(TS_CH_YM) |
 -                      LRADC_CTRL1_LRADC_IRQ(TS_CH_YM), LRADC_CTRL1);
 -              val = mxs_lradc_read_raw_channel(lradc, TS_CH_YM);
 -      } else {
 -              return -EIO;
 -      }
 -
 -      mxs_lradc_reg_wrt(lradc, 0, LRADC_DELAY(2));
 -      mxs_lradc_reg_wrt(lradc, 0, LRADC_DELAY(3));
 -
 -      return val;
 -}
 -
  /*
   * YP(open)--+-------------+
   *           |             |--+
@@@ -632,8 -653,7 +632,8 @@@ static void mxs_lradc_prepare_x_pos(str
        mxs_lradc_reg_set(lradc, mxs_lradc_drive_x_plate(lradc), LRADC_CTRL0);
  
        lradc->cur_plate = LRADC_SAMPLE_X;
 -      mxs_lradc_setup_ts_channel(lradc, TS_CH_YP);
 +      mxs_lradc_map_channel(lradc, TOUCHSCREEN_VCHANNEL1, TS_CH_YP);
 +      mxs_lradc_setup_ts_channel(lradc, TOUCHSCREEN_VCHANNEL1);
  }
  
  /*
@@@ -654,8 -674,7 +654,8 @@@ static void mxs_lradc_prepare_y_pos(str
        mxs_lradc_reg_set(lradc, mxs_lradc_drive_y_plate(lradc), LRADC_CTRL0);
  
        lradc->cur_plate = LRADC_SAMPLE_Y;
 -      mxs_lradc_setup_ts_channel(lradc, TS_CH_XM);
 +      mxs_lradc_map_channel(lradc, TOUCHSCREEN_VCHANNEL1, TS_CH_XM);
 +      mxs_lradc_setup_ts_channel(lradc, TOUCHSCREEN_VCHANNEL1);
  }
  
  /*
@@@ -676,10 -695,7 +676,10 @@@ static void mxs_lradc_prepare_pressure(
        mxs_lradc_reg_set(lradc, mxs_lradc_drive_pressure(lradc), LRADC_CTRL0);
  
        lradc->cur_plate = LRADC_SAMPLE_PRESSURE;
 -      mxs_lradc_setup_ts_pressure(lradc, TS_CH_XP, TS_CH_YM);
 +      mxs_lradc_map_channel(lradc, TOUCHSCREEN_VCHANNEL1, TS_CH_YM);
 +      mxs_lradc_map_channel(lradc, TOUCHSCREEN_VCHANNEL2, TS_CH_XP);
 +      mxs_lradc_setup_ts_pressure(lradc, TOUCHSCREEN_VCHANNEL2,
 +                                              TOUCHSCREEN_VCHANNEL1);
  }
  
  static void mxs_lradc_enable_touch_detection(struct mxs_lradc *lradc)
        mxs_lradc_reg_set(lradc, LRADC_CTRL1_TOUCH_DETECT_IRQ_EN, LRADC_CTRL1);
  }
  
 +static void mxs_lradc_start_touch_event(struct mxs_lradc *lradc)
 +{
 +      mxs_lradc_reg_clear(lradc, LRADC_CTRL1_TOUCH_DETECT_IRQ_EN,
 +                              LRADC_CTRL1);
 +      mxs_lradc_reg_set(lradc,
 +              LRADC_CTRL1_LRADC_IRQ_EN(TOUCHSCREEN_VCHANNEL1), LRADC_CTRL1);
 +      /*
 +       * start with the Y-pos, because it uses nearly the same plate
 +       * settings like the touch detection
 +       */
 +      mxs_lradc_prepare_y_pos(lradc);
 +}
 +
  static void mxs_lradc_report_ts_event(struct mxs_lradc *lradc)
  {
        input_report_abs(lradc->ts_input, ABS_X, lradc->ts_x_pos);
@@@ -722,12 -725,10 +722,12 @@@ static void mxs_lradc_complete_touch_ev
         * start a dummy conversion to burn time to settle the signals
         * note: we are not interested in the conversion's value
         */
 -      mxs_lradc_reg_wrt(lradc, 0, LRADC_CH(5));
 -      mxs_lradc_reg_clear(lradc, LRADC_CTRL1_LRADC_IRQ(5), LRADC_CTRL1);
 -      mxs_lradc_reg_set(lradc, LRADC_CTRL1_LRADC_IRQ_EN(5), LRADC_CTRL1);
 -      mxs_lradc_reg_wrt(lradc, LRADC_DELAY_TRIGGER(1 << 5) |
 +      mxs_lradc_reg_wrt(lradc, 0, LRADC_CH(TOUCHSCREEN_VCHANNEL1));
 +      mxs_lradc_reg_clear(lradc,
 +              LRADC_CTRL1_LRADC_IRQ(TOUCHSCREEN_VCHANNEL1) |
 +              LRADC_CTRL1_LRADC_IRQ(TOUCHSCREEN_VCHANNEL2), LRADC_CTRL1);
 +      mxs_lradc_reg_wrt(lradc,
 +              LRADC_DELAY_TRIGGER(1 << TOUCHSCREEN_VCHANNEL1) |
                LRADC_DELAY_KICK | LRADC_DELAY_DELAY(10), /* waste 5 ms */
                        LRADC_DELAY(2));
  }
@@@ -759,45 -760,59 +759,45 @@@ static void mxs_lradc_finish_touch_even
  
        /* if it is released, wait for the next touch via IRQ */
        lradc->cur_plate = LRADC_TOUCH;
 -      mxs_lradc_reg_clear(lradc, LRADC_CTRL1_TOUCH_DETECT_IRQ, LRADC_CTRL1);
 +      mxs_lradc_reg_wrt(lradc, 0, LRADC_DELAY(2));
 +      mxs_lradc_reg_wrt(lradc, 0, LRADC_DELAY(3));
 +      mxs_lradc_reg_clear(lradc, LRADC_CTRL1_TOUCH_DETECT_IRQ |
 +              LRADC_CTRL1_LRADC_IRQ_EN(TOUCHSCREEN_VCHANNEL1) |
 +              LRADC_CTRL1_LRADC_IRQ(TOUCHSCREEN_VCHANNEL1), LRADC_CTRL1);
        mxs_lradc_reg_set(lradc, LRADC_CTRL1_TOUCH_DETECT_IRQ_EN, LRADC_CTRL1);
  }
  
  /* touchscreen's state machine */
  static void mxs_lradc_handle_touch(struct mxs_lradc *lradc)
  {
 -      int val;
 -
        switch (lradc->cur_plate) {
        case LRADC_TOUCH:
 -              /*
 -               * start with the Y-pos, because it uses nearly the same plate
 -               * settings like the touch detection
 -               */
 -              if (mxs_lradc_check_touch_event(lradc)) {
 -                      mxs_lradc_reg_clear(lradc,
 -                                      LRADC_CTRL1_TOUCH_DETECT_IRQ_EN,
 -                                      LRADC_CTRL1);
 -                      mxs_lradc_prepare_y_pos(lradc);
 -              }
 +              if (mxs_lradc_check_touch_event(lradc))
 +                      mxs_lradc_start_touch_event(lradc);
                mxs_lradc_reg_clear(lradc, LRADC_CTRL1_TOUCH_DETECT_IRQ,
                                        LRADC_CTRL1);
                return;
  
        case LRADC_SAMPLE_Y:
 -              val = mxs_lradc_read_ts_channel(lradc);
 -              if (val < 0) {
 -                      mxs_lradc_enable_touch_detection(lradc); /* re-start */
 -                      return;
 -              }
 -              lradc->ts_y_pos = val;
 +              lradc->ts_y_pos = mxs_lradc_read_raw_channel(lradc,
 +                                                      TOUCHSCREEN_VCHANNEL1);
                mxs_lradc_prepare_x_pos(lradc);
                return;
  
        case LRADC_SAMPLE_X:
 -              val = mxs_lradc_read_ts_channel(lradc);
 -              if (val < 0) {
 -                      mxs_lradc_enable_touch_detection(lradc); /* re-start */
 -                      return;
 -              }
 -              lradc->ts_x_pos = val;
 +              lradc->ts_x_pos = mxs_lradc_read_raw_channel(lradc,
 +                                                      TOUCHSCREEN_VCHANNEL1);
                mxs_lradc_prepare_pressure(lradc);
                return;
  
        case LRADC_SAMPLE_PRESSURE:
 -              lradc->ts_pressure =
 -                      mxs_lradc_read_ts_pressure(lradc, TS_CH_XP, TS_CH_YM);
 +              lradc->ts_pressure = mxs_lradc_read_ts_pressure(lradc,
 +                                                      TOUCHSCREEN_VCHANNEL2,
 +                                                      TOUCHSCREEN_VCHANNEL1);
                mxs_lradc_complete_touch_event(lradc);
                return;
  
        case LRADC_SAMPLE_VALID:
 -              val = mxs_lradc_read_ts_channel(lradc); /* ignore the value */
                mxs_lradc_finish_touch_event(lradc, 1);
                break;
        }
@@@ -829,9 -844,9 +829,9 @@@ static int mxs_lradc_read_single(struc
         * used if doing raw sampling.
         */
        if (lradc->soc == IMX28_LRADC)
 -              mxs_lradc_reg_clear(lradc, LRADC_CTRL1_MX28_LRADC_IRQ_EN_MASK,
 +              mxs_lradc_reg_clear(lradc, LRADC_CTRL1_LRADC_IRQ_EN(0),
                        LRADC_CTRL1);
 -      mxs_lradc_reg_clear(lradc, 0xff, LRADC_CTRL0);
 +      mxs_lradc_reg_clear(lradc, 0x1, LRADC_CTRL0);
  
        /* Enable / disable the divider per requirement */
        if (test_bit(chan, &lradc->is_divided))
@@@ -993,7 -1008,7 +993,7 @@@ static ssize_t mxs_lradc_show_scale_ava
        int i, len = 0;
  
        for (i = 0; i < ARRAY_SIZE(lradc->scale_avail[ch]); i++)
-               len += sprintf(buf + len, "%d.%09u ",
+               len += sprintf(buf + len, "%u.%09u ",
                               lradc->scale_avail[ch][i].integer,
                               lradc->scale_avail[ch][i].nano);
  
@@@ -1075,8 -1090,9 +1075,8 @@@ static void mxs_lradc_disable_ts(struc
  {
        /* stop all interrupts from firing */
        mxs_lradc_reg_clear(lradc, LRADC_CTRL1_TOUCH_DETECT_IRQ_EN |
 -              LRADC_CTRL1_LRADC_IRQ_EN(2) | LRADC_CTRL1_LRADC_IRQ_EN(3) |
 -              LRADC_CTRL1_LRADC_IRQ_EN(4) | LRADC_CTRL1_LRADC_IRQ_EN(5),
 -              LRADC_CTRL1);
 +              LRADC_CTRL1_LRADC_IRQ_EN(TOUCHSCREEN_VCHANNEL1) |
 +              LRADC_CTRL1_LRADC_IRQ_EN(TOUCHSCREEN_VCHANNEL2), LRADC_CTRL1);
  
        /* Power-down touchscreen touch-detect circuitry. */
        mxs_lradc_reg_clear(lradc, mxs_lradc_plate_mask(lradc), LRADC_CTRL0);
@@@ -1142,31 -1158,26 +1142,31 @@@ static irqreturn_t mxs_lradc_handle_irq
        struct iio_dev *iio = data;
        struct mxs_lradc *lradc = iio_priv(iio);
        unsigned long reg = readl(lradc->base + LRADC_CTRL1);
 +      uint32_t clr_irq = mxs_lradc_irq_mask(lradc);
        const uint32_t ts_irq_mask =
                LRADC_CTRL1_TOUCH_DETECT_IRQ |
 -              LRADC_CTRL1_LRADC_IRQ(2) |
 -              LRADC_CTRL1_LRADC_IRQ(3) |
 -              LRADC_CTRL1_LRADC_IRQ(4) |
 -              LRADC_CTRL1_LRADC_IRQ(5);
 +              LRADC_CTRL1_LRADC_IRQ(TOUCHSCREEN_VCHANNEL1) |
 +              LRADC_CTRL1_LRADC_IRQ(TOUCHSCREEN_VCHANNEL2);
  
        if (!(reg & mxs_lradc_irq_mask(lradc)))
                return IRQ_NONE;
  
 -      if (lradc->use_touchscreen && (reg & ts_irq_mask))
 +      if (lradc->use_touchscreen && (reg & ts_irq_mask)) {
                mxs_lradc_handle_touch(lradc);
  
 -      if (iio_buffer_enabled(iio))
 -              iio_trigger_poll(iio->trig);
 -      else if (reg & LRADC_CTRL1_LRADC_IRQ(0))
 +              /* Make sure we don't clear the next conversion's interrupt. */
 +              clr_irq &= ~(LRADC_CTRL1_LRADC_IRQ(TOUCHSCREEN_VCHANNEL1) |
 +                              LRADC_CTRL1_LRADC_IRQ(TOUCHSCREEN_VCHANNEL2));
 +      }
 +
 +      if (iio_buffer_enabled(iio)) {
 +              if (reg & lradc->buffer_vchans)
 +                      iio_trigger_poll(iio->trig);
 +      } else if (reg & LRADC_CTRL1_LRADC_IRQ(0)) {
                complete(&lradc->completion);
 +      }
  
 -      mxs_lradc_reg_clear(lradc, reg & mxs_lradc_irq_mask(lradc),
 -                      LRADC_CTRL1);
 +      mxs_lradc_reg_clear(lradc, reg & clr_irq, LRADC_CTRL1);
  
        return IRQ_HANDLED;
  }
@@@ -1278,10 -1289,9 +1278,10 @@@ static int mxs_lradc_buffer_preenable(s
        }
  
        if (lradc->soc == IMX28_LRADC)
 -              mxs_lradc_reg_clear(lradc, LRADC_CTRL1_MX28_LRADC_IRQ_EN_MASK,
 -                                                      LRADC_CTRL1);
 -      mxs_lradc_reg_clear(lradc, 0xff, LRADC_CTRL0);
 +              mxs_lradc_reg_clear(lradc,
 +                      lradc->buffer_vchans << LRADC_CTRL1_LRADC_IRQ_EN_OFFSET,
 +                      LRADC_CTRL1);
 +      mxs_lradc_reg_clear(lradc, lradc->buffer_vchans, LRADC_CTRL0);
  
        for_each_set_bit(chan, iio->active_scan_mask, LRADC_MAX_TOTAL_CHANS) {
                ctrl4_set |= chan << LRADC_CTRL4_LRADCSELECT_OFFSET(ofs);
@@@ -1314,11 -1324,10 +1314,11 @@@ static int mxs_lradc_buffer_postdisable
        mxs_lradc_reg_clear(lradc, LRADC_DELAY_TRIGGER_LRADCS_MASK |
                                        LRADC_DELAY_KICK, LRADC_DELAY(0));
  
 -      mxs_lradc_reg_clear(lradc, 0xff, LRADC_CTRL0);
 +      mxs_lradc_reg_clear(lradc, lradc->buffer_vchans, LRADC_CTRL0);
        if (lradc->soc == IMX28_LRADC)
 -              mxs_lradc_reg_clear(lradc, LRADC_CTRL1_MX28_LRADC_IRQ_EN_MASK,
 -                                      LRADC_CTRL1);
 +              mxs_lradc_reg_clear(lradc,
 +                      lradc->buffer_vchans << LRADC_CTRL1_LRADC_IRQ_EN_OFFSET,
 +                      LRADC_CTRL1);
  
        kfree(lradc->buffer);
        mutex_unlock(&lradc->lock);
@@@ -1344,7 -1353,7 +1344,7 @@@ static bool mxs_lradc_validate_scan_mas
        if (lradc->use_touchbutton)
                rsvd_chans++;
        if (lradc->use_touchscreen)
 -              rsvd_chans++;
 +              rsvd_chans += 2;
  
        /* Test for attempts to map channels with special mode of operation. */
        if (bitmap_intersects(mask, &rsvd_mask, LRADC_MAX_TOTAL_CHANS))
@@@ -1404,13 -1413,6 +1404,13 @@@ static const struct iio_chan_spec mxs_l
                .channel = 8,
                .scan_type = {.sign = 'u', .realbits = 18, .storagebits = 32,},
        },
 +      /* Hidden channel to keep indexes */
 +      {
 +              .type = IIO_TEMP,
 +              .indexed = 1,
 +              .scan_index = -1,
 +              .channel = 9,
 +      },
        MXS_ADC_CHAN(10, IIO_VOLTAGE),  /* VDDIO */
        MXS_ADC_CHAN(11, IIO_VOLTAGE),  /* VTH */
        MXS_ADC_CHAN(12, IIO_VOLTAGE),  /* VDDA */
@@@ -1581,11 -1583,6 +1581,11 @@@ static int mxs_lradc_probe(struct platf
  
        touch_ret = mxs_lradc_probe_touchscreen(lradc, node);
  
 +      if (touch_ret == 0)
 +              lradc->buffer_vchans = BUFFER_VCHANS_LIMITED;
 +      else
 +              lradc->buffer_vchans = BUFFER_VCHANS_ALL;
 +
        /* Grab all IRQ sources */
        for (i = 0; i < of_cfg->irq_count; i++) {
                lradc->irq[i] = platform_get_irq(pdev, i);
index 6b4c74236916fd5729efb2e6f4b1a4e99ca6ce1a,2beff253bd0d935233b582ae5bcf22b611625cbd..ff08667fa2f60071ab6a5dd800830db2ae03b224
  #include "hmc5843.h"
  
  static const struct regmap_range hmc5843_readable_ranges[] = {
-               regmap_reg_range(0, HMC5843_ID_END),
+       regmap_reg_range(0, HMC5843_ID_END),
  };
  
- static struct regmap_access_table hmc5843_readable_table = {
-               .yes_ranges = hmc5843_readable_ranges,
-               .n_yes_ranges = ARRAY_SIZE(hmc5843_readable_ranges),
+ static const struct regmap_access_table hmc5843_readable_table = {
+       .yes_ranges = hmc5843_readable_ranges,
+       .n_yes_ranges = ARRAY_SIZE(hmc5843_readable_ranges),
  };
  
  static const struct regmap_range hmc5843_writable_ranges[] = {
-               regmap_reg_range(0, HMC5843_MODE_REG),
+       regmap_reg_range(0, HMC5843_MODE_REG),
  };
  
- static struct regmap_access_table hmc5843_writable_table = {
-               .yes_ranges = hmc5843_writable_ranges,
-               .n_yes_ranges = ARRAY_SIZE(hmc5843_writable_ranges),
+ static const struct regmap_access_table hmc5843_writable_table = {
+       .yes_ranges = hmc5843_writable_ranges,
+       .n_yes_ranges = ARRAY_SIZE(hmc5843_writable_ranges),
  };
  
  static const struct regmap_range hmc5843_volatile_ranges[] = {
-               regmap_reg_range(HMC5843_DATA_OUT_MSB_REGS, HMC5843_STATUS_REG),
+       regmap_reg_range(HMC5843_DATA_OUT_MSB_REGS, HMC5843_STATUS_REG),
  };
  
- static struct regmap_access_table hmc5843_volatile_table = {
-               .yes_ranges = hmc5843_volatile_ranges,
-               .n_yes_ranges = ARRAY_SIZE(hmc5843_volatile_ranges),
+ static const struct regmap_access_table hmc5843_volatile_table = {
+       .yes_ranges = hmc5843_volatile_ranges,
+       .n_yes_ranges = ARRAY_SIZE(hmc5843_volatile_ranges),
  };
  
- static struct regmap_config hmc5843_i2c_regmap_config = {
-               .reg_bits = 8,
-               .val_bits = 8,
+ static const struct regmap_config hmc5843_i2c_regmap_config = {
+       .reg_bits = 8,
+       .val_bits = 8,
  
-               .rd_table = &hmc5843_readable_table,
-               .wr_table = &hmc5843_writable_table,
-               .volatile_table = &hmc5843_volatile_table,
+       .rd_table = &hmc5843_readable_table,
+       .wr_table = &hmc5843_writable_table,
+       .volatile_table = &hmc5843_volatile_table,
  
-               .cache_type = REGCACHE_RBTREE,
+       .cache_type = REGCACHE_RBTREE,
  };
  
 -static int hmc5843_i2c_probe(struct i2c_client *client,
 -                       const struct i2c_device_id *id)
 +static int hmc5843_i2c_probe(struct i2c_client *cli,
 +                           const struct i2c_device_id *id)
  {
 -      return hmc5843_common_probe(&client->dev,
 -              devm_regmap_init_i2c(client, &hmc5843_i2c_regmap_config),
 -              id->driver_data);
 +      return hmc5843_common_probe(&cli->dev,
 +                      devm_regmap_init_i2c(cli, &hmc5843_i2c_regmap_config),
 +                      id->driver_data);
  }
  
  static int hmc5843_i2c_remove(struct i2c_client *client)
index 8dc5089772a39549e28e3df387c69b080646cb20,746b18894ebf6009cfe379cb3e7b69eaf26b57c9..6335b5815acda3dc7ce47be53a38587a085594ee
@@@ -216,9 -216,13 +216,13 @@@ error_ret
  
  static int ade7754_reset(struct device *dev)
  {
+       int ret;
        u8 val;
  
-       ade7754_spi_read_reg_8(dev, ADE7754_OPMODE, &val);
+       ret = ade7754_spi_read_reg_8(dev, ADE7754_OPMODE, &val);
+       if (ret < 0)
+               return ret;
        val |= 1 << 6; /* Software Chip Reset */
        return ade7754_spi_write_reg_8(dev, ADE7754_OPMODE, val);
  }
@@@ -362,9 -366,16 +366,16 @@@ error_ret
  /* Power down the device */
  static int ade7754_stop_device(struct device *dev)
  {
+       int ret;
        u8 val;
  
-       ade7754_spi_read_reg_8(dev, ADE7754_OPMODE, &val);
+       ret = ade7754_spi_read_reg_8(dev, ADE7754_OPMODE, &val);
+       if (ret < 0) {
+               dev_err(dev, "unable to power down the device, error: %d",
+                       ret);
+               return ret;
+       }
        val |= 7 << 3;  /* ADE7754 powered down */
        return ade7754_spi_write_reg_8(dev, ADE7754_OPMODE, val);
  }
@@@ -432,7 -443,7 +443,7 @@@ static ssize_t ade7754_write_frequency(
  
        mutex_lock(&indio_dev->mlock);
  
 -      t = (26000 / val);
 +      t = 26000 / val;
        if (t > 0)
                t--;
  
@@@ -540,7 -551,11 +551,7 @@@ static int ade7754_probe(struct spi_dev
        ret = ade7754_initial_setup(indio_dev);
        if (ret)
                return ret;
 -      ret = iio_device_register(indio_dev);
 -      if (ret)
 -              return ret;
 -
 -      return 0;
 +      return iio_device_register(indio_dev);
  }
  
  /* fixme, confirm ordering in this function */
index 7eef8b9573fc85faaae975457966857d76dfdafc,9afdb1e1a2222e89b89d54ee0ec2042e8cb65b47..dbceda1e67eaba530687b131bdfddb014d86181d
@@@ -215,15 -215,21 +215,19 @@@ error_ret
  
  static int ade7759_reset(struct device *dev)
  {
+       int ret;
        u16 val;
  
-       ade7759_spi_read_reg_16(dev,
+       ret = ade7759_spi_read_reg_16(dev,
                        ADE7759_MODE,
                        &val);
+       if (ret < 0)
+               return ret;
        val |= 1 << 6; /* Software Chip Reset */
 -      ret = ade7759_spi_write_reg_16(dev,
 +      return ade7759_spi_write_reg_16(dev,
                        ADE7759_MODE,
                        val);
 -
 -      return ret;
  }
  
  static IIO_DEV_ATTR_AENERGY(ade7759_read_40bit, ADE7759_AENERGY);
@@@ -298,11 -304,18 +302,18 @@@ error_ret
  /* Power down the device */
  static int ade7759_stop_device(struct device *dev)
  {
+       int ret;
        u16 val;
  
-       ade7759_spi_read_reg_16(dev,
+       ret = ade7759_spi_read_reg_16(dev,
                        ADE7759_MODE,
                        &val);
+       if (ret < 0) {
+               dev_err(dev, "unable to power down the device, error: %d\n",
+                       ret);
+               return ret;
+       }
        val |= 1 << 4;  /* AD converters can be turned off */
  
        return ade7759_spi_write_reg_16(dev, ADE7759_MODE, val);
@@@ -371,7 -384,7 +382,7 @@@ static ssize_t ade7759_write_frequency(
  
        mutex_lock(&indio_dev->mlock);
  
 -      t = (27900 / val);
 +      t = 27900 / val;
        if (t > 0)
                t--;
  
@@@ -462,7 -475,11 +473,7 @@@ static int ade7759_probe(struct spi_dev
        if (ret)
                return ret;
  
 -      ret = iio_device_register(indio_dev);
 -      if (ret)
 -              return ret;
 -
 -      return 0;
 +      return iio_device_register(indio_dev);
  }
  
  /* fixme, confirm ordering in this function */
index 5b1daeacac7a22ef0576f861acf94a591734d5ef,a8ecf87ef4a961f1c938dffc0839b25e5b5ed92b..7bc3e4a73834d5e305b47d93f83e8d2e96e95f4f
@@@ -151,7 -151,7 +151,7 @@@ int ad2s1210_update_frequency_control_w
  
        fcw = (unsigned char)(st->fexcit * (1 << 15) / st->fclkin);
        if (fcw < AD2S1210_MIN_FCW || fcw > AD2S1210_MAX_FCW) {
 -              pr_err("ad2s1210: FCW out of range\n");
 +              dev_err(&st->sdev->dev, "ad2s1210: FCW out of range\n");
                return -ERANGE;
        }
  
@@@ -198,7 -198,7 +198,7 @@@ static ssize_t ad2s1210_show_fclkin(str
  {
        struct ad2s1210_state *st = iio_priv(dev_to_iio_dev(dev));
  
-       return sprintf(buf, "%d\n", st->fclkin);
+       return sprintf(buf, "%u\n", st->fclkin);
  }
  
  static ssize_t ad2s1210_store_fclkin(struct device *dev,
        if (ret)
                return ret;
        if (fclkin < AD2S1210_MIN_CLKIN || fclkin > AD2S1210_MAX_CLKIN) {
 -              pr_err("ad2s1210: fclkin out of range\n");
 +              dev_err(dev, "ad2s1210: fclkin out of range\n");
                return -EINVAL;
        }
  
@@@ -237,7 -237,7 +237,7 @@@ static ssize_t ad2s1210_show_fexcit(str
  {
        struct ad2s1210_state *st = iio_priv(dev_to_iio_dev(dev));
  
-       return sprintf(buf, "%d\n", st->fexcit);
+       return sprintf(buf, "%u\n", st->fexcit);
  }
  
  static ssize_t ad2s1210_store_fexcit(struct device *dev,
        if (ret < 0)
                return ret;
        if (fexcit < AD2S1210_MIN_EXCIT || fexcit > AD2S1210_MAX_EXCIT) {
 -              pr_err("ad2s1210: excitation frequency out of range\n");
 +              dev_err(dev,
 +                      "ad2s1210: excitation frequency out of range\n");
                return -EINVAL;
        }
        mutex_lock(&st->lock);
@@@ -308,8 -307,7 +308,8 @@@ static ssize_t ad2s1210_store_control(s
                goto error_ret;
        if (ret & AD2S1210_MSB_IS_HIGH) {
                ret = -EIO;
 -              pr_err("ad2s1210: write control register fail\n");
 +              dev_err(dev,
 +                      "ad2s1210: write control register fail\n");
                goto error_ret;
        }
        st->resolution
        if (st->pdata->gpioin) {
                data = ad2s1210_read_resolution_pin(st);
                if (data != st->resolution)
 -                      pr_warn("ad2s1210: resolution settings not match\n");
 +                      dev_warn(dev, "ad2s1210: resolution settings not match\n");
        } else
                ad2s1210_set_resolution_pin(st);
  
@@@ -348,7 -346,7 +348,7 @@@ static ssize_t ad2s1210_store_resolutio
  
        ret = kstrtou8(buf, 10, &udata);
        if (ret || udata < 10 || udata > 16) {
 -              pr_err("ad2s1210: resolution out of range\n");
 +              dev_err(dev, "ad2s1210: resolution out of range\n");
                return -EINVAL;
        }
        mutex_lock(&st->lock);
        data = ret;
        if (data & AD2S1210_MSB_IS_HIGH) {
                ret = -EIO;
 -              pr_err("ad2s1210: setting resolution fail\n");
 +              dev_err(dev, "ad2s1210: setting resolution fail\n");
                goto error_ret;
        }
        st->resolution
        if (st->pdata->gpioin) {
                data = ad2s1210_read_resolution_pin(st);
                if (data != st->resolution)
 -                      pr_warn("ad2s1210: resolution settings not match\n");
 +                      dev_warn(dev, "ad2s1210: resolution settings not match\n");
        } else
                ad2s1210_set_resolution_pin(st);
        ret = len;
index 68ceb97c458c90b96bf484df23a89a485d2b9ff3,5bfc5bdc3c5d5d2ef8f3cdb174ff03d4bec7351b..38df23435ebbd399489326e649f828c8654878c0
@@@ -6,6 -6,7 +6,7 @@@ header-y += caif
  header-y += dvb/
  header-y += hdlc/
  header-y += hsi/
+ header-y += iio/
  header-y += isdn/
  header-y += mmc/
  header-y += nfsd/
@@@ -35,7 -36,6 +36,7 @@@ header-y += adfs_fs.
  header-y += affs_hardblocks.h
  header-y += agpgart.h
  header-y += aio_abi.h
 +header-y += am437x-vpfe.h
  header-y += apm_bios.h
  header-y += arcfb.h
  header-y += atalk.h
@@@ -284,7 -284,6 +285,7 @@@ header-y += net.
  header-y += netlink_diag.h
  header-y += netlink.h
  header-y += netrom.h
 +header-y += net_namespace.h
  header-y += net_tstamp.h
  header-y += nfc.h
  header-y += nfs2.h
@@@ -370,6 -369,7 +371,6 @@@ header-y += snmp.
  header-y += sock_diag.h
  header-y += socket.h
  header-y += sockios.h
 -header-y += som.h
  header-y += sonet.h
  header-y += sonypi.h
  header-y += soundcard.h
index 59b250545d4c849dc1b112e0730446e98c5b4ccb,8f8f058eb8074864e79e5327100241322df7f4e5..f805493be3ebb1097965241baa7be50f045ae67d
@@@ -18,9 -18,8 +18,8 @@@
   *
   */
  
- #define _GNU_SOURCE
  #include <unistd.h>
+ #include <stdlib.h>
  #include <dirent.h>
  #include <fcntl.h>
  #include <stdio.h>
@@@ -72,7 -71,7 +71,7 @@@ void print2byte(int input, struct iio_c
         * Shift before conversion to avoid sign extension
         * of left aligned data
         */
 -      input = input >> info->shift;
 +      input >>= info->shift;
        if (info->is_signed) {
                int16_t val = input;
  
diff --combined tools/iio/iio_utils.c
index bd6982c12d0def7c1fb0185aebb51228da0ec877,aea9282101871e9d53b52c02340e842fde9292bc..2680a2e0f11380d1257e65bcd96117667daf7478
@@@ -6,22 -6,15 +6,17 @@@
   * under the terms of the GNU General Public License version 2 as published by
   * the Free Software Foundation.
   */
 +#ifndef _IIO_UTILS_H
 +#define _IIO_UTILS_H
  
  #include <string.h>
  #include <stdlib.h>
- #include <ctype.h>
  #include <stdio.h>
  #include <stdint.h>
  #include <dirent.h>
  #include <errno.h>
- /* Made up value to limit allocation sizes */
- #define IIO_MAX_NAME_LENGTH 30
- #define FORMAT_SCAN_ELEMENTS_DIR "%s/scan_elements"
- #define FORMAT_TYPE_FILE "%s_type"
+ #include <ctype.h>
+ #include "iio_utils.h"
  
  const char *iio_dir = "/sys/bus/iio/devices/";
  
@@@ -30,7 -23,7 +25,7 @@@
   * @full_name: the full channel name
   * @generic_name: the output generic channel name
   **/
- inline int iioutils_break_up_name(const char *full_name,
+ int iioutils_break_up_name(const char *full_name,
                                  char **generic_name)
  {
        char *current;
        return 0;
  }
  
- /**
-  * struct iio_channel_info - information about a given channel
-  * @name: channel name
-  * @generic_name: general name for channel type
-  * @scale: scale factor to be applied for conversion to si units
-  * @offset: offset to be applied for conversion to si units
-  * @index: the channel index in the buffer output
-  * @bytes: number of bytes occupied in buffer output
-  * @mask: a bit mask for the raw output
-  * @is_signed: is the raw value stored signed
-  * @enabled: is this channel enabled
-  **/
- struct iio_channel_info {
-       char *name;
-       char *generic_name;
-       float scale;
-       float offset;
-       unsigned index;
-       unsigned bytes;
-       unsigned bits_used;
-       unsigned shift;
-       uint64_t mask;
-       unsigned be;
-       unsigned is_signed;
-       unsigned location;
- };
  /**
   * iioutils_get_type() - find and process _type attribute data
   * @is_signed: output whether channel is signed
@@@ -93,7 -59,7 +61,7 @@@
   * @name: the channel name
   * @generic_name: the channel type name
   **/
- inline int iioutils_get_type(unsigned *is_signed,
+ int iioutils_get_type(unsigned *is_signed,
                             unsigned *bytes,
                             unsigned *bits_used,
                             unsigned *shift,
@@@ -197,7 -163,7 +165,7 @@@ error_ret
        return ret;
  }
  
- inline int iioutils_get_param_float(float *output,
+ int iioutils_get_param_float(float *output,
                                    const char *param_name,
                                    const char *device_dir,
                                    const char *name,
@@@ -261,7 -227,7 +229,7 @@@ error_ret
   *
   **/
  
inline void bsort_channel_array_by_index(struct iio_channel_info **ci_array,
+ void bsort_channel_array_by_index(struct iio_channel_info **ci_array,
                                         int cnt)
  {
  
   * @device_dir: the IIO device directory in sysfs
   * @
   **/
- inline int build_channel_array(const char *device_dir,
+ int build_channel_array(const char *device_dir,
                              struct iio_channel_info **ci_array,
                              int *counter)
  {
@@@ -445,7 -411,7 +413,7 @@@ error_ret
   *
   * Typical types this is used for are device and trigger.
   **/
- inline int find_type_by_name(const char *name, const char *type)
+ int find_type_by_name(const char *name, const char *type)
  {
        const struct dirent *ent;
        int number, numstrlen;
        return -ENODEV;
  }
  
- inline int _write_sysfs_int(char *filename, char *basedir, int val, int verify)
+ int _write_sysfs_int(char *filename, char *basedir, int val, int verify)
  {
        int ret = 0;
        FILE *sysfsfp;
@@@ -683,5 -649,3 +651,5 @@@ error_free
        free(temp);
        return ret;
  }
 +
 +#endif /* _IIO_UTILS_H */