Merge tag 'char-misc-4.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 21 Apr 2015 16:42:58 +0000 (09:42 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 21 Apr 2015 16:42:58 +0000 (09:42 -0700)
Pull char/misc driver updates from Greg KH:
 "Here's the big char/misc driver patchset for 4.1-rc1.

  Lots of different driver subsystem updates here, nothing major, full
  details are in the shortlog.

  All of this has been in linux-next for a while"

* tag 'char-misc-4.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (133 commits)
  mei: trace: remove unused TRACE_SYSTEM_STRING
  DTS: ARM: OMAP3-N900: Add lis3lv02d support
  Documentation: DT: lis302: update wakeup binding
  lis3lv02d: DT: add wakeup unit 2 and wakeup threshold
  lis3lv02d: DT: use s32 to support negative values
  Drivers: hv: hv_balloon: correctly handle num_pages>INT_MAX case
  Drivers: hv: hv_balloon: correctly handle val.freeram<num_pages case
  mei: replace check for connection instead of transitioning
  mei: use mei_cl_is_connected consistently
  mei: fix mei_poll operation
  hv_vmbus: Add gradually increased delay for retries in vmbus_post_msg()
  Drivers: hv: hv_balloon: survive ballooning request with num_pages=0
  Drivers: hv: hv_balloon: eliminate jumps in piecewiese linear floor function
  Drivers: hv: hv_balloon: do not online pages in offline blocks
  hv: remove the per-channel workqueue
  hv: don't schedule new works in vmbus_onoffer()/vmbus_onoffer_rescind()
  hv: run non-blocking message handlers in the dispatch tasklet
  coresight: moving to new "hwtracing" directory
  coresight-tmc: Adding a status interface to sysfs
  coresight: remove the unnecessary configuration coresight-default-sink
  ...

