]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge remote-tracking branch 'char-misc/char-misc-next'
authorStephen Rothwell <sfr@canb.auug.org.au>
Thu, 9 Apr 2015 07:10:26 +0000 (17:10 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 9 Apr 2015 07:10:26 +0000 (17:10 +1000)
16 files changed:
1  2 
Documentation/driver-model/devres.txt
MAINTAINERS
arch/arm/Kconfig.debug
arch/arm/boot/dts/omap3-beagle-xm.dts
arch/arm/boot/dts/omap3-beagle.dts
arch/arm/boot/dts/omap3-n900.dts
drivers/char/hw_random/core.c
drivers/char/ipmi/ipmi_si_intf.c
drivers/extcon/extcon-arizona.c
drivers/hwtracing/coresight/of_coresight.c
drivers/misc/mei/amthif.c
drivers/misc/mei/main.c
drivers/misc/mei/pci-me.c
include/linux/mfd/arizona/core.h
kernel/time/clockevents.c
sound/soc/codecs/arizona.c

index e1e2bbd7a40404344adb1c46697cfb47dd47f9ee,7fe7fd263aba138ca2e8fcc49484f76bc5142051..831a5363f6be37756b0016c1c30fc0f46055aff8
@@@ -276,6 -276,7 +276,7 @@@ IOMA
    devm_ioport_unmap()
    devm_ioremap()
    devm_ioremap_nocache()
+   devm_ioremap_wc()
    devm_ioremap_resource() : checks resource, requests memory region, ioremaps
    devm_iounmap()
    pcim_iomap()
@@@ -289,10 -290,6 +290,10 @@@ IR
    devm_request_irq()
    devm_request_threaded_irq()
  
 +LED
 +  devm_led_classdev_register()
 +  devm_led_classdev_unregister()
 +
  MDIO
    devm_mdiobus_alloc()
    devm_mdiobus_alloc_size()
diff --combined MAINTAINERS
index f1c07b28d93547a0934500c1aae41fcb03d65726,e9e12d75546a3f0b9be0f950738e3fea6fe02e10..596a358369378ce6e7ed1b61c918a532ad13adcf
@@@ -637,7 -637,8 +637,7 @@@ F:      drivers/gpu/drm/radeon/radeon_k
  F:      include/uapi/linux/kfd_ioctl.h
  
  AMD MICROCODE UPDATE SUPPORT
 -M:    Andreas Herrmann <herrmann.der.user@googlemail.com>
 -L:    amd64-microcode@amd64.org
 +M:    Borislav Petkov <bp@alien8.de>
  S:    Maintained
  F:    arch/x86/kernel/cpu/microcode/amd*
  
@@@ -724,7 -725,7 +724,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
@@@ -880,11 -881,6 +880,11 @@@ S:       Maintaine
  F:    drivers/media/rc/meson-ir.c
  N:    meson[x68]
  
 +ARM/Annapurna Labs ALPINE ARCHITECTURE
 +M:    Tsahee Zidenberg <tsahee@annapurnalabs.com>
 +S:    Maintained
 +F:    arch/arm/mach-alpine/
 +
  ARM/ATMEL AT91RM9200 AND AT91SAM ARM ARCHITECTURES
  M:    Andrew Victor <linux@maxim.org.za>
  M:    Nicolas Ferre <nicolas.ferre@atmel.com>
@@@ -957,7 -953,7 +957,7 @@@ ARM/CORESIGHT FRAMEWORK AND DRIVER
  M:    Mathieu Poirier <mathieu.poirier@linaro.org>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  S:    Maintained
- F:    drivers/coresight/*
+ F:    drivers/hwtracing/coresight/*
  F:    Documentation/trace/coresight.txt
  F:    Documentation/devicetree/bindings/arm/coresight.txt
  F:    Documentation/ABI/testing/sysfs-bus-coresight-devices-*
@@@ -1190,7 -1186,7 +1190,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
 +F:    drivers/rtc/rtc-armada38x.c
  
  ARM/Marvell Berlin SoC support
  M:    Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
@@@ -1259,6 -1255,22 +1259,6 @@@ L:     openmoko-kernel@lists.openmoko.org (
  W:    http://wiki.openmoko.org/wiki/Neo_FreeRunner
  S:    Supported
  
 -ARM/QUALCOMM MSM MACHINE SUPPORT
 -M:    David Brown <davidb@codeaurora.org>
 -M:    Daniel Walker <dwalker@fifo99.com>
 -M:    Bryan Huntsman <bryanh@codeaurora.org>
 -L:    linux-arm-msm@vger.kernel.org
 -F:    arch/arm/mach-msm/
 -F:    drivers/video/fbdev/msm/
 -F:    drivers/mmc/host/msm_sdcc.c
 -F:    drivers/mmc/host/msm_sdcc.h
 -F:    drivers/tty/serial/msm_serial.h
 -F:    drivers/tty/serial/msm_serial.c
 -F:    drivers/*/pm8???-*
 -F:    drivers/mfd/ssbi.c
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/davidb/linux-msm.git
 -S:    Maintained
 -
  ARM/TOSA MACHINE SUPPORT
  M:    Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
  M:    Dirk Opfer <dirk@opfer-online.de>
@@@ -1316,11 -1328,6 +1316,11 @@@ L:    linux-soc@vger.kernel.or
  S:    Maintained
  F:    arch/arm/mach-qcom/
  F:    drivers/soc/qcom/
 +F:    drivers/firmware/qcom_scm.c
 +F:    drivers/tty/serial/msm_serial.h
 +F:    drivers/tty/serial/msm_serial.c
 +F:    drivers/*/pm8???-*
 +F:    drivers/mfd/ssbi.c
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/galak/linux-qcom.git
  
  ARM/RADISYS ENP2611 MACHINE SUPPORT
@@@ -1355,7 -1362,6 +1355,7 @@@ F:      drivers/i2c/busses/i2c-rk3x.
  F:    drivers/*/*rockchip*
  F:    drivers/*/*/*rockchip*
  F:    sound/soc/rockchip/
 +N:    rockchip
  
  ARM/SAMSUNG EXYNOS ARM ARCHITECTURES
  M:    Kukjin Kim <kgene@kernel.org>
@@@ -1419,9 -1425,11 +1419,9 @@@ F:     arch/arm/boot/dts/emev2
  F:    arch/arm/boot/dts/r7s*
  F:    arch/arm/boot/dts/r8a*
  F:    arch/arm/boot/dts/sh*
 -F:    arch/arm/configs/ape6evm_defconfig
  F:    arch/arm/configs/armadillo800eva_defconfig
  F:    arch/arm/configs/bockw_defconfig
  F:    arch/arm/configs/kzm9g_defconfig
 -F:    arch/arm/configs/mackerel_defconfig
  F:    arch/arm/configs/marzen_defconfig
  F:    arch/arm/configs/shmobile_defconfig
  F:    arch/arm/include/debug/renesas-scif.S
@@@ -1667,8 -1675,8 +1667,8 @@@ F:      drivers/misc/eeprom/at24.
  F:    include/linux/platform_data/at24.h
  
  ATA OVER ETHERNET (AOE) DRIVER
 -M:    "Ed L. Cashin" <ecashin@coraid.com>
 -W:    http://support.coraid.com/support/linux
 +M:    "Ed L. Cashin" <ed.cashin@acm.org>
 +W:    http://www.openaoe.org/
  S:    Supported
  F:    Documentation/aoe/
  F:    drivers/block/aoe/
@@@ -1754,7 -1762,7 +1754,7 @@@ S:      Supporte
  F:    drivers/tty/serial/atmel_serial.c
  
  ATMEL Audio ALSA driver
 -M:    Bo Shen <voice.shen@atmel.com>
 +M:    Nicolas Ferre <nicolas.ferre@atmel.com>
  L:    alsa-devel@alsa-project.org (moderated for non-subscribers)
  S:    Supported
  F:    sound/soc/atmel
@@@ -1811,7 -1819,7 +1811,7 @@@ S:      Supporte
  F:    drivers/spi/spi-atmel.*
  
  ATMEL SSC DRIVER
- M:    Bo Shen <voice.shen@atmel.com>
+ M:    Nicolas Ferre <nicolas.ferre@atmel.com>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  S:    Supported
  F:    drivers/misc/atmel-ssc.c
@@@ -2510,18 -2518,11 +2510,18 @@@ F:   Documentation/zh_CN
  
  CHIPIDEA USB HIGH SPEED DUAL ROLE CONTROLLER
  M:    Peter Chen <Peter.Chen@freescale.com>
 -T:    git git://github.com/hzpeterchen/linux-usb.git
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb.git
  L:    linux-usb@vger.kernel.org
  S:    Maintained
  F:    drivers/usb/chipidea/
  
 +CHIPONE ICN8318 I2C TOUCHSCREEN DRIVER
 +M:    Hans de Goede <hdegoede@redhat.com>
 +L:    linux-input@vger.kernel.org
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/input/touchscreen/chipone_icn8318.txt
 +F:    drivers/input/touchscreen/chipone_icn8318.c
 +
  CHROME HARDWARE PLATFORM SUPPORT
  M:    Olof Johansson <olof@lixom.net>
  S:    Maintained
@@@ -2815,7 -2816,6 +2815,7 @@@ L:      linux-crypto@vger.kernel.or
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6.git
  S:    Maintained
  F:    Documentation/crypto/
 +F:    Documentation/DocBook/crypto-API.tmpl
  F:    arch/*/crypto/
  F:    crypto/
  F:    drivers/crypto/
@@@ -3137,15 -3137,12 +3137,15 @@@ S:   Supporte
  F:    Documentation/hwmon/da90??
  F:    drivers/gpio/gpio-da90??.c
  F:    drivers/hwmon/da90??-hwmon.c
 +F:    drivers/iio/adc/da91??-*.c
  F:    drivers/input/misc/da90??_onkey.c
  F:    drivers/input/touchscreen/da9052_tsi.c
  F:    drivers/leds/leds-da90??.c
  F:    drivers/mfd/da903x.c
  F:    drivers/mfd/da90??-*.c
 +F:    drivers/mfd/da91??-*.c
  F:    drivers/power/da9052-battery.c
 +F:    drivers/power/da91??-*.c
  F:    drivers/regulator/da903x.c
  F:    drivers/regulator/da9???-regulator.[ch]
  F:    drivers/rtc/rtc-da90??.c
@@@ -3155,7 -3152,6 +3155,7 @@@ F:      include/linux/mfd/da903x.
  F:    include/linux/mfd/da9052/
  F:    include/linux/mfd/da9055/
  F:    include/linux/mfd/da9063/
 +F:    include/linux/mfd/da9150/
  F:    include/sound/da[79]*.h
  F:    sound/soc/codecs/da[79]*.[ch]
  
@@@ -3256,13 -3252,6 +3256,13 @@@ S:    Maintaine
  F:    Documentation/hwmon/dme1737
  F:    drivers/hwmon/dme1737.c
  
 +DMI/SMBIOS SUPPORT
 +M:    Jean Delvare <jdelvare@suse.de>
 +S:    Maintained
 +F:    drivers/firmware/dmi-id.c
 +F:    drivers/firmware/dmi_scan.c
 +F:    include/linux/dmi.h
 +
  DOCKING STATION DRIVER
  M:    Shaohua Li <shaohua.li@intel.com>
  L:    linux-acpi@vger.kernel.org
@@@ -3276,9 -3265,7 +3276,9 @@@ S:      Maintaine
  F:    Documentation/
  X:    Documentation/ABI/
  X:    Documentation/devicetree/
 -X:    Documentation/[a-z][a-z]_[A-Z][A-Z]/
 +X:    Documentation/acpi
 +X:    Documentation/power
 +X:    Documentation/spi
  T:    git git://git.lwn.net/linux-2.6.git docs-next
  
  DOUBLETALK DRIVER
@@@ -3402,6 -3389,7 +3402,6 @@@ T:      git git://people.freedesktop.org/~ai
  S:    Supported
  F:    drivers/gpu/drm/rcar-du/
  F:    drivers/gpu/drm/shmobile/
 -F:    include/linux/platform_data/rcar-du.h
  F:    include/linux/platform_data/shmob_drm.h
  
  DSBR100 USB FM RADIO DRIVER
@@@ -4168,12 -4156,6 +4168,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
@@@ -4323,15 -4305,6 +4323,15 @@@ S:    Supporte
  F:    drivers/phy/
  F:    include/linux/phy/
  
 +GENERIC PM DOMAINS
 +M:    "Rafael J. Wysocki" <rjw@rjwysocki.net>
 +M:    Kevin Hilman <khilman@kernel.org>
 +M:    Ulf Hansson <ulf.hansson@linaro.org>
 +L:    linux-pm@vger.kernel.org
 +S:    Supported
 +F:    drivers/base/power/domain*.c
 +F:    include/linux/pm_domain.h
 +
  GENERIC UIO DRIVER FOR PCI DEVICES
  M:    "Michael S. Tsirkin" <mst@redhat.com>
  L:    kvm@vger.kernel.org
@@@ -4345,10 -4318,10 +4345,10 @@@ F:   scripts/get_maintainer.p
  
  GFS2 FILE SYSTEM
  M:    Steven Whitehouse <swhiteho@redhat.com>
 +M:    Bob Peterson <rpeterso@redhat.com>
  L:    cluster-devel@redhat.com
  W:    http://sources.redhat.com/cluster/
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-3.0-fixes.git
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-3.0-nmw.git
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2.git
  S:    Supported
  F:    Documentation/filesystems/gfs2*.txt
  F:    fs/gfs2/
@@@ -4968,7 -4941,6 +4968,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>
@@@ -5001,11 -4973,6 +5001,11 @@@ W:    http://industrypack.sourceforge.ne
  S:    Maintained
  F:    drivers/ipack/
  
 +INGENIC JZ4780 DMA Driver
 +M:    Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
 +S:    Maintained
 +F:    drivers/dma/dma-jz4780.c
 +
  INTEGRITY MEASUREMENT ARCHITECTURE (IMA)
  M:    Mimi Zohar <zohar@linux.vnet.ibm.com>
  M:    Dmitry Kasatkin <dmitry.kasatkin@gmail.com>
@@@ -5120,7 -5087,7 +5120,7 @@@ S:      Supporte
  F:    drivers/platform/x86/intel_menlow.c
  
  INTEL IA32 MICROCODE UPDATE SUPPORT
 -M:    Tigran Aivazian <tigran@aivazian.fsnet.co.uk>
 +M:    Borislav Petkov <bp@alien8.de>
  S:    Maintained
  F:    arch/x86/kernel/cpu/microcode/core*
  F:    arch/x86/kernel/cpu/microcode/intel*
@@@ -5161,21 -5128,22 +5161,21 @@@ M:   Deepak Saxena <dsaxena@plexity.net
  S:    Maintained
  F:    drivers/char/hw_random/ixp4xx-rng.c
  
 -INTEL ETHERNET DRIVERS (e100/e1000/e1000e/fm10k/igb/igbvf/ixgb/ixgbe/ixgbevf/i40e/i40evf)
 +INTEL ETHERNET DRIVERS
  M:    Jeff Kirsher <jeffrey.t.kirsher@intel.com>
 -M:    Jesse Brandeburg <jesse.brandeburg@intel.com>
 -M:    Bruce Allan <bruce.w.allan@intel.com>
 -M:    Carolyn Wyborny <carolyn.wyborny@intel.com>
 -M:    Don Skidmore <donald.c.skidmore@intel.com>
 -M:    Greg Rose <gregory.v.rose@intel.com>
 -M:    Matthew Vick <matthew.vick@intel.com>
 -M:    John Ronciak <john.ronciak@intel.com>
 -M:    Mitch Williams <mitch.a.williams@intel.com>
 -M:    Linux NICS <linux.nics@intel.com>
 -L:    e1000-devel@lists.sourceforge.net
 +R:    Jesse Brandeburg <jesse.brandeburg@intel.com>
 +R:    Shannon Nelson <shannon.nelson@intel.com>
 +R:    Carolyn Wyborny <carolyn.wyborny@intel.com>
 +R:    Don Skidmore <donald.c.skidmore@intel.com>
 +R:    Matthew Vick <matthew.vick@intel.com>
 +R:    John Ronciak <john.ronciak@intel.com>
 +R:    Mitch Williams <mitch.a.williams@intel.com>
 +L:    intel-wired-lan@lists.osuosl.org
  W:    http://www.intel.com/support/feedback.htm
  W:    http://e1000.sourceforge.net/
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net.git
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next.git
 +Q:    http://patchwork.ozlabs.org/project/intel-wired-lan/list/
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-queue.git
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git
  S:    Supported
  F:    Documentation/networking/e100.txt
  F:    Documentation/networking/e1000.txt
@@@ -5297,13 -5265,6 +5297,13 @@@ F:    drivers/char/ipmi
  F:    include/linux/ipmi*
  F:    include/uapi/linux/ipmi*
  
 +QCOM AUDIO (ASoC) DRIVERS
 +M:    Patrick Lai <plai@codeaurora.org>
 +M:    Banajit Goswami <bgoswami@codeaurora.org>
 +L:    alsa-devel@alsa-project.org (moderated for non-subscribers)
 +S:    Supported
 +F:    sound/soc/qcom/
 +
  IPS SCSI RAID DRIVER
  M:    Adaptec OEM Raid Solutions <aacraid@adaptec.com>
  L:    linux-scsi@vger.kernel.org
@@@ -5624,8 -5585,6 +5624,8 @@@ S:      Supporte
  F:    Documentation/*/kvm*.txt
  F:    Documentation/virtual/kvm/
  F:    arch/*/kvm/
 +F:    arch/x86/kernel/kvm.c
 +F:    arch/x86/kernel/kvmclock.c
  F:    arch/*/include/asm/kvm*
  F:    include/linux/kvm*
  F:    include/uapi/linux/kvm*
@@@ -6357,7 -6316,6 +6357,7 @@@ F:      drivers/scsi/megaraid
  
  MELLANOX ETHERNET DRIVER (mlx4_en)
  M:    Amir Vadai <amirv@mellanox.com>
 +M:    Ido Shamay <idos@mellanox.com>
  L:    netdev@vger.kernel.org
  S:    Supported
  W:    http://www.mellanox.com
@@@ -6600,8 -6558,10 +6600,8 @@@ F:     drivers/mfd
  F:    include/linux/mfd/
  
  MULTIMEDIA CARD (MMC), SECURE DIGITAL (SD) AND SDIO SUBSYSTEM
 -M:    Chris Ball <chris@printf.net>
  M:    Ulf Hansson <ulf.hansson@linaro.org>
  L:    linux-mmc@vger.kernel.org
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc.git
  T:    git git://git.linaro.org/people/ulf.hansson/mmc.git
  S:    Maintained
  F:    drivers/mmc/
@@@ -6998,8 -6958,6 +6998,8 @@@ Q:      http://patchwork.kernel.org/project/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap.git
  S:    Maintained
  F:    arch/arm/*omap*/
 +F:    arch/arm/configs/omap1_defconfig
 +F:    arch/arm/configs/omap2plus_defconfig
  F:    drivers/i2c/busses/i2c-omap.c
  F:    drivers/irqchip/irq-omap-intc.c
  F:    drivers/mfd/*omap*.c
@@@ -7130,7 -7088,6 +7130,7 @@@ OMAP IMAGING SUBSYSTEM (OMAP3 ISP and O
  M:    Laurent Pinchart <laurent.pinchart@ideasonboard.com>
  L:    linux-media@vger.kernel.org
  S:    Maintained
 +F:    Documentation/devicetree/bindings/media/ti,omap3isp.txt
  F:    drivers/media/platform/omap3isp/
  F:    drivers/staging/media/omap4iss/
  
@@@ -7230,15 -7187,6 +7230,15 @@@ F:    Documentation/devicetree
  F:    arch/*/boot/dts/
  F:    include/dt-bindings/
  
 +OPEN FIRMWARE AND DEVICE TREE OVERLAYS
 +M:    Pantelis Antoniou <pantelis.antoniou@konsulko.com>
 +L:    devicetree@vger.kernel.org
 +S:    Maintained
 +F:    Documentation/devicetree/dynamic-resolution-notes.txt
 +F:    Documentation/devicetree/overlay-notes.txt
 +F:    drivers/of/overlay.c
 +F:    drivers/of/resolver.c
 +
  OPENRISC ARCHITECTURE
  M:    Jonas Bonn <jonas@southpole.se>
  W:    http://openrisc.net
@@@ -8110,17 -8058,11 +8110,17 @@@ S:   Maintaine
  F:    drivers/net/wireless/rt2x00/
  
  RAMDISK RAM BLOCK DEVICE DRIVER
 -M:    Nick Piggin <npiggin@kernel.dk>
 +M:    Jens Axboe <axboe@kernel.dk>
  S:    Maintained
  F:    Documentation/blockdev/ramdisk.txt
  F:    drivers/block/brd.c
  
 +PERSISTENT MEMORY DRIVER
 +M:    Ross Zwisler <ross.zwisler@linux.intel.com>
 +L:    linux-nvdimm@lists.01.org
 +S:    Supported
 +F:    drivers/block/pmem.c
 +
  RANDOM NUMBER DRIVER
  M:    "Theodore Ts'o" <tytso@mit.edu>
  S:    Maintained
@@@ -8403,6 -8345,7 +8403,6 @@@ F:      block/partitions/ibm.
  
  S390 NETWORK DRIVERS
  M:    Ursula Braun <ursula.braun@de.ibm.com>
 -M:    Frank Blaschka <blaschka@linux.vnet.ibm.com>
  M:    linux390@de.ibm.com
  L:    linux-s390@vger.kernel.org
  W:    http://www.ibm.com/developerworks/linux/linux390/
@@@ -8718,8 -8661,10 +8718,8 @@@ S:     Maintaine
  F:    drivers/mmc/host/sdricoh_cs.c
  
  SECURE DIGITAL HOST CONTROLLER INTERFACE (SDHCI) DRIVER
 -M:    Chris Ball <chris@printf.net>
  L:    linux-mmc@vger.kernel.org
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc.git
 -S:    Maintained
 +S:    Orphan
  F:    drivers/mmc/host/sdhci.*
  F:    drivers/mmc/host/sdhci-pltfm.[ch]
  
@@@ -8735,12 -8680,18 +8735,12 @@@ F:   include/linux/seccomp.
  K:    \bsecure_computing
  K:    \bTIF_SECCOMP\b
  
 -SECURE DIGITAL HOST CONTROLLER INTERFACE, OPEN FIRMWARE BINDINGS (SDHCI-OF)
 -M:    Anton Vorontsov <anton@enomsg.org>
 -L:    linuxppc-dev@lists.ozlabs.org
 -L:    linux-mmc@vger.kernel.org
 -S:    Maintained
 -F:    drivers/mmc/host/sdhci-pltfm.[ch]
 -
  SECURE DIGITAL HOST CONTROLLER INTERFACE (SDHCI) SAMSUNG DRIVER
  M:    Ben Dooks <ben-linux@fluff.org>
 +M:    Jaehoon Chung <jh80.chung@samsung.com>
  L:    linux-mmc@vger.kernel.org
  S:    Maintained
 -F:    drivers/mmc/host/sdhci-s3c.c
 +F:    drivers/mmc/host/sdhci-s3c*
  
  SECURE DIGITAL HOST CONTROLLER INTERFACE (SDHCI) ST SPEAR DRIVER
  M:    Viresh Kumar <viresh.linux@gmail.com>
@@@ -9407,14 -9358,6 +9407,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>
@@@ -9877,7 -9820,7 +9877,7 @@@ F:      include/linux/wl12xx.
  
  TIPC NETWORK LAYER
  M:    Jon Maloy <jon.maloy@ericsson.com>
 -M:    Allan Stephens <allan.stephens@windriver.com>
 +M:    Ying Xue <ying.xue@windriver.com>
  L:    netdev@vger.kernel.org (core kernel code)
  L:    tipc-discussion@lists.sourceforge.net (user apps, general discussion)
  W:    http://tipc.sourceforge.net/
@@@ -9926,23 -9869,10 +9926,23 @@@ S:   Maintaine
  F:    drivers/platform/x86/topstar-laptop.c
  
  TOSHIBA ACPI EXTRAS DRIVER
 +M:    Azael Avalos <coproscefalo@gmail.com>
  L:    platform-driver-x86@vger.kernel.org
 -S:    Orphan
 +S:    Maintained
  F:    drivers/platform/x86/toshiba_acpi.c
  
 +TOSHIBA BLUETOOTH DRIVER
 +M:    Azael Avalos <coproscefalo@gmail.com>
 +L:    platform-driver-x86@vger.kernel.org
 +S:    Maintained
 +F:    drivers/platform/x86/toshiba_bluetooth.c
 +
 +TOSHIBA HDD ACTIVE PROTECTION SENSOR DRIVER
 +M:    Azael Avalos <coproscefalo@gmail.com>
 +L:    platform-driver-x86@vger.kernel.org
 +S:    Maintained
 +F:    drivers/platform/x86/toshiba_haps.c
 +
  TOSHIBA SMM DRIVER
  M:    Jonathan Buzzard <jonathan@buzzard.org.uk>
  L:    tlinux-users@tce.toshiba-dme.co.jp
@@@ -9994,7 -9924,6 +9994,7 @@@ F:      drivers/media/pci/tw68
  TPM DEVICE DRIVER
  M:    Peter Huewe <peterhuewe@gmx.de>
  M:    Marcel Selhorst <tpmdd@selhorst.net>
 +R:    Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
  W:    http://tpmdd.sourceforge.net
  L:    tpmdd-devel@lists.sourceforge.net (moderated for non-subscribers)
  Q:    git git://github.com/PeterHuewe/linux-tpmdd.git
@@@ -10200,12 -10129,6 +10200,12 @@@ S: Maintaine
  F:    drivers/net/usb/cdc_*.c
  F:    include/uapi/linux/usb/cdc.h
  
 +USB CHAOSKEY DRIVER
 +M:    Keith Packard <keithp@keithp.com>
 +L:    linux-usb@vger.kernel.org
 +S:    Maintained
 +F:    drivers/usb/misc/chaoskey.c
 +
  USB CYPRESS C67X00 DRIVER
  M:    Peter Korsgaard <jacmet@sunsite.dk>
  L:    linux-usb@vger.kernel.org
@@@ -10286,7 -10209,7 +10286,7 @@@ 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
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb.git
  L:    linux-usb@vger.kernel.org
  S:    Maintained
  F:    drivers/usb/common/usb-otg-fsm.c
diff --combined arch/arm/Kconfig.debug
index 1ced63c642d2361d9282c70eeabcc6a6f66fff02,8b0183a9a300a17b1e11157596b3195282146a0d..0c12ffb155a23c604c9bbb9b849a913d359e34ae
@@@ -93,14 -93,6 +93,14 @@@ choic
        prompt "Kernel low-level debugging port"
        depends on DEBUG_LL
  
 +      config DEBUG_ALPINE_UART0
 +              bool "Kernel low-level debugging messages via Alpine UART0"
 +              depends on ARCH_ALPINE
 +              select DEBUG_UART_8250
 +              help
 +                Say Y here if you want kernel low-level debugging support
 +                on Alpine based platforms.
 +
        config DEBUG_ASM9260_UART
                bool "Kernel low-level debugging via asm9260 UART"
                depends on MACH_ASM9260
                  Say Y here if you want kernel low-level debugging support
                  on MMP UART3.
  
 -      config DEBUG_MSM_UART
 -              bool "Kernel low-level debugging messages via MSM UART"
 -              depends on ARCH_MSM
 -              help
 -                Say Y here if you want the debug print routines to direct
 -                their output to the serial port on MSM devices.
 -
 -                ARCH                DEBUG_UART_PHYS   DEBUG_UART_VIRT   #
 -                MSM7X00A, QSD8X50   0xa9a00000        0xe1000000        UART1
 -                MSM7X00A, QSD8X50   0xa9b00000        0xe1000000        UART2
 -                MSM7X00A, QSD8X50   0xa9c00000        0xe1000000        UART3
 -
 -                MSM7X30             0xaca00000        0xe1000000        UART1
 -                MSM7X30             0xacb00000        0xe1000000        UART2
 -                MSM7X30             0xacc00000        0xe1000000        UART3
 -
 -                Please adjust DEBUG_UART_PHYS and DEBUG_UART_BASE configuration
 -                options based on your needs.
 -
        config DEBUG_QCOM_UARTDM
                bool "Kernel low-level debugging messages via QCOM UARTDM"
                depends on ARCH_QCOM
                  via SCIF2 on Renesas R-Car H1 (R8A7779).
  
        config DEBUG_RCAR_GEN2_SCIF0
 -              bool "Kernel low-level debugging messages via SCIF0 on R8A7790/R8A7791/R8A7793)"
 +              bool "Kernel low-level debugging messages via SCIF0 on R8A7790/R8A7791/R8A7793"
                depends on ARCH_R8A7790 || ARCH_R8A7791 || ARCH_R8A7793
                help
                  Say Y here if you want kernel low-level debugging support
                  via SCIF2 on Renesas R-Car E2 (R8A7794).
  
        config DEBUG_RMOBILE_SCIFA0
 -              bool "Kernel low-level debugging messages via SCIFA0 on R8A73A4/SH7372"
 -              depends on ARCH_R8A73A4 || ARCH_SH7372
 +              bool "Kernel low-level debugging messages via SCIFA0 on R8A73A4"
 +              depends on ARCH_R8A73A4
                help
                  Say Y here if you want kernel low-level debugging support
 -                via SCIFA0 on Renesas R-Mobile APE6 (R8A73A4) or SH-Mobile
 -                AP4 (SH7372).
 +                via SCIFA0 on Renesas R-Mobile APE6 (R8A73A4).
  
        config DEBUG_RMOBILE_SCIFA1
                bool "Kernel low-level debugging messages via SCIFA1 on R8A7740"
@@@ -1283,7 -1295,7 +1283,7 @@@ config DEBUG_LL_INCLUD
                                 DEBUG_IMX6SL_UART || \
                                 DEBUG_IMX6SX_UART
        default "debug/ks8695.S" if DEBUG_KS8695_UART
 -      default "debug/msm.S" if DEBUG_MSM_UART || DEBUG_QCOM_UARTDM
 +      default "debug/msm.S" if DEBUG_QCOM_UARTDM
        default "debug/netx.S" if DEBUG_NETX_UART
        default "debug/omap2plus.S" if DEBUG_OMAP2PLUS_UART
        default "debug/renesas-scif.S" if DEBUG_R7S72100_SCIF2
@@@ -1376,6 -1388,7 +1376,6 @@@ config DEBUG_UART_PHY
        default 0x80230000 if DEBUG_PICOXCELL_UART
        default 0x808c0000 if ARCH_EP93XX
        default 0x90020000 if DEBUG_NSPIRE_CLASSIC_UART || DEBUG_NSPIRE_CX_UART
 -      default 0xa9a00000 if DEBUG_MSM_UART
        default 0xb0060000 if DEBUG_SIRFPRIMA2_UART1
        default 0xb0090000 if DEBUG_VEXPRESS_UART0_CRX
        default 0xc0013000 if DEBUG_U300_UART
        default 0xf8b00000 if DEBUG_HIX5HD2_UART
        default 0xf991e000 if DEBUG_QCOM_UARTDM
        default 0xfcb00000 if DEBUG_HI3620_UART
 +      default 0xfd883000 if DEBUG_ALPINE_UART0
        default 0xfe800000 if ARCH_IOP32X
        default 0xff690000 if DEBUG_RK32_UART2
        default 0xffc02000 if DEBUG_SOCFPGA_UART
                DEBUG_LL_UART_8250 || DEBUG_LL_UART_PL01X || \
                DEBUG_LL_UART_EFM32 || \
                DEBUG_UART_8250 || DEBUG_UART_PL01X || DEBUG_MESON_UARTAO || \
 -              DEBUG_MSM_UART || DEBUG_NETX_UART || \
 +              DEBUG_NETX_UART || \
                DEBUG_QCOM_UARTDM || DEBUG_R7S72100_SCIF2 || \
                DEBUG_RCAR_GEN1_SCIF0 || DEBUG_RCAR_GEN1_SCIF2 || \
                DEBUG_RCAR_GEN2_SCIF0 || DEBUG_RCAR_GEN2_SCIF2 || \
@@@ -1434,6 -1446,7 +1434,6 @@@ config DEBUG_UART_VIR
        hex "Virtual base address of debug UART"
        default 0xe0000a00 if DEBUG_NETX_UART
        default 0xe0010fe0 if ARCH_RPC
 -      default 0xe1000000 if DEBUG_MSM_UART
        default 0xf0000be0 if ARCH_EBSA110
        default 0xf0010000 if DEBUG_ASM9260_UART
        default 0xf01fb000 if DEBUG_NOMADIK_UART
        default 0xfd000000 if ARCH_SPEAR3XX || ARCH_SPEAR6XX
        default 0xfd000000 if ARCH_SPEAR13XX
        default 0xfd012000 if ARCH_MV78XX0
 +      default 0xfd883000 if DEBUG_ALPINE_UART0
        default 0xfde12000 if ARCH_DOVE
        default 0xfe012000 if ARCH_ORION5X
        default 0xf31004c0 if DEBUG_MESON_UARTAO
        default DEBUG_UART_PHYS if !MMU
        depends on DEBUG_LL_UART_8250 || DEBUG_LL_UART_PL01X || \
                DEBUG_UART_8250 || DEBUG_UART_PL01X || DEBUG_MESON_UARTAO || \
 -              DEBUG_MSM_UART || DEBUG_NETX_UART || \
 +              DEBUG_NETX_UART || \
                DEBUG_QCOM_UARTDM || DEBUG_S3C24XX_UART || \
                DEBUG_UART_BCM63XX || DEBUG_ASM9260_UART || \
                DEBUG_SIRFSOC_UART || DEBUG_DIGICOLOR_UA0
@@@ -1531,7 -1543,7 +1531,7 @@@ config DEBUG_UART_8250_WOR
        depends on DEBUG_LL_UART_8250 || DEBUG_UART_8250
        depends on DEBUG_UART_8250_SHIFT >= 2
        default y if DEBUG_PICOXCELL_UART || DEBUG_SOCFPGA_UART || \
 -              ARCH_KEYSTONE || \
 +              ARCH_KEYSTONE || DEBUG_ALPINE_UART0 || \
                DEBUG_DAVINCI_DMx_UART0 || DEBUG_DAVINCI_DA8XX_UART1 || \
                DEBUG_DAVINCI_DA8XX_UART2 || \
                DEBUG_BCM_KONA_UART || DEBUG_RK32_UART2 || \
@@@ -1544,7 -1556,7 +1544,7 @@@ config DEBUG_UART_8250_FLOW_CONTRO
  
  config DEBUG_UNCOMPRESS
        bool
 -      depends on ARCH_MULTIPLATFORM || ARCH_MSM || PLAT_SAMSUNG
 +      depends on ARCH_MULTIPLATFORM || PLAT_SAMSUNG
        default y if DEBUG_LL && !DEBUG_OMAP2PLUS_UART && \
                     (!DEBUG_TEGRA_UART || !ZBOOT_ROM)
        help
  config UNCOMPRESS_INCLUDE
        string
        default "debug/uncompress.h" if ARCH_MULTIPLATFORM || ARCH_MSM || \
 -                                      PLAT_SAMSUNG || ARCH_EFM32
 +                                      PLAT_SAMSUNG || ARCH_EFM32 || \
 +                                      ARCH_SHMOBILE_LEGACY
        default "mach/uncompress.h"
  
  config EARLY_PRINTK
@@@ -1599,59 -1610,6 +1599,6 @@@ config DEBUG_SET_MODULE_RON
          against certain classes of kernel exploits.
          If in doubt, say "N".
  
- menuconfig CORESIGHT
-       bool "CoreSight Tracing Support"
-       select ARM_AMBA
-       help
-         This framework provides a kernel interface for the CoreSight debug
-         and trace drivers to register themselves with. It's intended to build
-         a topological view of the CoreSight components based on a DT
-         specification and configure the right serie of components when a
-         trace source gets enabled.
- if CORESIGHT
- config CORESIGHT_LINKS_AND_SINKS
-       bool "CoreSight Link and Sink drivers"
-       help
-         This enables support for CoreSight link and sink drivers that are
-         responsible for transporting and collecting the trace data
-         respectively.  Link and sinks are dynamically aggregated with a trace
-         entity at run time to form a complete trace path.
- config CORESIGHT_LINK_AND_SINK_TMC
-       bool "Coresight generic TMC driver"
-       depends on CORESIGHT_LINKS_AND_SINKS
-       help
-         This enables support for the Trace Memory Controller driver.  Depending
-         on its configuration the device can act as a link (embedded trace router
-         - ETR) or sink (embedded trace FIFO).  The driver complies with the
-         generic implementation of the component without special enhancement or
-         added features.
- config CORESIGHT_SINK_TPIU
-       bool "Coresight generic TPIU driver"
-       depends on CORESIGHT_LINKS_AND_SINKS
-       help
-         This enables support for the Trace Port Interface Unit driver, responsible
-         for bridging the gap between the on-chip coresight components and a trace
-         port collection engine, typically connected to an external host for use
-         case capturing more traces than the on-board coresight memory can handle.
- config CORESIGHT_SINK_ETBV10
-       bool "Coresight ETBv1.0 driver"
-       depends on CORESIGHT_LINKS_AND_SINKS
-       help
-         This enables support for the Embedded Trace Buffer version 1.0 driver
-         that complies with the generic implementation of the component without
-         special enhancement or added features.
+ source "drivers/hwtracing/coresight/Kconfig"
  
- config CORESIGHT_SOURCE_ETM3X
-       bool "CoreSight Embedded Trace Macrocell 3.x driver"
-       select CORESIGHT_LINKS_AND_SINKS
-       help
-         This driver provides support for processor ETM3.x and PTM1.x modules,
-         which allows tracing the instructions that a processor is executing
-         This is primarily useful for instruction level tracing.  Depending
-         the ETM version data tracing may also be available.
- endif
  endmenu
index da1464bfbc603ae1b569980627e0121b06ce44be,8cdca51b6984f2d4ac73f8a146e69b7b76a6213b..7c4dca122a91d99a9848a691ce96a917294f59eb
@@@ -60,6 -60,7 +60,6 @@@
                ti,model = "omap3beagle";
  
                ti,mcbsp = <&mcbsp2>;
 -              ti,codec = <&twl_audio>;
        };
  
        gpio_keys {
                compatible = "arm,coresight-etb10", "arm,primecell";
                reg = <0x5401b000 0x1000>;
  
-               coresight-default-sink;
                clocks = <&emu_src_ck>;
                clock-names = "apb_pclk";
                port {
index 28f99a14c0a1fe8677987b180db4cd13e9ad621a,6d4c46be8c39eb9ff0c7f58ddc5f678ca745800a..a5474113cd50647f4b945b8db7ea3ff3a7643c83
@@@ -71,6 -71,7 +71,6 @@@
                ti,model = "omap3beagle";
  
                ti,mcbsp = <&mcbsp2>;
 -              ti,codec = <&twl_audio>;
        };
  
        gpio_keys {
                compatible = "arm,coresight-etb10", "arm,primecell";
                reg = <0x5401b000 0x1000>;
  
-               coresight-default-sink;
                clocks = <&emu_src_ck>;
                clock-names = "apb_pclk";
                port {
                };
        };
  };
 +
 +&gpmc {
 +      status = "ok";
 +      ranges = <0 0 0x30000000 0x1000000>;    /* CS0 space, 16MB */
 +
 +      /* Chip select 0 */
 +      nand@0,0 {
 +              reg = <0 0 4>;          /* NAND I/O window, 4 bytes */
 +              interrupts = <20>;
 +              ti,nand-ecc-opt = "ham1";
 +              nand-bus-width = <16>;
 +              #address-cells = <1>;
 +              #size-cells = <1>;
 +
 +              gpmc,device-width = <2>;
 +              gpmc,cs-on-ns = <0>;
 +              gpmc,cs-rd-off-ns = <36>;
 +              gpmc,cs-wr-off-ns = <36>;
 +              gpmc,adv-on-ns = <6>;
 +              gpmc,adv-rd-off-ns = <24>;
 +              gpmc,adv-wr-off-ns = <36>;
 +              gpmc,oe-on-ns = <6>;
 +              gpmc,oe-off-ns = <48>;
 +              gpmc,we-on-ns = <6>;
 +              gpmc,we-off-ns = <30>;
 +              gpmc,rd-cycle-ns = <72>;
 +              gpmc,wr-cycle-ns = <72>;
 +              gpmc,access-ns = <54>;
 +              gpmc,wr-access-ns = <30>;
 +
 +              partition@0 {
 +                      label = "X-Loader";
 +                      reg = <0 0x80000>;
 +              };
 +              partition@80000 {
 +                      label = "U-Boot";
 +                      reg = <0x80000 0x1e0000>;
 +              };
 +              partition@1c0000 {
 +                      label = "U-Boot Env";
 +                      reg = <0x260000 0x20000>;
 +              };
 +              partition@280000 {
 +                      label = "Kernel";
 +                      reg = <0x280000 0x400000>;
 +              };
 +              partition@780000 {
 +                      label = "Filesystem";
 +                      reg = <0x680000 0xf980000>;
 +              };
 +      };
 +};