13 files changed:
1  2 
Documentation/driver-model/devres.txt
MAINTAINERS
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/io.h
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 3264719740f56f30a680be3d09e71755597a403f,e9e12d75546a3f0b9be0f950738e3fea6fe02e10..d4aaab5ea13994cc2da6b77fde837f14b3af2609
@@@ -569,12 -569,6 +569,12 @@@ L:       nios2-dev@lists.rocketboards.org (mo
  S:    Maintained
  F:    drivers/mailbox/mailbox-altera.c
  
 +ALTERA PIO DRIVER
 +M:    Tien Hock Loh <thloh@altera.com>
 +L:    linux-gpio@vger.kernel.org
 +S:    Maintained
 +F:    drivers/gpio/gpio-altera.c
 +
  ALTERA TRIPLE SPEED ETHERNET DRIVER
  M:    Vince Bridgers <vbridger@opensource.altera.com>
  L:    netdev@vger.kernel.org
@@@ -631,19 -625,20 +631,19 @@@ F:      drivers/iommu/amd_iommu*.[ch
  F:    include/linux/amd-iommu.h
  
  AMD KFD
 -M:      Oded Gabbay <oded.gabbay@amd.com>
 -L:      dri-devel@lists.freedesktop.org
 -T:      git git://people.freedesktop.org/~gabbayo/linux.git
 -S:      Supported
 -F:      drivers/gpu/drm/amd/amdkfd/
 +M:    Oded Gabbay <oded.gabbay@amd.com>
 +L:    dri-devel@lists.freedesktop.org
 +T:    git git://people.freedesktop.org/~gabbayo/linux.git
 +S:    Supported
 +F:    drivers/gpu/drm/amd/amdkfd/
  F:    drivers/gpu/drm/amd/include/cik_structs.h
  F:    drivers/gpu/drm/amd/include/kgd_kfd_interface.h
 -F:      drivers/gpu/drm/radeon/radeon_kfd.c
 -F:      drivers/gpu/drm/radeon/radeon_kfd.h
 -F:      include/uapi/linux/kfd_ioctl.h
 +F:    drivers/gpu/drm/radeon/radeon_kfd.c
 +F:    drivers/gpu/drm/radeon/radeon_kfd.h
 +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*
  
@@@ -730,7 -725,7 +730,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
@@@ -958,7 -953,7 +958,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-*
@@@ -1191,7 -1186,7 +1191,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>
@@@ -1221,7 -1216,6 +1221,7 @@@ F:      arch/arm/mach-orion5x/ts78xx-
  ARM/Mediatek SoC support
  M:    Matthias Brugger <matthias.bgg@gmail.com>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 +L:    linux-mediatek@lists.infradead.org (moderated for non-subscribers)
  S:    Maintained
  F:    arch/arm/boot/dts/mt6*
  F:    arch/arm/boot/dts/mt8*
@@@ -1368,7 -1362,6 +1368,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>
@@@ -1475,8 -1468,6 +1475,8 @@@ F:      drivers/clocksource/arm_global_timer
  F:    drivers/i2c/busses/i2c-st.c
  F:    drivers/media/rc/st_rc.c
  F:    drivers/mmc/host/sdhci-st.c
 +F:    drivers/phy/phy-miphy28lp.c
 +F:    drivers/phy/phy-miphy365x.c
  F:    drivers/phy/phy-stih407-usb.c
  F:    drivers/phy/phy-stih41x-usb.c
  F:    drivers/pinctrl/pinctrl-st.c
@@@ -1684,8 -1675,8 +1684,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/
@@@ -1771,7 -1762,7 +1771,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
@@@ -1828,7 -1819,7 +1828,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
@@@ -1922,14 -1913,16 +1922,14 @@@ S:   Maintaine
  F:    drivers/media/radio/radio-aztech*
  
  B43 WIRELESS DRIVER
 -M:    Stefano Brivio <stefano.brivio@polimi.it>
  L:    linux-wireless@vger.kernel.org
  L:    b43-dev@lists.infradead.org
  W:    http://wireless.kernel.org/en/users/Drivers/b43
 -S:    Maintained
 +S:    Odd Fixes
  F:    drivers/net/wireless/b43/
  
  B43LEGACY WIRELESS DRIVER
  M:    Larry Finger <Larry.Finger@lwfinger.net>
 -M:    Stefano Brivio <stefano.brivio@polimi.it>
  L:    linux-wireless@vger.kernel.org
  L:    b43-dev@lists.infradead.org
  W:    http://wireless.kernel.org/en/users/Drivers/b43
@@@ -1972,10 -1965,10 +1972,10 @@@ F:   Documentation/filesystems/befs.tx
  F:    fs/befs/
  
  BECKHOFF CX5020 ETHERCAT MASTER DRIVER
 -M: Dariusz Marcinkiewicz <reksio@newterm.pl>
 -L: netdev@vger.kernel.org
 -S: Maintained
 -F: drivers/net/ethernet/ec_bhf.c
 +M:    Dariusz Marcinkiewicz <reksio@newterm.pl>
 +L:    netdev@vger.kernel.org
 +S:    Maintained
 +F:    drivers/net/ethernet/ec_bhf.c
  
  BFS FILE SYSTEM
  M:    "Tigran A. Aivazian" <tigran@aivazian.fsnet.co.uk>
@@@ -2525,18 -2518,11 +2525,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
@@@ -2577,7 -2563,6 +2577,7 @@@ F:      include/linux/cleancache.
  
  CLK API
  M:    Russell King <linux@arm.linux.org.uk>
 +L:    linux-clk@vger.kernel.org
  S:    Maintained
  F:    include/linux/clk.h
  
@@@ -2638,7 -2623,7 +2638,7 @@@ F:      drivers/media/platform/coda
  COMMON CLK FRAMEWORK
  M:    Mike Turquette <mturquette@linaro.org>
  M:    Stephen Boyd <sboyd@codeaurora.org>
 -L:    linux-kernel@vger.kernel.org
 +L:    linux-clk@vger.kernel.org
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git
  S:    Maintained
  F:    drivers/clk/
@@@ -2831,7 -2816,6 +2831,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/
@@@ -2902,11 -2886,11 +2902,11 @@@ S:   Supporte
  F:    drivers/net/ethernet/chelsio/cxgb3/
  
  CXGB3 ISCSI DRIVER (CXGB3I)
 -M:      Karen Xie <kxie@chelsio.com>
 -L:      linux-scsi@vger.kernel.org
 -W:      http://www.chelsio.com
 -S:      Supported
 -F:      drivers/scsi/cxgbi/cxgb3i
 +M:    Karen Xie <kxie@chelsio.com>
 +L:    linux-scsi@vger.kernel.org
 +W:    http://www.chelsio.com
 +S:    Supported
 +F:    drivers/scsi/cxgbi/cxgb3i
  
  CXGB3 IWARP RNIC DRIVER (IW_CXGB3)
  M:    Steve Wise <swise@chelsio.com>
@@@ -2923,11 -2907,11 +2923,11 @@@ S:   Supporte
  F:    drivers/net/ethernet/chelsio/cxgb4/
  
  CXGB4 ISCSI DRIVER (CXGB4I)
 -M:      Karen Xie <kxie@chelsio.com>
 -L:      linux-scsi@vger.kernel.org
 -W:      http://www.chelsio.com
 -S:      Supported
 -F:      drivers/scsi/cxgbi/cxgb4i
 +M:    Karen Xie <kxie@chelsio.com>
 +L:    linux-scsi@vger.kernel.org
 +W:    http://www.chelsio.com
 +S:    Supported
 +F:    drivers/scsi/cxgbi/cxgb4i
  
  CXGB4 IWARP RNIC DRIVER (IW_CXGB4)
  M:    Steve Wise <swise@chelsio.com>
@@@ -3153,15 -3137,12 +3153,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
@@@ -3171,7 -3152,6 +3171,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]
  
@@@ -3272,13 -3252,6 +3272,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
@@@ -3292,9 -3265,7 +3292,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
@@@ -3418,6 -3389,7 +3418,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
@@@ -4184,12 -4156,6 +4184,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
@@@ -4339,15 -4305,6 +4339,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
@@@ -4361,10 -4318,10 +4361,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/
@@@ -4984,7 -4941,6 +4984,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>
@@@ -5131,7 -5087,7 +5131,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*
@@@ -5172,21 -5128,22 +5172,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
@@@ -5230,7 -5187,7 +5230,7 @@@ F:      arch/x86/kernel/tboot.
  INTEL WIRELESS WIMAX CONNECTION 2400
  M:    Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
  M:    linux-wimax@intel.com
 -L:     wimax@linuxwimax.org (subscribers-only)
 +L:    wimax@linuxwimax.org (subscribers-only)
  S:    Supported
  W:    http://linuxwimax.org
  F:    Documentation/wimax/README.i2400m
@@@ -5308,13 -5265,6 +5308,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
@@@ -5635,8 -5585,6 +5635,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*
@@@ -5933,7 -5881,7 +5933,7 @@@ F:      arch/powerpc/platforms/512x
  F:    arch/powerpc/platforms/52xx/
  
  LINUX FOR POWERPC EMBEDDED PPC4XX
 -M:  Alistair Popple <alistair@popple.id.au>
 +M:    Alistair Popple <alistair@popple.id.au>
  M:    Matt Porter <mporter@kernel.crashing.org>
  W:    http://www.penguinppc.org/
  L:    linuxppc-dev@lists.ozlabs.org
@@@ -6368,7 -6316,6 +6368,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
@@@ -6406,7 -6353,7 +6406,7 @@@ S:      Supporte
  F:    drivers/watchdog/mena21_wdt.c
  
  MEN CHAMELEON BUS (mcb)
 -M:    Johannes Thumshirn <johannes.thumshirn@men.de>
 +M:    Johannes Thumshirn <johannes.thumshirn@men.de>
  S:    Supported
  F:    drivers/mcb/
  F:    include/linux/mcb.h
@@@ -6611,8 -6558,10 +6611,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/
@@@ -6988,13 -6937,6 +6988,13 @@@ S:    Supporte
  F:    drivers/block/nvme*
  F:    include/linux/nvme.h
  
 +NXP-NCI NFC DRIVER
 +M:    Clément Perrochaud <clement.perrochaud@effinnov.com>
 +R:    Charles Gorand <charles.gorand@effinnov.com>
 +L:    linux-nfc@lists.01.org (moderated for non-subscribers)
 +S:    Supported
 +F:    drivers/nfc/nxp-nci
 +
  NXP TDA998X DRM DRIVER
  M:    Russell King <rmk+kernel@arm.linux.org.uk>
  S:    Supported
@@@ -7245,15 -7187,6 +7245,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
@@@ -7971,10 -7904,10 +7971,10 @@@ L:   rtc-linux@googlegroups.co
  S:    Maintained
  
  QAT DRIVER
 -M:      Tadeusz Struk <tadeusz.struk@intel.com>
 -L:      qat-linux@intel.com
 -S:      Supported
 -F:      drivers/crypto/qat/
 +M:    Tadeusz Struk <tadeusz.struk@intel.com>
 +L:    qat-linux@intel.com
 +S:    Supported
 +F:    drivers/crypto/qat/
  
  QIB DRIVER
  M:    Mike Marciniszyn <infinipath@intel.com>
@@@ -8125,17 -8058,11 +8125,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
@@@ -8207,7 -8134,6 +8207,7 @@@ X:      kernel/torture.
  
  REAL TIME CLOCK (RTC) SUBSYSTEM
  M:    Alessandro Zummo <a.zummo@towertech.it>
 +M:    Alexandre Belloni <alexandre.belloni@free-electrons.com>
  L:    rtc-linux@googlegroups.com
  Q:    http://patchwork.ozlabs.org/project/rtc-linux/list/
  S:    Maintained
@@@ -8419,6 -8345,7 +8419,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/
@@@ -8626,7 -8553,6 +8626,7 @@@ F:      include/uapi/linux/timex.
  F:    kernel/time/clocksource.c
  F:    kernel/time/time*.c
  F:    kernel/time/ntp.c
 +F:    tools/testing/selftests/timers/
  
  SC1200 WDT DRIVER
  M:    Zwane Mwaikambo <zwanem@gmail.com>
@@@ -8678,9 -8604,11 +8678,9 @@@ F:     drivers/scsi/sg.
  F:    include/scsi/sg.h
  
  SCSI SUBSYSTEM
 -M:    "James E.J. Bottomley" <JBottomley@parallels.com>
 +M:    "James E.J. Bottomley" <JBottomley@odin.com>
  L:    linux-scsi@vger.kernel.org
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6.git
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6.git
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-pending-2.6.git
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git
  S:    Maintained
  F:    drivers/scsi/
  F:    include/scsi/
@@@ -8733,8 -8661,10 +8733,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]
  