index 499e228cc965e77e0babff69fad22b6e93ea3a58,2cab149b191ce69b16e03013e6ef14b94a7469a1..5c16145920eafd9604f0571dfe60a23986313871
@@@ -9,23 -9,9 +9,23 @@@
  
  /dts-v1/;
  
 -#include "omap34xx-hs.dtsi"
 +#include "omap34xx.dtsi"
  #include <dt-bindings/input/input.h>
  
 +/*
 + * Default secure signed bootloader (Nokia X-Loader) does not enable L3 firewall
 + * for omap AES HW crypto support. When linux kernel try to access memory of AES
 + * blocks then kernel receive "Unhandled fault: external abort on non-linefetch"
 + * and crash. Until somebody fix omap-aes.c and omap_hwmod_3xxx_data.c code (no
 + * crash anymore) omap AES support will be disabled for all Nokia N900 devices.
 + * There is "unofficial" version of bootloader which enables AES in L3 firewall
 + * but it is not widely used and to prevent kernel crash rather AES is disabled.
 + * There is also no runtime detection code if AES is disabled in L3 firewall...
 + */
 +&aes {
 +      status = "disabled";
 +};
 +
  / {
        model = "Nokia N900";
        compatible = "nokia,omap3-n900", "ti,omap3430", "ti,omap3";
                DRVDD-supply = <&vmmc2>;
                IOVDD-supply = <&vio>;
                DVDD-supply = <&vio>;
 +
 +              ai3x-micbias-vg = <1>;
        };
  
        tlv320aic3x_aux: tlv320aic3x@19 {
                DRVDD-supply = <&vmmc2>;
                IOVDD-supply = <&vio>;
                DVDD-supply = <&vio>;
 +
 +              ai3x-micbias-vg = <2>;
        };
  
        tsl2563: tsl2563@29 {
        pinctrl-0 = <&i2c3_pins>;
  
        clock-frequency = <400000>;
+       lis302dl: lis3lv02d@1d {
+               compatible = "st,lis3lv02d";
+               reg = <0x1d>;
+               Vdd-supply = <&vaux1>;
+               Vdd_IO-supply = <&vio>;
+               interrupt-parent = <&gpio6>;
+               interrupts = <21 20>; /* 181 and 180 */
+               /* click flags */
+               st,click-single-x;
+               st,click-single-y;
+               st,click-single-z;
+               /* Limits are 0.5g * value */
+               st,click-threshold-x = <8>;
+               st,click-threshold-y = <8>;
+               st,click-threshold-z = <10>;
+               /* Click must be longer than time limit */
+               st,click-time-limit = <9>;
+               /* Kind of debounce filter */
+               st,click-latency = <50>;
+               /* Interrupt line 2 for click detection */
+               st,irq2-click;
+               st,wakeup-x-hi;
+               st,wakeup-y-hi;
+               st,wakeup-threshold = <(800/18)>; /* millig-value / 18 to get HW values */
+               st,wakeup2-z-hi;
+               st,wakeup2-threshold = <(900/18)>; /* millig-value / 18 to get HW values */
+               st,hipass1-disable;
+               st,hipass2-disable;
+               st,axis-x = <1>;    /* LIS3_DEV_X */
+               st,axis-y = <(-2)>; /* LIS3_INV_DEV_Y */
+               st,axis-z = <(-3)>; /* LIS3_INV_DEV_Z */
+               st,min-limit-x = <(-32)>;
+               st,min-limit-y = <3>;
+               st,min-limit-z = <3>;
+               st,max-limit-x = <(-3)>;
+               st,max-limit-y = <32>;
+               st,max-limit-z = <32>;
+       };
  };
  
  &mmc1 {
index 571ef61f8ea94eb36bd34b4ab459b4c3435f5247,0a8194525bafa73aa994ac404e44ad9d7d806b9d..da8faf78536a3ae01827a2ee9480c486a04297a5
@@@ -179,8 -179,7 +179,8 @@@ skip_init
        add_early_randomness(rng);
  
        current_quality = rng->quality ? : default_quality;
 -      current_quality &= 1023;
 +      if (current_quality > 1024)
 +              current_quality = 1024;
  
        if (current_quality == 0 && hwrng_fill)
                kthread_stop(hwrng_fill);
@@@ -300,11 -299,14 +300,14 @@@ static const struct file_operations rng
        .llseek         = noop_llseek,
  };
  