@@@ -8750,12 -8680,18 +8750,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>
@@@ -9422,14 -9358,6 +9422,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>
@@@ -9892,7 -9820,7 +9892,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/
@@@ -9996,7 -9924,6 +9996,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
@@@ -10150,11 -10077,11 +10150,11 @@@ F:        include/linux/cdrom.
  F:    include/uapi/linux/cdrom.h
  
  UNISYS S-PAR DRIVERS
 -M:     Benjamin Romer <benjamin.romer@unisys.com>
 -M:     David Kershner <david.kershner@unisys.com>
 -L:     sparmaintainer@unisys.com (Unisys internal)
 -S:     Supported
 -F:     drivers/staging/unisys/
 +M:    Benjamin Romer <benjamin.romer@unisys.com>
 +M:    David Kershner <david.kershner@unisys.com>
 +L:    sparmaintainer@unisys.com (Unisys internal)
 +S:    Supported
 +F:    drivers/staging/unisys/
  
  UNIVERSAL FLASH STORAGE HOST CONTROLLER DRIVER
  M:    Vinayak Holikatti <vinholikatti@gmail.com>
@@@ -10202,12 -10129,6 +10202,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
@@@ -10288,7 -10209,7 +10288,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
@@@ -10711,7 -10632,7 +10711,7 @@@ F:   drivers/media/rc/winbond-cir.
  WIMAX STACK
  M:    Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
  M:    linux-wimax@intel.com
 -L:     wimax@linuxwimax.org (subscribers-only)
 +L:    wimax@linuxwimax.org (subscribers-only)
  S:    Supported
  W:    http://linuxwimax.org
  F:    Documentation/wimax/README.wimax