+ static const struct attribute_group *rng_dev_groups[];
  static struct miscdevice rng_miscdev = {
        .minor          = RNG_MISCDEV_MINOR,
        .name           = RNG_MODULE_NAME,
        .nodename       = "hwrng",
        .fops           = &rng_chrdev_ops,
+       .groups         = rng_dev_groups,
  };
  
  
@@@ -377,37 -379,22 +380,22 @@@ static DEVICE_ATTR(rng_available, S_IRU
                   hwrng_attr_available_show,
                   NULL);
  
+ static struct attribute *rng_dev_attrs[] = {
+       &dev_attr_rng_current.attr,
+       &dev_attr_rng_available.attr,
+       NULL
+ };
+ ATTRIBUTE_GROUPS(rng_dev);
  
  static void __exit unregister_miscdev(void)
  {
-       device_remove_file(rng_miscdev.this_device, &dev_attr_rng_available);
-       device_remove_file(rng_miscdev.this_device, &dev_attr_rng_current);
        misc_deregister(&rng_miscdev);
  }
  
  static int __init register_miscdev(void)
  {
-       int err;
-       err = misc_register(&rng_miscdev);
-       if (err)
-               goto out;
-       err = device_create_file(rng_miscdev.this_device,
-                                &dev_attr_rng_current);
-       if (err)
-               goto err_misc_dereg;
-       err = device_create_file(rng_miscdev.this_device,
-                                &dev_attr_rng_available);
-       if (err)
-               goto err_remove_current;
- out:
-       return err;
- err_remove_current:
-       device_remove_file(rng_miscdev.this_device, &dev_attr_rng_current);
- err_misc_dereg:
-       misc_deregister(&rng_miscdev);
-       goto out;
+       return misc_register(&rng_miscdev);
  }
  
  static int hwrng_fillfn(void *unused)