@@@ -11002,7 -10923,6 +11002,7 @@@ L:   linux-mm@kvack.or
  S:    Maintained
  F:    mm/zsmalloc.c
  F:    include/linux/zsmalloc.h
 +F:    Documentation/vm/zsmalloc.txt
  
  ZSWAP COMPRESSED SWAP CACHING
  M:    Seth Jennings <sjennings@variantweb.net>
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 518585c1ce94626b1142f83bd0697afef9c05438,e6a6da4ad2f75252440307b082b278e37aec3226..5e90a18afbafa23270aff3718a91f6c010524971
@@@ -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];
@@@ -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 0000000000000000000000000000000000000000,f3cc8e97a0f8e65ef7b7d4b3526661990c280dad..35e51ce93a5c6af546dcc655a63870b0a7326b81
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,200 +1,191 @@@
 -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;
 -}
 -
+ /* Copyright (c) 2012, The Linux Foundation. All rights reserved.
+  *
+  * This program is free software; you can redistribute it and/or modify
+  * it under the terms of the GNU General Public License version 2 and
+  * only version 2 as published by the Free Software Foundation.
+  *
+  * This program is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  * GNU General Public License for more details.
+  */
+ #include <linux/module.h>
+ #include <linux/types.h>
+ #include <linux/err.h>
+ #include <linux/slab.h>
+ #include <linux/clk.h>
+ #include <linux/of.h>
+ #include <linux/of_address.h>
+ #include <linux/of_graph.h>
+ #include <linux/of_platform.h>
+ #include <linux/platform_device.h>
+ #include <linux/amba/bus.h>
+ #include <linux/coresight.h>
+ #include <linux/cpumask.h>
+ #include <asm/smp_plat.h>
+ static int of_dev_node_match(struct device *dev, void *data)
+ {
+       return dev->of_node == data;
+ }
+ static struct device *
+ of_coresight_get_endpoint_device(struct device_node *endpoint)
+ {
+       struct device *dev = NULL;
+       /*
+        * If we have a non-configuable replicator, it will be found on the
+        * platform bus.
+        */
+       dev = bus_find_device(&platform_bus_type, NULL,
+                             endpoint, of_dev_node_match);
+       if (dev)
+               return dev;
+       /*
+        * We have a configurable component - circle through the AMBA bus
+        * looking for the device that matches the endpoint node.
+        */
+       return bus_find_device(&amba_bustype, NULL,
+                              endpoint, of_dev_node_match);
+ }
 -              ep = of_get_coresight_endpoint(node, ep);