@@@ -537,48 -524,6 +525,48 @@@ void hwrng_unregister(struct hwrng *rng
  }
  EXPORT_SYMBOL_GPL(hwrng_unregister);
  
 +static void devm_hwrng_release(struct device *dev, void *res)
 +{
 +      hwrng_unregister(*(struct hwrng **)res);
 +}
 +
 +static int devm_hwrng_match(struct device *dev, void *res, void *data)
 +{
 +      struct hwrng **r = res;
 +
 +      if (WARN_ON(!r || !*r))
 +              return 0;
 +
 +      return *r == data;
 +}
 +
 +int devm_hwrng_register(struct device *dev, struct hwrng *rng)
 +{
 +      struct hwrng **ptr;
 +      int error;
 +
 +      ptr = devres_alloc(devm_hwrng_release, sizeof(*ptr), GFP_KERNEL);
 +      if (!ptr)
 +              return -ENOMEM;
 +
 +      error = hwrng_register(rng);
 +      if (error) {
 +              devres_free(ptr);
 +              return error;
 +      }
 +
 +      *ptr = rng;
 +      devres_add(dev, ptr);
 +      return 0;
 +}
 +EXPORT_SYMBOL_GPL(devm_hwrng_register);
 +
 +void devm_hwrng_unregister(struct device *dev, struct hwrng *rng)
 +{
 +      devres_release(dev, devm_hwrng_release, devm_hwrng_match, rng);
 +}
 +EXPORT_SYMBOL_GPL(devm_hwrng_unregister);
 +
  static int __init hwrng_modinit(void)
  {
        return register_miscdev();
index d411e8c6f0a37295b6e9ddc9e428c2c2f4509b68,e6a6da4ad2f75252440307b082b278e37aec3226..468c75e103300b39070c1e404f0ef864d71e8ab1
@@@ -262,11 -262,6 +262,11 @@@ struct smi_info 
         */
        bool supports_event_msg_buff;
  
 +      /*
 +       * Can we clear the global enables receive irq bit?
 +       */
 +      bool cannot_clear_recv_irq_bit;
 +
        /*
         * Did we get an attention that we did not handle?
         */
@@@ -466,9 -461,6 +466,9 @@@ static void smi_mod_timer(struct smi_in
   * allocate messages, we just leave them in the BMC and run the system
   * polled until we can allocate some memory.  Once we have some
   * memory, we will re-enable the interrupt.
 + *
 + * Note that we cannot just use disable_irq(), since the interrupt may
 + * be shared.
   */
  static inline bool disable_si_irq(struct smi_info *smi_info)
  {
@@@ -557,15 -549,20 +557,15 @@@ static u8 current_global_enables(struc
  
        if (smi_info->supports_event_msg_buff)
                enables |= IPMI_BMC_EVT_MSG_BUFF;
 -      else
 -              enables &= ~IPMI_BMC_EVT_MSG_BUFF;
  
 -      if (smi_info->irq && !smi_info->interrupt_disabled)
 +      if ((smi_info->irq && !smi_info->interrupt_disabled) ||
 +          smi_info->cannot_clear_recv_irq_bit)
                enables |= IPMI_BMC_RCV_MSG_INTR;
 -      else
 -              enables &= ~IPMI_BMC_RCV_MSG_INTR;
  
        if (smi_info->supports_event_msg_buff &&
            smi_info->irq && !smi_info->interrupt_disabled)
  
                enables |= IPMI_BMC_EVT_MSG_INTR;
 -      else
 -              enables &= ~IPMI_BMC_EVT_MSG_INTR;
  
        *irq_on = enables & (IPMI_BMC_EVT_MSG_INTR | IPMI_BMC_RCV_MSG_INTR);
  
@@@ -2667,7 -2664,7 +2667,7 @@@ static struct pci_driver ipmi_pci_drive
  };
  #endif /* CONFIG_PCI */
  
- static struct of_device_id ipmi_match[];
+ static const struct of_device_id ipmi_match[];
  static int ipmi_probe(struct platform_device *dev)
  {
  #ifdef CONFIG_OF
@@@ -2764,7 -2761,7 +2764,7 @@@ static int ipmi_remove(struct platform_
        return 0;
  }
  
- static struct of_device_id ipmi_match[] =
+ static const struct of_device_id ipmi_match[] =
  {
        { .type = "ipmi", .compatible = "ipmi-kcs",
          .data = (void *)(unsigned long) SI_KCS },
@@@ -2903,96 -2900,6 +2903,96 @@@ static int try_get_dev_id(struct smi_in
        return rv;
  }
  
 +/*
 + * Some BMCs do not support clearing the receive irq bit in the global
 + * enables (even if they don't support interrupts on the BMC).  Check
 + * for this and handle it properly.
 + */
 +static void check_clr_rcv_irq(struct smi_info *smi_info)
 +{
 +      unsigned char         msg[3];
 +      unsigned char         *resp;
 +      unsigned long         resp_len;
 +      int                   rv;
 +
 +      resp = kmalloc(IPMI_MAX_MSG_LENGTH, GFP_KERNEL);
 +      if (!resp) {
 +              printk(KERN_WARNING PFX "Out of memory allocating response for"
 +                     " global enables command, cannot check recv irq bit"
 +                     " handling.\n");
 +              return;
 +      }
 +
 +      msg[0] = IPMI_NETFN_APP_REQUEST << 2;
 +      msg[1] = IPMI_GET_BMC_GLOBAL_ENABLES_CMD;
 +      smi_info->handlers->start_transaction(smi_info->si_sm, msg, 2);
 +
 +      rv = wait_for_msg_done(smi_info);
 +      if (rv) {
 +              printk(KERN_WARNING PFX "Error getting response from get"
 +                     " global enables command, cannot check recv irq bit"
 +                     " handling.\n");
 +              goto out;
 +      }
 +
 +      resp_len = smi_info->handlers->get_result(smi_info->si_sm,
 +                                                resp, IPMI_MAX_MSG_LENGTH);
 +
 +      if (resp_len < 4 ||
 +                      resp[0] != (IPMI_NETFN_APP_REQUEST | 1) << 2 ||
 +                      resp[1] != IPMI_GET_BMC_GLOBAL_ENABLES_CMD   ||
 +                      resp[2] != 0) {
 +              printk(KERN_WARNING PFX "Invalid return from get global"
 +                     " enables command, cannot check recv irq bit"
 +                     " handling.\n");
 +              rv = -EINVAL;
 +              goto out;
 +      }
 +
 +      if ((resp[3] & IPMI_BMC_RCV_MSG_INTR) == 0)
 +              /* Already clear, should work ok. */
 +              goto out;
 +
 +      msg[0] = IPMI_NETFN_APP_REQUEST << 2;
 +      msg[1] = IPMI_SET_BMC_GLOBAL_ENABLES_CMD;
 +      msg[2] = resp[3] & ~IPMI_BMC_RCV_MSG_INTR;
 +      smi_info->handlers->start_transaction(smi_info->si_sm, msg, 3);
 +
 +      rv = wait_for_msg_done(smi_info);
 +      if (rv) {
 +              printk(KERN_WARNING PFX "Error getting response from set"
 +                     " global enables command, cannot check recv irq bit"
 +                     " handling.\n");
 +              goto out;
 +      }
 +
 +      resp_len = smi_info->handlers->get_result(smi_info->si_sm,
 +                                                resp, IPMI_MAX_MSG_LENGTH);
 +
 +      if (resp_len < 3 ||
 +                      resp[0] != (IPMI_NETFN_APP_REQUEST | 1) << 2 ||
 +                      resp[1] != IPMI_SET_BMC_GLOBAL_ENABLES_CMD) {
 +              printk(KERN_WARNING PFX "Invalid return from get global"
 +                     " enables command, cannot check recv irq bit"
 +                     " handling.\n");
 +              rv = -EINVAL;
 +              goto out;
 +      }
 +
 +      if (resp[2] != 0) {
 +              /*
 +               * An error when setting the event buffer bit means
 +               * clearing the bit is not supported.
 +               */
 +              printk(KERN_WARNING PFX "The BMC does not support clearing"
 +                     " the recv irq bit, compensating, but the BMC needs to"
 +                     " be fixed.\n");
 +              smi_info->cannot_clear_recv_irq_bit = true;
 +      }
 + out:
 +      kfree(resp);
 +}
 +
  static int try_enable_event_buffer(struct smi_info *smi_info)
  {
        unsigned char         msg[3];
@@@ -3080,7 -2987,7 +3080,7 @@@ static int smi_type_proc_show(struct se
  
        seq_printf(m, "%s\n", si_to_str[smi->si_type]);
  
 -      return seq_has_overflowed(m);
 +      return 0;
  }
  
  static int smi_type_proc_open(struct inode *inode, struct file *file)
@@@ -3153,7 -3060,7 +3153,7 @@@ static int smi_params_proc_show(struct 
                   smi->irq,
                   smi->slave_addr);
  
 -      return seq_has_overflowed(m);
 +      return 0;
  }
  
  static int smi_params_proc_open(struct inode *inode, struct file *file)
@@@ -3488,8 -3395,6 +3488,8 @@@ static int try_smi_init(struct smi_inf
                goto out_err;
        }
  
 +      check_clr_rcv_irq(new_smi);
 +
        setup_oem_data_handler(new_smi);
        setup_xaction_handlers(new_smi);
  
index 6b5e795f3fe201cc0c29542a7ef61399fc4cb658,d9e763cddb50b9ea9a1470973a712bb8ae01786f..a0ed35b336e499e4c9e22e2cba97fa80f01287dd
@@@ -136,18 -136,35 +136,35 @@@ static const char *arizona_cable[] = 
  
  static void arizona_start_hpdet_acc_id(struct arizona_extcon_info *info);
  
- static void arizona_extcon_do_magic(struct arizona_extcon_info *info,
-                                   unsigned int magic)
+ static void arizona_extcon_hp_clamp(struct arizona_extcon_info *info,
+                                   bool clamp)
  {
        struct arizona *arizona = info->arizona;
+       unsigned int mask = 0, val = 0;
        int ret;
  
+       switch (arizona->type) {
+       case WM5110:
+               mask = ARIZONA_HP1L_SHRTO | ARIZONA_HP1L_FLWR |
+                      ARIZONA_HP1L_SHRTI;
+               if (clamp)
+                       val = ARIZONA_HP1L_SHRTO;
+               else
+                       val = ARIZONA_HP1L_FLWR | ARIZONA_HP1L_SHRTI;
+               break;
+       default:
+               mask = ARIZONA_RMV_SHRT_HP1L;
+               if (clamp)
+                       val = ARIZONA_RMV_SHRT_HP1L;
+               break;
+       };
        mutex_lock(&arizona->dapm->card->dapm_mutex);
  
-       arizona->hpdet_magic = magic;
+       arizona->hpdet_clamp = clamp;
  
-       /* Keep the HP output stages disabled while doing the magic */
-       if (magic) {
+       /* Keep the HP output stages disabled while doing the clamp */
+       if (clamp) {
                ret = regmap_update_bits(arizona->regmap,
                                         ARIZONA_OUTPUT_ENABLES_1,
                                         ARIZONA_OUT1L_ENA |
                                 ret);
        }
  
-       ret = regmap_update_bits(arizona->regmap, 0x225, 0x4000,
-                                magic);
+       ret = regmap_update_bits(arizona->regmap, ARIZONA_HP_CTRL_1L,
+                                mask, val);
        if (ret != 0)
-               dev_warn(arizona->dev, "Failed to do magic: %d\n",
+               dev_warn(arizona->dev, "Failed to do clamp: %d\n",
                                 ret);
  
-       ret = regmap_update_bits(arizona->regmap, 0x226, 0x4000,
-                                magic);
+       ret = regmap_update_bits(arizona->regmap, ARIZONA_HP_CTRL_1R,
+                                mask, val);
        if (ret != 0)
-               dev_warn(arizona->dev, "Failed to do magic: %d\n",
+               dev_warn(arizona->dev, "Failed to do clamp: %d\n",
                         ret);
  
-       /* Restore the desired state while not doing the magic */
-       if (!magic) {
+       /* Restore the desired state while not doing the clamp */
+       if (!clamp) {
                ret = regmap_update_bits(arizona->regmap,
                                         ARIZONA_OUTPUT_ENABLES_1,
                                         ARIZONA_OUT1L_ENA |
@@@ -603,7 -620,7 +620,7 @@@ done
                           ARIZONA_HP_IMPEDANCE_RANGE_MASK | ARIZONA_HP_POLL,
                           0);
  
-       arizona_extcon_do_magic(info, 0);
+       arizona_extcon_hp_clamp(info, false);
  
        if (id_gpio)
                gpio_set_value_cansleep(id_gpio, 0);
@@@ -648,7 -665,7 +665,7 @@@ static void arizona_identify_headphone(
        if (info->mic)
                arizona_stop_mic(info);
  
-       arizona_extcon_do_magic(info, 0x4000);
+       arizona_extcon_hp_clamp(info, true);
  
        ret = regmap_update_bits(arizona->regmap,
                                 ARIZONA_ACCESSORY_DETECT_MODE_1,
@@@ -699,7 -716,7 +716,7 @@@ static void arizona_start_hpdet_acc_id(
  
        info->hpdet_active = true;
  
-       arizona_extcon_do_magic(info, 0x4000);
+       arizona_extcon_hp_clamp(info, true);
  
        ret = regmap_update_bits(arizona->regmap,
                                 ARIZONA_ACCESSORY_DETECT_MODE_1,
@@@ -1149,7 -1166,6 +1166,7 @@@ static int arizona_extcon_probe(struct 
                }
                break;
        case WM5110:
 +      case WM8280:
                switch (arizona->rev) {
                case 0 ... 2:
                        break;
index 6f75e9d5b6fb0755d41b3e252daea83179efb4b6,f3cc8e97a0f8e65ef7b7d4b3526661990c280dad..35e51ce93a5c6af546dcc655a63870b0a7326b81
@@@ -22,6 -22,7 +22,7 @@@
  #include <linux/platform_device.h>
  #include <linux/amba/bus.h>
  #include <linux/coresight.h>
+ #include <linux/cpumask.h>
  #include <asm/smp_plat.h>
  
  
@@@ -52,6 -53,15 +53,6 @@@ of_coresight_get_endpoint_device(struc
                               endpoint, of_dev_node_match);
  }
  
 -static struct device_node *of_get_coresight_endpoint(
 -              const struct device_node *parent, struct device_node *prev)
 -{
 -      struct device_node *node = of_graph_get_next_endpoint(parent, prev);
 -
 -      of_node_put(prev);
 -      return node;
 -}
 -
  static void of_coresight_get_ports(struct device_node *node,
                                   int *nr_inport, int *nr_outport)
  {
@@@ -59,7 -69,7 +60,7 @@@
        int in = 0, out = 0;
  
        do {
 -              ep = of_get_coresight_endpoint(node, ep);
 +              ep = of_graph_get_next_endpoint(node, ep);
                if (!ep)
                        break;
  
@@@ -104,7 -114,7 +105,7 @@@ static int of_coresight_alloc_memory(st
  struct coresight_platform_data *of_get_coresight_platform_data(
                                struct device *dev, struct device_node *node)
  {
-       int i = 0, ret = 0;
+       int i = 0, ret = 0, cpu;
        struct coresight_platform_data *pdata;
        struct of_endpoint endpoint, rendpoint;
        struct device *rdev;
                /* Iterate through each port to discover topology */
                do {
                        /* Get a handle on a port */
 -                      ep = of_get_coresight_endpoint(node, ep);
 +                      ep = of_graph_get_next_endpoint(node, ep);
                        if (!ep)
                                break;
  
        /* Affinity defaults to CPU0 */
        pdata->cpu = 0;
        dn = of_parse_phandle(node, "cpu", 0);
-       if (dn) {
-               const u32 *cell;
-               int len, index;
-               u64 hwid;
-               cell = of_get_property(dn, "reg", &len);
-               if (cell) {
-                       hwid = of_read_number(cell, of_n_addr_cells(dn));
-                       index = get_logical_index(hwid);
-                       if (index != -EINVAL)
-                               pdata->cpu = index;
+       for (cpu = 0; dn && cpu < nr_cpu_ids; cpu++) {
+               if (dn == of_get_cpu_node(cpu, NULL)) {
+                       pdata->cpu = cpu;
+                       break;
                }
        }
  
index 40ea639fa413a92f0239e1835894e73d36ddc1c1,3c1fd87ee10baa156d0856a9c007937f7e2cd126..d2cd53e3fac378b27e0694e04ea8cee0438d784d
@@@ -19,6 -19,7 +19,6 @@@
  #include <linux/errno.h>
  #include <linux/types.h>
  #include <linux/fcntl.h>
 -#include <linux/aio.h>
  #include <linux/ioctl.h>
  #include <linux/cdev.h>
  #include <linux/list.h>
@@@ -48,10 -49,7 +48,7 @@@ void mei_amthif_reset_params(struct mei
  {
        /* reset iamthif parameters. */
        dev->iamthif_current_cb = NULL;
-       dev->iamthif_msg_buf_size = 0;
-       dev->iamthif_msg_buf_index = 0;
        dev->iamthif_canceled = false;
-       dev->iamthif_ioctl = false;
        dev->iamthif_state = MEI_IAMTHIF_IDLE;
        dev->iamthif_timer = 0;
        dev->iamthif_stall_timer = 0;
@@@ -69,7 -67,6 +66,6 @@@ int mei_amthif_host_init(struct mei_dev
  {
        struct mei_cl *cl = &dev->iamthif_cl;
        struct mei_me_client *me_cl;
-       unsigned char *msg_buf;
        int ret;
  
        dev->iamthif_state = MEI_IAMTHIF_IDLE;
        dev->iamthif_mtu = me_cl->props.max_msg_length;
        dev_dbg(dev->dev, "IAMTHIF_MTU = %d\n", dev->iamthif_mtu);
  
-       kfree(dev->iamthif_msg_buf);
-       dev->iamthif_msg_buf = NULL;
-       /* allocate storage for ME message buffer */
-       msg_buf = kcalloc(dev->iamthif_mtu,
-                       sizeof(unsigned char), GFP_KERNEL);
-       if (!msg_buf) {
-               ret = -ENOMEM;
-               goto out;
-       }
-       dev->iamthif_msg_buf = msg_buf;
  
        ret = mei_cl_link(cl, MEI_IAMTHIF_HOST_CLIENT_ID);
        if (ret < 0) {
@@@ -194,30 -179,33 +178,33 @@@ int mei_amthif_read(struct mei_device *
                dev_dbg(dev->dev, "woke up from sleep\n");
        }
  
+       if (cb->status) {
+               rets = cb->status;
+               dev_dbg(dev->dev, "read operation failed %d\n", rets);
+               goto free;
+       }
  
        dev_dbg(dev->dev, "Got amthif data\n");
        dev->iamthif_timer = 0;
  
-       if (cb) {
-               timeout = cb->read_time +
-                       mei_secs_to_jiffies(MEI_IAMTHIF_READ_TIMER);
-               dev_dbg(dev->dev, "amthif timeout = %lud\n",
-                               timeout);
-               if  (time_after(jiffies, timeout)) {
-                       dev_dbg(dev->dev, "amthif Time out\n");
-                       /* 15 sec for the message has expired */
-                       list_del(&cb->list);
-                       rets = -ETIME;
-                       goto free;
-               }
+       timeout = cb->read_time +
+               mei_secs_to_jiffies(MEI_IAMTHIF_READ_TIMER);
+       dev_dbg(dev->dev, "amthif timeout = %lud\n",
+                       timeout);
+       if  (time_after(jiffies, timeout)) {
+               dev_dbg(dev->dev, "amthif Time out\n");
+               /* 15 sec for the message has expired */
+               list_del_init(&cb->list);
+               rets = -ETIME;
+               goto free;
        }
        /* if the whole message will fit remove it from the list */
        if (cb->buf_idx >= *offset && length >= (cb->buf_idx - *offset))
-               list_del(&cb->list);
+               list_del_init(&cb->list);
        else if (cb->buf_idx > 0 && cb->buf_idx <= *offset) {
                /* end of the message has been reached */
-               list_del(&cb->list);
+               list_del_init(&cb->list);
                rets = 0;
                goto free;
        }
                 * remove message from deletion list
                 */
  
-       dev_dbg(dev->dev, "amthif cb->response_buffer size - %d\n",
-           cb->response_buffer.size);
+       dev_dbg(dev->dev, "amthif cb->buf size - %d\n",
+           cb->buf.size);
        dev_dbg(dev->dev, "amthif cb->buf_idx - %lu\n", cb->buf_idx);
  
        /* length is being truncated to PAGE_SIZE, however,
         * the buf_idx may point beyond */
        length = min_t(size_t, length, (cb->buf_idx - *offset));
  
-       if (copy_to_user(ubuf, cb->response_buffer.data + *offset, length)) {
+       if (copy_to_user(ubuf, cb->buf.data + *offset, length)) {
                dev_dbg(dev->dev, "failed to copy data to userland\n");
                rets = -EFAULT;
        } else {
@@@ -252,126 -240,88 +239,88 @@@ out
  }
  
  /**
-  * mei_amthif_send_cmd - send amthif command to the ME
+  * mei_amthif_read_start - queue message for sending read credential
   *
-  * @dev: the device structure
-  * @cb: mei call back struct
+  * @cl: host client
+  * @file: file pointer of message recipient
   *
   * Return: 0 on success, <0 on failure.
-  *
   */
- static int mei_amthif_send_cmd(struct mei_device *dev, struct mei_cl_cb *cb)
+ static int mei_amthif_read_start(struct mei_cl *cl, struct file *file)
  {
-       struct mei_msg_hdr mei_hdr;
-       struct mei_cl *cl;
-       int ret;
-       if (!dev || !cb)
-               return -ENODEV;
+       struct mei_device *dev = cl->dev;
+       struct mei_cl_cb *cb;
+       size_t length = dev->iamthif_mtu;
+       int rets;
  
-       dev_dbg(dev->dev, "write data to amthif client.\n");
+       cb = mei_io_cb_init(cl, MEI_FOP_READ, file);
+       if (!cb) {
+               rets = -ENOMEM;
+               goto err;
+       }
  
-       dev->iamthif_state = MEI_IAMTHIF_WRITING;
-       dev->iamthif_current_cb = cb;
-       dev->iamthif_file_object = cb->file_object;
-       dev->iamthif_canceled = false;
-       dev->iamthif_ioctl = true;
-       dev->iamthif_msg_buf_size = cb->request_buffer.size;
-       memcpy(dev->iamthif_msg_buf, cb->request_buffer.data,
-              cb->request_buffer.size);
-       cl = &dev->iamthif_cl;
+       rets = mei_io_cb_alloc_buf(cb, length);
+       if (rets)
+               goto err;
  
-       ret = mei_cl_flow_ctrl_creds(cl);
-       if (ret < 0)
-               return ret;
+       list_add_tail(&cb->list, &dev->ctrl_wr_list.list);
  
-       if (ret && mei_hbuf_acquire(dev)) {
-               ret = 0;
-               if (cb->request_buffer.size > mei_hbuf_max_len(dev)) {
-                       mei_hdr.length = mei_hbuf_max_len(dev);
-                       mei_hdr.msg_complete = 0;
-               } else {
-                       mei_hdr.length = cb->request_buffer.size;
-                       mei_hdr.msg_complete = 1;
-               }
+       dev->iamthif_state = MEI_IAMTHIF_READING;
+       dev->iamthif_file_object = cb->file_object;
+       dev->iamthif_current_cb = cb;
  
-               mei_hdr.host_addr = cl->host_client_id;
-               mei_hdr.me_addr = cl->me_client_id;
-               mei_hdr.reserved = 0;
-               mei_hdr.internal = 0;
-               dev->iamthif_msg_buf_index += mei_hdr.length;
-               ret = mei_write_message(dev, &mei_hdr, dev->iamthif_msg_buf);
-               if (ret)
-                       return ret;
-               if (mei_hdr.msg_complete) {
-                       if (mei_cl_flow_ctrl_reduce(cl))
-                               return -EIO;
-                       dev->iamthif_flow_control_pending = true;
-                       dev->iamthif_state = MEI_IAMTHIF_FLOW_CONTROL;
-                       dev_dbg(dev->dev, "add amthif cb to write waiting list\n");
-                       dev->iamthif_current_cb = cb;
-                       dev->iamthif_file_object = cb->file_object;
-                       list_add_tail(&cb->list, &dev->write_waiting_list.list);
-               } else {
-                       dev_dbg(dev->dev, "message does not complete, so add amthif cb to write list.\n");
-                       list_add_tail(&cb->list, &dev->write_list.list);
-               }
-       } else {
-               list_add_tail(&cb->list, &dev->write_list.list);
-       }
        return 0;
+ err:
+       mei_io_cb_free(cb);
+       return rets;
  }
  
  /**
-  * mei_amthif_write - write amthif data to amthif client
+  * mei_amthif_send_cmd - send amthif command to the ME
   *
-  * @dev: the device structure
+  * @cl: the host client
   * @cb: mei call back struct
   *
   * Return: 0 on success, <0 on failure.
-  *
   */
int mei_amthif_write(struct mei_device *dev, struct mei_cl_cb *cb)
static int mei_amthif_send_cmd(struct mei_cl *cl, struct mei_cl_cb *cb)
  {
+       struct mei_device *dev;
        int ret;
  
-       if (!dev || !cb)
+       if (!cl->dev || !cb)
                return -ENODEV;
  
-       ret = mei_io_cb_alloc_resp_buf(cb, dev->iamthif_mtu);
-       if (ret)
+       dev = cl->dev;
+       dev->iamthif_state = MEI_IAMTHIF_WRITING;
+       dev->iamthif_current_cb = cb;
+       dev->iamthif_file_object = cb->file_object;
+       dev->iamthif_canceled = false;
+       ret = mei_cl_write(cl, cb, false);
+       if (ret < 0)
                return ret;
  
-       cb->fop_type = MEI_FOP_WRITE;
+       if (cb->completed)
+               cb->status = mei_amthif_read_start(cl, cb->file_object);
  
-       if (!list_empty(&dev->amthif_cmd_list.list) ||
-           dev->iamthif_state != MEI_IAMTHIF_IDLE) {
-               dev_dbg(dev->dev,
-                       "amthif state = %d\n", dev->iamthif_state);
-               dev_dbg(dev->dev, "AMTHIF: add cb to the wait list\n");
-               list_add_tail(&cb->list, &dev->amthif_cmd_list.list);
-               return 0;
-       }
-       return mei_amthif_send_cmd(dev, cb);
+       return 0;
  }
  /**
   * mei_amthif_run_next_cmd - send next amt command from queue
   *
   * @dev: the device structure
+  *
+  * Return: 0 on success, <0 on failure.
   */
void mei_amthif_run_next_cmd(struct mei_device *dev)
int mei_amthif_run_next_cmd(struct mei_device *dev)
  {
+       struct mei_cl *cl = &dev->iamthif_cl;
        struct mei_cl_cb *cb;
-       int ret;
-       if (!dev)
-               return;
  
-       dev->iamthif_msg_buf_size = 0;
-       dev->iamthif_msg_buf_index = 0;
        dev->iamthif_canceled = false;
-       dev->iamthif_ioctl = true;
        dev->iamthif_state = MEI_IAMTHIF_IDLE;
        dev->iamthif_timer = 0;
        dev->iamthif_file_object = NULL;
        cb = list_first_entry_or_null(&dev->amthif_cmd_list.list,
                                        typeof(*cb), list);
        if (!cb)
-               return;
-       list_del(&cb->list);
-       ret =  mei_amthif_send_cmd(dev, cb);
-       if (ret)
-               dev_warn(dev->dev, "amthif write failed status = %d\n", ret);
+               return 0;
+       list_del_init(&cb->list);
+       return mei_amthif_send_cmd(cl, cb);
  }
  
+ /**
+  * mei_amthif_write - write amthif data to amthif client
+  *
+  * @cl: host client
+  * @cb: mei call back struct
+  *
+  * Return: 0 on success, <0 on failure.
+  */
+ int mei_amthif_write(struct mei_cl *cl, struct mei_cl_cb *cb)
+ {
+       struct mei_device *dev;
+       if (WARN_ON(!cl || !cl->dev))
+               return -ENODEV;
+       if (WARN_ON(!cb))
+               return -EINVAL;
+       dev = cl->dev;
+       list_add_tail(&cb->list, &dev->amthif_cmd_list.list);
+       return mei_amthif_run_next_cmd(dev);
+ }
+ /**
+  * mei_amthif_poll - the amthif poll function
+  *
+  * @dev: the device structure
+  * @file: pointer to file structure
+  * @wait: pointer to poll_table structure
+  *
+  * Return: poll mask
+  *
+  * Locking: called under "dev->device_lock" lock
+  */
  
  unsigned int mei_amthif_poll(struct mei_device *dev,
                struct file *file, poll_table *wait)
  
        poll_wait(file, &dev->iamthif_cl.wait, wait);
  
-       mutex_lock(&dev->device_lock);
-       if (!mei_cl_is_connected(&dev->iamthif_cl)) {
-               mask = POLLERR;
-       } else if (dev->iamthif_state == MEI_IAMTHIF_READ_COMPLETE &&
-                  dev->iamthif_file_object == file) {
+       if (dev->iamthif_state == MEI_IAMTHIF_READ_COMPLETE &&
+           dev->iamthif_file_object == file) {
  
-               mask |= (POLLIN | POLLRDNORM);
-               dev_dbg(dev->dev, "run next amthif cb\n");
+               mask |= POLLIN | POLLRDNORM;
                mei_amthif_run_next_cmd(dev);
        }
-       mutex_unlock(&dev->device_lock);
  
        return mask;
  }
  int mei_amthif_irq_write(struct mei_cl *cl, struct mei_cl_cb *cb,
                         struct mei_cl_cb *cmpl_list)
  {
-       struct mei_device *dev = cl->dev;
-       struct mei_msg_hdr mei_hdr;
-       size_t len = dev->iamthif_msg_buf_size - dev->iamthif_msg_buf_index;
-       u32 msg_slots = mei_data2slots(len);
-       int slots;
-       int rets;
-       rets = mei_cl_flow_ctrl_creds(cl);
-       if (rets < 0)
-               return rets;
-       if (rets == 0) {
-               cl_dbg(dev, cl, "No flow control credentials: not sending.\n");
-               return 0;
-       }
-       mei_hdr.host_addr = cl->host_client_id;
-       mei_hdr.me_addr = cl->me_client_id;
-       mei_hdr.reserved = 0;
-       mei_hdr.internal = 0;
-       slots = mei_hbuf_empty_slots(dev);
-       if (slots >= msg_slots) {
-               mei_hdr.length = len;
-               mei_hdr.msg_complete = 1;
-       /* Split the message only if we can write the whole host buffer */
-       } else if (slots == dev->hbuf_depth) {
-               msg_slots = slots;
-               len = (slots * sizeof(u32)) - sizeof(struct mei_msg_hdr);
-               mei_hdr.length = len;
-               mei_hdr.msg_complete = 0;
-       } else {
-               /* wait for next time the host buffer is empty */
-               return 0;
-       }
-       dev_dbg(dev->dev, MEI_HDR_FMT,  MEI_HDR_PRM(&mei_hdr));
-       rets = mei_write_message(dev, &mei_hdr,
-                       dev->iamthif_msg_buf + dev->iamthif_msg_buf_index);
-       if (rets) {
-               dev->iamthif_state = MEI_IAMTHIF_IDLE;
-               cl->status = rets;
-               list_del(&cb->list);
-               return rets;
-       }
-       if (mei_cl_flow_ctrl_reduce(cl))
-               return -EIO;
-       dev->iamthif_msg_buf_index += mei_hdr.length;
-       cl->status = 0;
-       if (mei_hdr.msg_complete) {
-               dev->iamthif_state = MEI_IAMTHIF_FLOW_CONTROL;
-               dev->iamthif_flow_control_pending = true;
-               /* save iamthif cb sent to amthif client */
-               cb->buf_idx = dev->iamthif_msg_buf_index;
-               dev->iamthif_current_cb = cb;
+       int ret;
  
-               list_move_tail(&cb->list, &dev->write_waiting_list.list);
-       }
+       ret = mei_cl_irq_write(cl, cb, cmpl_list);
+       if (ret)
+               return ret;
  
+       if (cb->completed)
+               cb->status = mei_amthif_read_start(cl, cb->file_object);
  
        return 0;
  }
   * mei_amthif_irq_read_msg - read routine after ISR to
   *                    handle the read amthif message
   *
-  * @dev: the device structure
+  * @cl: mei client
   * @mei_hdr: header of amthif message
-  * @complete_list: An instance of our list structure
+  * @cmpl_list: completed callbacks list
   *
-  * Return: 0 on success, <0 on failure.
+  * Return: -ENODEV if cb is NULL 0 otherwise; error message is in cb->status
   */
- int mei_amthif_irq_read_msg(struct mei_device *dev,
+ int mei_amthif_irq_read_msg(struct mei_cl *cl,
                            struct mei_msg_hdr *mei_hdr,
-                           struct mei_cl_cb *complete_list)
+                           struct mei_cl_cb *cmpl_list)
  {
-       struct mei_cl_cb *cb;
-       unsigned char *buffer;
-       BUG_ON(mei_hdr->me_addr != dev->iamthif_cl.me_client_id);
-       BUG_ON(dev->iamthif_state != MEI_IAMTHIF_READING);
+       struct mei_device *dev;
+       int ret;
  
-       buffer = dev->iamthif_msg_buf + dev->iamthif_msg_buf_index;
-       BUG_ON(dev->iamthif_mtu < dev->iamthif_msg_buf_index + mei_hdr->length);
+       dev = cl->dev;
  
-       mei_read_slots(dev, buffer, mei_hdr->length);
+       if (dev->iamthif_state != MEI_IAMTHIF_READING)
+               return 0;
  
-       dev->iamthif_msg_buf_index += mei_hdr->length;
+       ret = mei_cl_irq_read_msg(cl, mei_hdr, cmpl_list);
+       if (ret)
+               return ret;
  
        if (!mei_hdr->msg_complete)
                return 0;
  
-       dev_dbg(dev->dev, "amthif_message_buffer_index =%d\n",
-                       mei_hdr->length);
        dev_dbg(dev->dev, "completed amthif read.\n ");
-       if (!dev->iamthif_current_cb)
-               return -ENODEV;
-       cb = dev->iamthif_current_cb;
        dev->iamthif_current_cb = NULL;
        dev->iamthif_stall_timer = 0;
-       cb->buf_idx = dev->iamthif_msg_buf_index;
-       cb->read_time = jiffies;
-       if (dev->iamthif_ioctl) {
-               /* found the iamthif cb */
-               dev_dbg(dev->dev, "complete the amthif read cb.\n ");
-               dev_dbg(dev->dev, "add the amthif read cb to complete.\n ");
-               list_add_tail(&cb->list, &complete_list->list);
-       }
-       return 0;
- }
  
- /**
-  * mei_amthif_irq_read - prepares to read amthif data.
-  *
-  * @dev: the device structure.
-  * @slots: free slots.
-  *
-  * Return: 0, OK; otherwise, error.
-  */
- int mei_amthif_irq_read(struct mei_device *dev, s32 *slots)
- {
-       u32 msg_slots = mei_data2slots(sizeof(struct hbm_flow_control));
-       if (*slots < msg_slots)
-               return -EMSGSIZE;
-       *slots -= msg_slots;
-       if (mei_hbm_cl_flow_control_req(dev, &dev->iamthif_cl)) {
-               dev_dbg(dev->dev, "iamthif flow control failed\n");
-               return -EIO;
-       }
-       dev_dbg(dev->dev, "iamthif flow control success\n");
-       dev->iamthif_state = MEI_IAMTHIF_READING;
-       dev->iamthif_flow_control_pending = false;
-       dev->iamthif_msg_buf_index = 0;
-       dev->iamthif_msg_buf_size = 0;
-       dev->iamthif_stall_timer = MEI_IAMTHIF_STALL_TIMER;
-       dev->hbuf_is_ready = mei_hbuf_is_ready(dev);
        return 0;
  }
  
   */
  void mei_amthif_complete(struct mei_device *dev, struct mei_cl_cb *cb)
  {
+       if (cb->fop_type == MEI_FOP_WRITE) {
+               if (!cb->status) {
+                       dev->iamthif_stall_timer = MEI_IAMTHIF_STALL_TIMER;
+                       mei_io_cb_free(cb);
+                       return;
+               }
+               /*
+                * in case of error enqueue the write cb to complete read list
+                * so it can be propagated to the reader
+                */
+               list_add_tail(&cb->list, &dev->amthif_rd_complete_list.list);
+               wake_up_interruptible(&dev->iamthif_cl.wait);
+               return;
+       }
        if (dev->iamthif_canceled != 1) {
                dev->iamthif_state = MEI_IAMTHIF_READ_COMPLETE;
                dev->iamthif_stall_timer = 0;
-               memcpy(cb->response_buffer.data,
-                               dev->iamthif_msg_buf,
-                               dev->iamthif_msg_buf_index);
                list_add_tail(&cb->list, &dev->amthif_rd_complete_list.list);
                dev_dbg(dev->dev, "amthif read completed\n");
                dev->iamthif_timer = jiffies;
                dev_dbg(dev->dev, "dev->iamthif_timer = %ld\n",
-                               dev->iamthif_timer);
+                       dev->iamthif_timer);
        } else {
                mei_amthif_run_next_cmd(dev);
        }
  static bool mei_clear_list(struct mei_device *dev,
                const struct file *file, struct list_head *mei_cb_list)
  {
-       struct mei_cl_cb *cb_pos = NULL;
-       struct mei_cl_cb *cb_next = NULL;
+       struct mei_cl *cl = &dev->iamthif_cl;
+       struct mei_cl_cb *cb, *next;
        bool removed = false;
  
        /* list all list member */
-       list_for_each_entry_safe(cb_pos, cb_next, mei_cb_list, list) {
+       list_for_each_entry_safe(cbnext, mei_cb_list, list) {
                /* check if list member associated with a file */
-               if (file == cb_pos->file_object) {
-                       /* remove member from the list */
-                       list_del(&cb_pos->list);
+               if (file == cb->file_object) {
                        /* check if cb equal to current iamthif cb */
-                       if (dev->iamthif_current_cb == cb_pos) {
+                       if (dev->iamthif_current_cb == cb) {
                                dev->iamthif_current_cb = NULL;
                                /* send flow control to iamthif client */
-                               mei_hbm_cl_flow_control_req(dev,
-                                                       &dev->iamthif_cl);
+                               mei_hbm_cl_flow_control_req(dev, cl);
                        }
                        /* free all allocated buffers */
-                       mei_io_cb_free(cb_pos);
-                       cb_pos = NULL;
+                       mei_io_cb_free(cb);
                        removed = true;
                }
        }
diff --combined drivers/misc/mei/main.c
index 47680c84801c766f158bf65c2e2dd3893fdff300,7f77f39c24a77ccf06a062838b565423d75ccaf9..3e29681595064a74de8c856f782402d82aa08fe0
@@@ -22,6 -22,7 +22,6 @@@
  #include <linux/errno.h>
  #include <linux/types.h>
  #include <linux/fcntl.h>
 -#include <linux/aio.h>
  #include <linux/poll.h>
  #include <linux/init.h>
  #include <linux/ioctl.h>
@@@ -58,24 -59,18 +58,18 @@@ static int mei_open(struct inode *inode
  
        mutex_lock(&dev->device_lock);
  
-       cl = NULL;
-       err = -ENODEV;
        if (dev->dev_state != MEI_DEV_ENABLED) {
                dev_dbg(dev->dev, "dev_state != MEI_ENABLED  dev_state = %s\n",
                    mei_dev_state_str(dev->dev_state));
+               err = -ENODEV;
                goto err_unlock;
        }
  
-       err = -ENOMEM;
-       cl = mei_cl_allocate(dev);
-       if (!cl)
-               goto err_unlock;
-       /* open_handle_count check is handled in the mei_cl_link */
-       err = mei_cl_link(cl, MEI_HOST_CLIENT_ID_ANY);
-       if (err)
+       cl = mei_cl_alloc_linked(dev, MEI_HOST_CLIENT_ID_ANY);
+       if (IS_ERR(cl)) {
+               err = PTR_ERR(cl);
                goto err_unlock;
+       }
  
        file->private_data = cl;
  
@@@ -85,7 -80,6 +79,6 @@@
  
  err_unlock:
        mutex_unlock(&dev->device_lock);
-       kfree(cl);
        return err;
  }
  
  static int mei_release(struct inode *inode, struct file *file)
  {
        struct mei_cl *cl = file->private_data;
-       struct mei_cl_cb *cb;
        struct mei_device *dev;
        int rets = 0;
  
                rets = mei_amthif_release(dev, file);
                goto out;
        }
-       if (cl->state == MEI_FILE_CONNECTED) {
+       if (mei_cl_is_connected(cl)) {
                cl->state = MEI_FILE_DISCONNECTING;
                cl_dbg(dev, cl, "disconnecting\n");
                rets = mei_cl_disconnect(cl);
        }
-       mei_cl_flush_queues(cl);
+       mei_cl_flush_queues(cl, file);
        cl_dbg(dev, cl, "removing\n");
  
        mei_cl_unlink(cl);
  
-       /* free read cb */
-       cb = NULL;
-       if (cl->read_cb) {
-               cb = mei_cl_find_read_cb(cl);
-               /* Remove entry from read list */
-               if (cb)
-                       list_del(&cb->list);
-               cb = cl->read_cb;
-               cl->read_cb = NULL;
-       }
        file->private_data = NULL;
  
-       mei_io_cb_free(cb);
        kfree(cl);
  out:
        mutex_unlock(&dev->device_lock);
@@@ -162,9 -140,8 +139,8 @@@ static ssize_t mei_read(struct file *fi
                        size_t length, loff_t *offset)
  {
        struct mei_cl *cl = file->private_data;
-       struct mei_cl_cb *cb_pos = NULL;
-       struct mei_cl_cb *cb = NULL;
        struct mei_device *dev;
+       struct mei_cl_cb *cb = NULL;
        int rets;
        int err;
  
                goto out;
        }
  
-       if (cl->read_cb) {
-               cb = cl->read_cb;
+       cb = mei_cl_read_cb(cl, file);
+       if (cb) {
                /* read what left */
                if (cb->buf_idx > *offset)
                        goto copy_buffer;
                *offset = 0;
        }
  
-       err = mei_cl_read_start(cl, length);
+       err = mei_cl_read_start(cl, length, file);
        if (err && err != -EBUSY) {
                dev_dbg(dev->dev,
                        "mei start read failure with status = %d\n", err);
                goto out;
        }
  
-       if (MEI_READ_COMPLETE != cl->reading_state &&
-                       !waitqueue_active(&cl->rx_wait)) {
+       if (list_empty(&cl->rd_completed) && !waitqueue_active(&cl->rx_wait)) {
                if (file->f_flags & O_NONBLOCK) {
                        rets = -EAGAIN;
                        goto out;
                mutex_unlock(&dev->device_lock);
  
                if (wait_event_interruptible(cl->rx_wait,
-                               MEI_READ_COMPLETE == cl->reading_state ||
-                               mei_cl_is_transitioning(cl))) {
+                               (!list_empty(&cl->rd_completed)) ||
+                               (!mei_cl_is_connected(cl)))) {
  
                        if (signal_pending(current))
                                return -EINTR;
                }
  
                mutex_lock(&dev->device_lock);
-               if (mei_cl_is_transitioning(cl)) {
+               if (!mei_cl_is_connected(cl)) {
                        rets = -EBUSY;
                        goto out;
                }
        }
  
-       cb = cl->read_cb;
+       cb = mei_cl_read_cb(cl, file);
        if (!cb) {
-               rets = -ENODEV;
-               goto out;
-       }
-       if (cl->reading_state != MEI_READ_COMPLETE) {
                rets = 0;
                goto out;
        }
-       /* now copy the data to user space */
  copy_buffer:
+       /* now copy the data to user space */
+       if (cb->status) {
+               rets = cb->status;
+               dev_dbg(dev->dev, "read operation failed %d\n", rets);
+               goto free;
+       }
        dev_dbg(dev->dev, "buf.size = %d buf.idx= %ld\n",
-           cb->response_buffer.size, cb->buf_idx);
+           cb->buf.size, cb->buf_idx);
        if (length == 0 || ubuf == NULL || *offset > cb->buf_idx) {
                rets = -EMSGSIZE;
                goto free;
         * however buf_idx may point beyond that */
        length = min_t(size_t, length, cb->buf_idx - *offset);
  
-       if (copy_to_user(ubuf, cb->response_buffer.data + *offset, length)) {
+       if (copy_to_user(ubuf, cb->buf.data + *offset, length)) {
                dev_dbg(dev->dev, "failed to copy data to userland\n");
                rets = -EFAULT;
                goto free;
                goto out;
  
  free:
-       cb_pos = mei_cl_find_read_cb(cl);
-       /* Remove entry from read list */
-       if (cb_pos)
-               list_del(&cb_pos->list);
        mei_io_cb_free(cb);
-       cl->reading_state = MEI_IDLE;
-       cl->read_cb = NULL;
  out:
        dev_dbg(dev->dev, "end mei read rets= %d\n", rets);
        mutex_unlock(&dev->device_lock);
@@@ -336,9 -309,8 +308,8 @@@ static ssize_t mei_write(struct file *f
                goto out;
        }
  
-       if (cl->state != MEI_FILE_CONNECTED) {
-               dev_err(dev->dev, "host client = %d,  is not connected to ME client = %d",
-                       cl->host_client_id, cl->me_client_id);
+       if (!mei_cl_is_connected(cl)) {
+               cl_err(dev, cl, "is not connected");
                rets = -ENODEV;
                goto out;
        }
                        timeout = write_cb->read_time +
                                mei_secs_to_jiffies(MEI_IAMTHIF_READ_TIMER);
  
-                       if (time_after(jiffies, timeout) ||
-                           cl->reading_state == MEI_READ_COMPLETE) {
+                       if (time_after(jiffies, timeout)) {
                                *offset = 0;
-                               list_del(&write_cb->list);
                                mei_io_cb_free(write_cb);
                                write_cb = NULL;
                        }
                }
        }
  
-       /* free entry used in read */
-       if (cl->reading_state == MEI_READ_COMPLETE) {
-               *offset = 0;
-               write_cb = mei_cl_find_read_cb(cl);
-               if (write_cb) {
-                       list_del(&write_cb->list);
-                       mei_io_cb_free(write_cb);
-                       write_cb = NULL;
-                       cl->reading_state = MEI_IDLE;
-                       cl->read_cb = NULL;
-               }
-       } else if (cl->reading_state == MEI_IDLE)
-               *offset = 0;
-       write_cb = mei_io_cb_init(cl, file);
+       *offset = 0;
+       write_cb = mei_cl_alloc_cb(cl, length, MEI_FOP_WRITE, file);
        if (!write_cb) {
                rets = -ENOMEM;
                goto out;
        }
-       rets = mei_io_cb_alloc_req_buf(write_cb, length);
-       if (rets)
-               goto out;
  
-       rets = copy_from_user(write_cb->request_buffer.data, ubuf, length);
+       rets = copy_from_user(write_cb->buf.data, ubuf, length);
        if (rets) {
                dev_dbg(dev->dev, "failed to copy data from userland\n");
                rets = -EFAULT;
        }
  
        if (cl == &dev->iamthif_cl) {
-               rets = mei_amthif_write(dev, write_cb);
+               rets = mei_amthif_write(cl, write_cb);
  
                if (rets) {
                        dev_err(dev->dev,
@@@ -464,7 -417,7 +416,7 @@@ static int mei_ioctl_connect_client(str
         */
        if (uuid_le_cmp(data->in_client_uuid, mei_amthif_guid) == 0) {
                dev_dbg(dev->dev, "FW Client is amthi\n");
-               if (dev->iamthif_cl.state != MEI_FILE_CONNECTED) {
+               if (!mei_cl_is_connected(&dev->iamthif_cl)) {
                        rets = -ENODEV;
                        goto end;
                }
@@@ -588,6 -541,7 +540,7 @@@ static long mei_compat_ioctl(struct fil
   */
  static unsigned int mei_poll(struct file *file, poll_table *wait)
  {
+       unsigned long req_events = poll_requested_events(wait);
        struct mei_cl *cl = file->private_data;
        struct mei_device *dev;
        unsigned int mask = 0;
  
        mutex_lock(&dev->device_lock);
  
-       if (!mei_cl_is_connected(cl)) {
+       if (dev->dev_state != MEI_DEV_ENABLED ||
+           !mei_cl_is_connected(cl)) {
                mask = POLLERR;
                goto out;
        }
  
-       mutex_unlock(&dev->device_lock);
-       if (cl == &dev->iamthif_cl)
-               return mei_amthif_poll(dev, file, wait);
-       poll_wait(file, &cl->tx_wait, wait);
-       mutex_lock(&dev->device_lock);
-       if (!mei_cl_is_connected(cl)) {
-               mask = POLLERR;
+       if (cl == &dev->iamthif_cl) {
+               mask = mei_amthif_poll(dev, file, wait);
                goto out;
        }
  
-       mask |= (POLLIN | POLLRDNORM);
+       if (req_events & (POLLIN | POLLRDNORM)) {
+               poll_wait(file, &cl->rx_wait, wait);
+               if (!list_empty(&cl->rd_completed))
+                       mask |= POLLIN | POLLRDNORM;
+               else
+                       mei_cl_read_start(cl, 0, file);
+       }
  
  out:
        mutex_unlock(&dev->device_lock);
index af44ee26075d8b520401a2cc52150b74d45157f0,72fb381a1245235c27ad6a7ff05ce6848b934aa4..23f71f5ce4fb07be4bb9c32021bf3babef6b938d
@@@ -21,6 -21,7 +21,6 @@@
  #include <linux/errno.h>
  #include <linux/types.h>
  #include <linux/fcntl.h>
 -#include <linux/aio.h>
  #include <linux/pci.h>
  #include <linux/poll.h>
  #include <linux/ioctl.h>
@@@ -388,7 -389,7 +388,7 @@@ static int mei_me_pm_runtime_suspend(st
        mutex_lock(&dev->device_lock);
  
        if (mei_write_is_idle(dev))
-               ret = mei_me_pg_set_sync(dev);
+               ret = mei_me_pg_enter_sync(dev);
        else
                ret = -EAGAIN;
  
@@@ -413,7 -414,7 +413,7 @@@ static int mei_me_pm_runtime_resume(str
  
        mutex_lock(&dev->device_lock);
  
-       ret = mei_me_pg_unset_sync(dev);
+       ret = mei_me_pg_exit_sync(dev);
  
        mutex_unlock(&dev->device_lock);
  
index f97010576f56181be46683434b27d1095c855409,4863548faff7063d603693925538afabda8e684e..16a498f48169a186d45ccd74366873e3d6878ffe
@@@ -24,7 -24,6 +24,7 @@@ enum arizona_type 
        WM5102 = 1,
        WM5110 = 2,
        WM8997 = 3,
 +      WM8280 = 4,
  };
  
  #define ARIZONA_IRQ_GP1                    0
@@@ -127,7 -126,7 +127,7 @@@ struct arizona 
        struct regmap_irq_chip_data *aod_irq_chip;
        struct regmap_irq_chip_data *irq_chip;
  
-       bool hpdet_magic;
+       bool hpdet_clamp;
        unsigned int hp_ena;
  
        struct mutex clk_lock;
index 25d942d1da27095e6366d720a0f8de58009cb5f3,888ecc114ddc9fe480f95986807d716851b19498..11dc22a6983b55da3c2c356cb375fa27dbad0ed8
@@@ -94,76 -94,25 +94,76 @@@ u64 clockevent_delta2ns(unsigned long l
  }
  EXPORT_SYMBOL_GPL(clockevent_delta2ns);
  
 +static int __clockevents_set_state(struct clock_event_device *dev,
 +                                 enum clock_event_state state)
 +{
 +      /* Transition with legacy set_mode() callback */
 +      if (dev->set_mode) {
 +              /* Legacy callback doesn't support new modes */
 +              if (state > CLOCK_EVT_STATE_ONESHOT)
 +                      return -ENOSYS;
 +              /*
 +               * 'clock_event_state' and 'clock_event_mode' have 1-to-1
 +               * mapping until *_ONESHOT, and so a simple cast will work.
 +               */
 +              dev->set_mode((enum clock_event_mode)state, dev);
 +              dev->mode = (enum clock_event_mode)state;
 +              return 0;
 +      }
 +
 +      if (dev->features & CLOCK_EVT_FEAT_DUMMY)
 +              return 0;
 +
 +      /* Transition with new state-specific callbacks */
 +      switch (state) {
 +      case CLOCK_EVT_STATE_DETACHED:
 +              /*
 +               * This is an internal state, which is guaranteed to go from
 +               * SHUTDOWN to DETACHED. No driver interaction required.
 +               */
 +              return 0;
 +
 +      case CLOCK_EVT_STATE_SHUTDOWN:
 +              return dev->set_state_shutdown(dev);
 +
 +      case CLOCK_EVT_STATE_PERIODIC:
 +              /* Core internal bug */
 +              if (!(dev->features & CLOCK_EVT_FEAT_PERIODIC))
 +                      return -ENOSYS;
 +              return dev->set_state_periodic(dev);
 +
 +      case CLOCK_EVT_STATE_ONESHOT:
 +              /* Core internal bug */
 +              if (!(dev->features & CLOCK_EVT_FEAT_ONESHOT))
 +                      return -ENOSYS;
 +              return dev->set_state_oneshot(dev);
 +
 +      default:
 +              return -ENOSYS;
 +      }
 +}
 +
  /**
 - * clockevents_set_mode - set the operating mode of a clock event device
 + * clockevents_set_state - set the operating state of a clock event device
   * @dev:      device to modify
 - * @mode:     new mode
 + * @state:    new state
   *
   * Must be called with interrupts disabled !
   */
 -void clockevents_set_mode(struct clock_event_device *dev,
 -                               enum clock_event_mode mode)
 +void clockevents_set_state(struct clock_event_device *dev,
 +                         enum clock_event_state state)
  {
 -      if (dev->mode != mode) {
 -              dev->set_mode(mode, dev);
 -              dev->mode = mode;
 +      if (dev->state != state) {
 +              if (__clockevents_set_state(dev, state))
 +                      return;
 +
 +              dev->state = state;
  
                /*
                 * A nsec2cyc multiplicator of 0 is invalid and we'd crash
                 * on it, so fix it up and emit a warning:
                 */
 -              if (mode == CLOCK_EVT_MODE_ONESHOT) {
 +              if (state == CLOCK_EVT_STATE_ONESHOT) {
                        if (unlikely(!dev->mult)) {
                                dev->mult = 1;
                                WARN_ON(1);
   */
  void clockevents_shutdown(struct clock_event_device *dev)
  {
 -      clockevents_set_mode(dev, CLOCK_EVT_MODE_SHUTDOWN);
 +      clockevents_set_state(dev, CLOCK_EVT_STATE_SHUTDOWN);
        dev->next_event.tv64 = KTIME_MAX;
  }
  
 +/**
 + * clockevents_tick_resume -  Resume the tick device before using it again
 + * @dev:                      device to resume
 + */
 +int clockevents_tick_resume(struct clock_event_device *dev)
 +{
 +      int ret = 0;
 +
 +      if (dev->set_mode) {
 +              dev->set_mode(CLOCK_EVT_MODE_RESUME, dev);
 +              dev->mode = CLOCK_EVT_MODE_RESUME;
 +      } else if (dev->tick_resume) {
 +              ret = dev->tick_resume(dev);
 +      }
 +
 +      return ret;
 +}
 +
  #ifdef CONFIG_GENERIC_CLOCKEVENTS_MIN_ADJUST
  
  /* Limit min_delta to a jiffie */
@@@ -252,7 -183,7 +252,7 @@@ static int clockevents_program_min_delt
                delta = dev->min_delta_ns;
                dev->next_event = ktime_add_ns(ktime_get(), delta);
  
 -              if (dev->mode == CLOCK_EVT_MODE_SHUTDOWN)
 +              if (dev->state == CLOCK_EVT_STATE_SHUTDOWN)
                        return 0;
  
                dev->retries++;
@@@ -289,7 -220,7 +289,7 @@@ static int clockevents_program_min_delt
        delta = dev->min_delta_ns;
        dev->next_event = ktime_add_ns(ktime_get(), delta);
  
 -      if (dev->mode == CLOCK_EVT_MODE_SHUTDOWN)
 +      if (dev->state == CLOCK_EVT_STATE_SHUTDOWN)
                return 0;
  
        dev->retries++;
@@@ -321,7 -252,7 +321,7 @@@ int clockevents_program_event(struct cl
  
        dev->next_event = expires;
  
 -      if (dev->mode == CLOCK_EVT_MODE_SHUTDOWN)
 +      if (dev->state == CLOCK_EVT_STATE_SHUTDOWN)
                return 0;
  
        /* Shortcut for clockevent devices that can deal with ktime. */
@@@ -366,7 -297,7 +366,7 @@@ static int clockevents_replace(struct c
        struct clock_event_device *dev, *newdev = NULL;
  
        list_for_each_entry(dev, &clockevent_devices, list) {
 -              if (dev == ced || dev->mode != CLOCK_EVT_MODE_UNUSED)
 +              if (dev == ced || dev->state != CLOCK_EVT_STATE_DETACHED)
                        continue;
  
                if (!tick_check_replacement(newdev, dev))
  static int __clockevents_try_unbind(struct clock_event_device *ced, int cpu)
  {
        /* Fast track. Device is unused */
 -      if (ced->mode == CLOCK_EVT_MODE_UNUSED) {
 +      if (ced->state == CLOCK_EVT_STATE_DETACHED) {
                list_del_init(&ced->list);
                return 0;
        }
@@@ -440,39 -371,8 +440,39 @@@ int clockevents_unbind_device(struct cl
        mutex_unlock(&clockevents_mutex);
        return ret;
  }
- EXPORT_SYMBOL_GPL(clockevents_unbind);
+ EXPORT_SYMBOL_GPL(clockevents_unbind_device);
  
 +/* Sanity check of state transition callbacks */
 +static int clockevents_sanity_check(struct clock_event_device *dev)
 +{
 +      /* Legacy set_mode() callback */
 +      if (dev->set_mode) {
 +              /* We shouldn't be supporting new modes now */
 +              WARN_ON(dev->set_state_periodic || dev->set_state_oneshot ||
 +                      dev->set_state_shutdown || dev->tick_resume);
 +
 +              BUG_ON(dev->mode != CLOCK_EVT_MODE_UNUSED);
 +              return 0;
 +      }
 +
 +      if (dev->features & CLOCK_EVT_FEAT_DUMMY)
 +              return 0;
 +
 +      /* New state-specific callbacks */
 +      if (!dev->set_state_shutdown)
 +              return -EINVAL;
 +
 +      if ((dev->features & CLOCK_EVT_FEAT_PERIODIC) &&
 +          !dev->set_state_periodic)
 +              return -EINVAL;
 +
 +      if ((dev->features & CLOCK_EVT_FEAT_ONESHOT) &&
 +          !dev->set_state_oneshot)
 +              return -EINVAL;
 +
 +      return 0;
 +}
 +
  /**
   * clockevents_register_device - register a clock event device
   * @dev:      device to register
@@@ -481,11 -381,7 +481,11 @@@ void clockevents_register_device(struc
  {
        unsigned long flags;
  
 -      BUG_ON(dev->mode != CLOCK_EVT_MODE_UNUSED);
 +      BUG_ON(clockevents_sanity_check(dev));
 +
 +      /* Initialize state to DETACHED */
 +      dev->state = CLOCK_EVT_STATE_DETACHED;
 +
        if (!dev->cpumask) {
                WARN_ON(num_possible_cpus() > 1);
                dev->cpumask = cpumask_of(smp_processor_id());
@@@ -549,11 -445,11 +549,11 @@@ int __clockevents_update_freq(struct cl
  {
        clockevents_config(dev, freq);
  
 -      if (dev->mode == CLOCK_EVT_MODE_ONESHOT)
 +      if (dev->state == CLOCK_EVT_STATE_ONESHOT)
                return clockevents_program_event(dev, dev->next_event, false);
  
 -      if (dev->mode == CLOCK_EVT_MODE_PERIODIC)
 -              dev->set_mode(CLOCK_EVT_MODE_PERIODIC, dev);
 +      if (dev->state == CLOCK_EVT_STATE_PERIODIC)
 +              return __clockevents_set_state(dev, CLOCK_EVT_STATE_PERIODIC);
  
        return 0;
  }
@@@ -595,27 -491,30 +595,27 @@@ void clockevents_handle_noop(struct clo
   * @old:      device to release (can be NULL)
   * @new:      device to request (can be NULL)
   *
 - * Called from the notifier chain. clockevents_lock is held already
 + * Called from various tick functions with clockevents_lock held and
 + * interrupts disabled.
   */
  void clockevents_exchange_device(struct clock_event_device *old,
                                 struct clock_event_device *new)
  {
 -      unsigned long flags;
 -
 -      local_irq_save(flags);
        /*
         * Caller releases a clock event device. We queue it into the
         * released list and do a notify add later.
         */
        if (old) {
                module_put(old->owner);
 -              clockevents_set_mode(old, CLOCK_EVT_MODE_UNUSED);
 +              clockevents_set_state(old, CLOCK_EVT_STATE_DETACHED);
                list_del(&old->list);
                list_add(&old->list, &clockevents_released);
        }
  
        if (new) {
 -              BUG_ON(new->mode != CLOCK_EVT_MODE_UNUSED);
 +              BUG_ON(new->state != CLOCK_EVT_STATE_DETACHED);
                clockevents_shutdown(new);
        }
 -      local_irq_restore(flags);
  }
  
  /**
@@@ -642,40 -541,74 +642,40 @@@ void clockevents_resume(void
                        dev->resume(dev);
  }
  
 -#ifdef CONFIG_GENERIC_CLOCKEVENTS
 +#ifdef CONFIG_HOTPLUG_CPU
  /**
 - * clockevents_notify - notification about relevant events
 - * Returns 0 on success, any other value on error
 + * tick_cleanup_dead_cpu - Cleanup the tick and clockevents of a dead cpu
   */
 -int clockevents_notify(unsigned long reason, void *arg)
 +void tick_cleanup_dead_cpu(int cpu)
  {
        struct clock_event_device *dev, *tmp;
        unsigned long flags;
 -      int cpu, ret = 0;
  
        raw_spin_lock_irqsave(&clockevents_lock, flags);
  
 -      switch (reason) {
 -      case CLOCK_EVT_NOTIFY_BROADCAST_ON:
 -      case CLOCK_EVT_NOTIFY_BROADCAST_OFF:
 -      case CLOCK_EVT_NOTIFY_BROADCAST_FORCE:
 -              tick_broadcast_on_off(reason, arg);
 -              break;
 -
 -      case CLOCK_EVT_NOTIFY_BROADCAST_ENTER:
 -      case CLOCK_EVT_NOTIFY_BROADCAST_EXIT:
 -              ret = tick_broadcast_oneshot_control(reason);
 -              break;
 -
 -      case CLOCK_EVT_NOTIFY_CPU_DYING:
 -              tick_handover_do_timer(arg);
 -              break;
 -
 -      case CLOCK_EVT_NOTIFY_SUSPEND:
 -              tick_suspend();
 -              tick_suspend_broadcast();
 -              break;
 -
 -      case CLOCK_EVT_NOTIFY_RESUME:
 -              tick_resume();
 -              break;
 -
 -      case CLOCK_EVT_NOTIFY_CPU_DEAD:
 -              tick_shutdown_broadcast_oneshot(arg);
 -              tick_shutdown_broadcast(arg);
 -              tick_shutdown(arg);
 -              /*
 -               * Unregister the clock event devices which were
 -               * released from the users in the notify chain.
 -               */
 -              list_for_each_entry_safe(dev, tmp, &clockevents_released, list)
 +      tick_shutdown_broadcast_oneshot(cpu);
 +      tick_shutdown_broadcast(cpu);
 +      tick_shutdown(cpu);
 +      /*
 +       * Unregister the clock event devices which were
 +       * released from the users in the notify chain.
 +       */
 +      list_for_each_entry_safe(dev, tmp, &clockevents_released, list)
 +              list_del(&dev->list);
 +      /*
 +       * Now check whether the CPU has left unused per cpu devices
 +       */
 +      list_for_each_entry_safe(dev, tmp, &clockevent_devices, list) {
 +              if (cpumask_test_cpu(cpu, dev->cpumask) &&
 +                  cpumask_weight(dev->cpumask) == 1 &&
 +                  !tick_is_broadcast_device(dev)) {
 +                      BUG_ON(dev->state != CLOCK_EVT_STATE_DETACHED);
                        list_del(&dev->list);
 -              /*
 -               * Now check whether the CPU has left unused per cpu devices
 -               */
 -              cpu = *((int *)arg);
 -              list_for_each_entry_safe(dev, tmp, &clockevent_devices, list) {
 -                      if (cpumask_test_cpu(cpu, dev->cpumask) &&
 -                          cpumask_weight(dev->cpumask) == 1 &&
 -                          !tick_is_broadcast_device(dev)) {
 -                              BUG_ON(dev->mode != CLOCK_EVT_MODE_UNUSED);
 -                              list_del(&dev->list);
 -                      }
                }
 -              break;
 -      default:
 -              break;
        }
        raw_spin_unlock_irqrestore(&clockevents_lock, flags);
 -      return ret;
  }
 -EXPORT_SYMBOL_GPL(clockevents_notify);
 +#endif
  
  #ifdef CONFIG_SYSFS
  struct bus_type clockevents_subsys = {
@@@ -794,3 -727,5 +794,3 @@@ static int __init clockevents_init_sysf
  }
  device_initcall(clockevents_init_sysfs);
  #endif /* SYSFS */
 -
 -#endif /* GENERIC_CLOCK_EVENTS */
index 57da0ceda03fa7eb0f4ce384ae040703a7c99f5c,fb58c7ee37801d2cc6224afb8d39cc3860ad1f6b..eff4b4d512b7b8fbd8bfa31c3c0ee3a79474a478
@@@ -19,6 -19,7 +19,6 @@@
  #include <sound/tlv.h>
  
  #include <linux/mfd/arizona/core.h>
 -#include <linux/mfd/arizona/gpio.h>
  #include <linux/mfd/arizona/registers.h>
  
  #include "arizona.h"
@@@ -280,7 -281,6 +280,7 @@@ int arizona_init_gpio(struct snd_soc_co
  
        switch (arizona->type) {
        case WM5110:
 +      case WM8280:
                snd_soc_dapm_disable_pin(&codec->dapm, "DRC2 Signal Activity");
                break;
        default:
@@@ -840,8 -840,8 +840,8 @@@ int arizona_hp_ev(struct snd_soc_dapm_w
        priv->arizona->hp_ena &= ~mask;
        priv->arizona->hp_ena |= val;
  
-       /* Force off if HPDET magic is active */
-       if (priv->arizona->hpdet_magic)
+       /* Force off if HPDET clamp is active */
+       if (priv->arizona->hpdet_clamp)
                val = 0;
  
        regmap_update_bits_async(arizona->regmap, ARIZONA_OUTPUT_ENABLES_1,
@@@ -1729,7 -1729,6 +1729,7 @@@ static int arizona_calc_fratio(struct a
  
        switch (fll->arizona->type) {
        case WM5110:
 +      case WM8280:
                if (fll->arizona->rev < 3 || sync)
                        return init_ratio;
                break;
@@@ -1902,7 -1901,7 +1902,7 @@@ static int arizona_is_enabled_fll(struc
  static int arizona_enable_fll(struct arizona_fll *fll)
  {
        struct arizona *arizona = fll->arizona;
 -      int ret;
 +      unsigned long time_left;
        bool use_sync = false;
        int already_enabled = arizona_is_enabled_fll(fll);
        struct arizona_fll_cfg cfg;
                regmap_update_bits_async(arizona->regmap, fll->base + 1,
                                         ARIZONA_FLL1_FREERUN, 0);
  
 -      ret = wait_for_completion_timeout(&fll->ok,
 +      time_left = wait_for_completion_timeout(&fll->ok,
                                          msecs_to_jiffies(250));
 -      if (ret == 0)
 +      if (time_left == 0)
                arizona_fll_warn(fll, "Timed out waiting for lock\n");
  
        return 0;