+ static void of_coresight_get_ports(struct device_node *node,
+                                  int *nr_inport, int *nr_outport)
+ {
+       struct device_node *ep = NULL;
+       int in = 0, out = 0;
+       do {
 -                      ep = of_get_coresight_endpoint(node, ep);
++              ep = of_graph_get_next_endpoint(node, ep);
+               if (!ep)
+                       break;
+               if (of_property_read_bool(ep, "slave-mode"))
+                       in++;
+               else
+                       out++;
+       } while (ep);
+       *nr_inport = in;
+       *nr_outport = out;
+ }
+ static int of_coresight_alloc_memory(struct device *dev,
+                       struct coresight_platform_data *pdata)
+ {
+       /* List of output port on this component */
+       pdata->outports = devm_kzalloc(dev, pdata->nr_outport *
+                                      sizeof(*pdata->outports),
+                                      GFP_KERNEL);
+       if (!pdata->outports)
+               return -ENOMEM;
+       /* Children connected to this component via @outports */
+        pdata->child_names = devm_kzalloc(dev, pdata->nr_outport *
+                                         sizeof(*pdata->child_names),
+                                         GFP_KERNEL);
+       if (!pdata->child_names)
+               return -ENOMEM;
+       /* Port number on the child this component is connected to */
+       pdata->child_ports = devm_kzalloc(dev, pdata->nr_outport *
+                                         sizeof(*pdata->child_ports),
+                                         GFP_KERNEL);
+       if (!pdata->child_ports)
+               return -ENOMEM;
+       return 0;
+ }
+ struct coresight_platform_data *of_get_coresight_platform_data(
+                               struct device *dev, struct device_node *node)
+ {
+       int i = 0, ret = 0, cpu;
+       struct coresight_platform_data *pdata;
+       struct of_endpoint endpoint, rendpoint;
+       struct device *rdev;
+       struct device_node *dn;
+       struct device_node *ep = NULL;
+       struct device_node *rparent = NULL;
+       struct device_node *rport = NULL;
+       pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
+       if (!pdata)
+               return ERR_PTR(-ENOMEM);
+       /* Use device name as sysfs handle */
+       pdata->name = dev_name(dev);
+       /* Get the number of input and output port for this component */
+       of_coresight_get_ports(node, &pdata->nr_inport, &pdata->nr_outport);
+       if (pdata->nr_outport) {
+               ret = of_coresight_alloc_memory(dev, pdata);
+               if (ret)
+                       return ERR_PTR(ret);
+               /* Iterate through each port to discover topology */
+               do {
+                       /* Get a handle on a port */
++                      ep = of_graph_get_next_endpoint(node, ep);
+                       if (!ep)
+                               break;
+                       /*
+                        * No need to deal with input ports, processing for as
+                        * processing for output ports will deal with them.
+                        */
+                       if (of_find_property(ep, "slave-mode", NULL))
+                               continue;
+                       /* Get a handle on the local endpoint */
+                       ret = of_graph_parse_endpoint(ep, &endpoint);
+                       if (ret)
+                               continue;
+                       /* The local out port number */
+                       pdata->outports[i] = endpoint.id;
+                       /*
+                        * Get a handle on the remote port and parent
+                        * attached to it.
+                        */
+                       rparent = of_graph_get_remote_port_parent(ep);
+                       rport = of_graph_get_remote_port(ep);
+                       if (!rparent || !rport)
+                               continue;
+                       if (of_graph_parse_endpoint(rport, &rendpoint))
+                               continue;
+                       rdev = of_coresight_get_endpoint_device(rparent);
+                       if (!rdev)
+                               continue;
+                       pdata->child_names[i] = dev_name(rdev);
+                       pdata->child_ports[i] = rendpoint.id;
+                       i++;
+               } while (ep);
+       }
+       /* Affinity defaults to CPU0 */
+       pdata->cpu = 0;
+       dn = of_parse_phandle(node, "cpu", 0);
+       for (cpu = 0; dn && cpu < nr_cpu_ids; cpu++) {
+               if (dn == of_get_cpu_node(cpu, NULL)) {
+                       pdata->cpu = cpu;
+                       break;
+               }
+       }
+       return pdata;
+ }
+ EXPORT_SYMBOL_GPL(of_get_coresight_platform_data);
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);
  
diff --combined include/linux/io.h
index 4cc299c598e0309919fe7e70162efba6a2a355e3,42b33f03d1dfac0d823c942a133830801d138a32..986f2bffea1edc95513361a76fa55df5a3e06c06
@@@ -38,14 -38,6 +38,14 @@@ static inline int ioremap_page_range(un
  }
  #endif
  
 +#ifdef CONFIG_HAVE_ARCH_HUGE_VMAP
 +void __init ioremap_huge_init(void);
 +int arch_ioremap_pud_supported(void);
 +int arch_ioremap_pmd_supported(void);
 +#else
 +static inline void ioremap_huge_init(void) { }
 +#endif
 +
  /*
   * Managed iomap interface
   */
@@@ -72,6 -64,8 +72,8 @@@ void __iomem *devm_ioremap(struct devic
                           resource_size_t size);
  void __iomem *devm_ioremap_nocache(struct device *dev, resource_size_t offset,
                                   resource_size_t size);
+ void __iomem *devm_ioremap_wc(struct device *dev, resource_size_t offset,
+                                  resource_size_t size);
  void devm_iounmap(struct device *dev, void __iomem *addr);
  int check_signature(const volatile void __iomem *io_addr,
                        const unsigned char *signature, int length);
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;