Merge branch 'for-5.6' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie...
authorMark Brown <broonie@kernel.org>
Fri, 13 Mar 2020 18:52:23 +0000 (18:52 +0000)
committerMark Brown <broonie@kernel.org>
Fri, 13 Mar 2020 18:52:23 +0000 (18:52 +0000)
1  2 
MAINTAINERS
include/sound/soc.h
sound/soc/codecs/max98357a.c
sound/soc/codecs/rt5682.c
sound/soc/codecs/wm_adsp.c
sound/soc/intel/boards/skl_nau88l25_ssm4567.c
sound/soc/intel/skylake/skl.c
sound/soc/jz4740/jz4740-i2s.c
sound/soc/soc-core.c
sound/soc/soc-topology.c
sound/soc/sof/intel/hda-stream.c

diff --combined MAINTAINERS
@@@ -317,45 -317,45 +317,45 @@@ ACP
  M:    "Rafael J. Wysocki" <rjw@rjwysocki.net>
  M:    Len Brown <lenb@kernel.org>
  L:    linux-acpi@vger.kernel.org
 +S:    Supported
  W:    https://01.org/linux-acpi
 -Q:    https://patchwork.kernel.org/project/linux-acpi/list/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
 +Q:    https://patchwork.kernel.org/project/linux-acpi/list/
  B:    https://bugzilla.kernel.org
 -S:    Supported
 +F:    Documentation/ABI/testing/configfs-acpi
 +F:    Documentation/ABI/testing/sysfs-bus-acpi
 +F:    Documentation/firmware-guide/acpi/
  F:    drivers/acpi/
 +F:    drivers/pci/*/*acpi*
 +F:    drivers/pci/*acpi*
  F:    drivers/pnp/pnpacpi/
 +F:    include/acpi/
  F:    include/linux/acpi.h
  F:    include/linux/fwnode.h
 -F:    include/acpi/
 -F:    Documentation/firmware-guide/acpi/
 -F:    Documentation/ABI/testing/sysfs-bus-acpi
 -F:    Documentation/ABI/testing/configfs-acpi
 -F:    drivers/pci/*acpi*
 -F:    drivers/pci/*/*acpi*
  F:    tools/power/acpi/
  
  ACPI APEI
  M:    "Rafael J. Wysocki" <rjw@rjwysocki.net>
  M:    Len Brown <lenb@kernel.org>
 -L:    linux-acpi@vger.kernel.org
  R:    James Morse <james.morse@arm.com>
  R:    Tony Luck <tony.luck@intel.com>
  R:    Borislav Petkov <bp@alien8.de>
 +L:    linux-acpi@vger.kernel.org
  F:    drivers/acpi/apei/
  
  ACPI COMPONENT ARCHITECTURE (ACPICA)
  M:    Robert Moore <robert.moore@intel.com>
 -M:    Erik Schmauss <erik.schmauss@intel.com>
 +M:    Erik Kaneda <erik.kaneda@intel.com>
  M:    "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
  L:    linux-acpi@vger.kernel.org
  L:    devel@acpica.org
 +S:    Supported
  W:    https://acpica.org/
  W:    https://github.com/acpica/acpica/
 -Q:    https://patchwork.kernel.org/project/linux-acpi/list/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
 +Q:    https://patchwork.kernel.org/project/linux-acpi/list/
  B:    https://bugzilla.kernel.org
  B:    https://bugs.acpica.org
 -S:    Supported
  F:    drivers/acpi/acpica/
  F:    include/acpi/
  F:    tools/power/acpi/
  ACPI FAN DRIVER
  M:    Zhang Rui <rui.zhang@intel.com>
  L:    linux-acpi@vger.kernel.org
 +S:    Supported
  W:    https://01.org/linux-acpi
  B:    https://bugzilla.kernel.org
 -S:    Supported
  F:    drivers/acpi/fan.c
  
  ACPI FOR ARM64 (ACPI/arm64)
@@@ -389,26 -389,26 +389,26 @@@ M:      Len Brown <lenb@kernel.org
  R:    Andy Shevchenko <andriy.shevchenko@linux.intel.com>
  R:    Mika Westerberg <mika.westerberg@linux.intel.com>
  L:    linux-acpi@vger.kernel.org
 -Q:    https://patchwork.kernel.org/project/linux-acpi/list/
 +S:    Supported
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
 +Q:    https://patchwork.kernel.org/project/linux-acpi/list/
  B:    https://bugzilla.kernel.org
 -S:    Supported
  F:    drivers/acpi/pmic/
  
  ACPI THERMAL DRIVER
  M:    Zhang Rui <rui.zhang@intel.com>
  L:    linux-acpi@vger.kernel.org
 +S:    Supported
  W:    https://01.org/linux-acpi
  B:    https://bugzilla.kernel.org
 -S:    Supported
  F:    drivers/acpi/*thermal*
  
  ACPI VIDEO DRIVER
  M:    Zhang Rui <rui.zhang@intel.com>
  L:    linux-acpi@vger.kernel.org
 +S:    Supported
  W:    https://01.org/linux-acpi
  B:    https://bugzilla.kernel.org
 -S:    Supported
  F:    drivers/acpi/acpi_video.c
  
  ACPI WMI DRIVER
@@@ -674,14 -674,6 +674,14 @@@ S:       Maintaine
  F:    Documentation/i2c/busses/i2c-ali1563.rst
  F:    drivers/i2c/busses/i2c-ali1563.c
  
 +ALL SENSORS DLH SERIES PRESSURE SENSORS DRIVER
 +M:    Tomislav Denis <tomislav.denis@avl.com>
 +W:    http://www.allsensors.com/
 +S:    Maintained
 +L:    linux-iio@vger.kernel.org
 +F:    drivers/iio/pressure/dlhl60d.c
 +F:    Documentation/devicetree/bindings/iio/pressure/asc,dlhl60d.yaml
 +
  ALLEGRO DVT VIDEO IP CORE DRIVER
  M:    Michael Tretter <m.tretter@pengutronix.de>
  R:    Pengutronix Kernel Team <kernel@pengutronix.de>
@@@ -693,7 -685,7 +693,7 @@@ ALLWINNER CPUFREQ DRIVE
  M:    Yangtao Li <tiny.windzz@gmail.com>
  L:    linux-pm@vger.kernel.org
  S:    Maintained
 -F:    Documentation/devicetree/bindings/opp/sun50i-nvmem-cpufreq.txt
 +F:    Documentation/devicetree/bindings/opp/allwinner,sun50i-h6-operating-points.yaml
  F:    drivers/cpufreq/sun50i-cpufreq-nvmem.c
  
  ALLWINNER CRYPTO DRIVERS
@@@ -702,14 -694,6 +702,14 @@@ L:       linux-crypto@vger.kernel.or
  S:    Maintained
  F:    drivers/crypto/allwinner/
  
 +ALLWINNER THERMAL DRIVER
 +M:    Vasily Khoruzhick <anarsoul@gmail.com>
 +M:    Yangtao Li <tiny.windzz@gmail.com>
 +L:    linux-pm@vger.kernel.org
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/thermal/allwinner,sun8i-a83t-ths.yaml
 +F:    drivers/thermal/sun8i_thermal.c
 +
  ALLWINNER VPU DRIVER
  M:    Maxime Ripard <mripard@kernel.org>
  M:    Paul Kocialkowski <paul.kocialkowski@bootlin.com>
@@@ -736,13 -720,13 +736,13 @@@ F:      Documentation/devicetree/bindings/i2
  F:    drivers/i2c/busses/i2c-altera.c
  
  ALTERA MAILBOX DRIVER
 -M:    Ley Foon Tan <lftan@altera.com>
 +M:    Ley Foon Tan <ley.foon.tan@intel.com>
  L:    nios2-dev@lists.rocketboards.org (moderated for non-subscribers)
  S:    Maintained
  F:    drivers/mailbox/mailbox-altera.c
  
  ALTERA PIO DRIVER
 -M:    Tien Hock Loh <thloh@altera.com>
 +M:    Joyce Ooi <joyce.ooi@intel.com>
  L:    linux-gpio@vger.kernel.org
  S:    Maintained
  F:    drivers/gpio/gpio-altera.c
@@@ -787,8 -771,6 +787,8 @@@ F: drivers/thermal/thermal_mmio.
  
  AMAZON ETHERNET DRIVERS
  M:    Netanel Belgazal <netanel@amazon.com>
 +M:    Arthur Kiyanovski <akiyano@amazon.com>
 +R:    Guy Tzalik <gtzalik@amazon.com>
  R:    Saeed Bishara <saeedb@amazon.com>
  R:    Zorik Machulsky <zorik@amazon.com>
  L:    netdev@vger.kernel.org
@@@ -807,6 -789,7 +807,6 @@@ F: include/uapi/rdma/efa-abi.
  
  AMD CRYPTOGRAPHIC COPROCESSOR (CCP) DRIVER
  M:    Tom Lendacky <thomas.lendacky@amd.com>
 -M:    Gary Hook <gary.hook@amd.com>
  L:    linux-crypto@vger.kernel.org
  S:    Supported
  F:    drivers/crypto/ccp/
@@@ -915,14 -898,6 +915,14 @@@ S:       Supporte
  F:    drivers/iio/dac/ad5758.c
  F:    Documentation/devicetree/bindings/iio/dac/ad5758.txt
  
 +ANALOG DEVICES INC AD7091R5 DRIVER
 +M:    Beniamin Bia <beniamin.bia@analog.com>
 +L:    linux-iio@vger.kernel.org
 +W:    http://ez.analog.com/community/linux-device-drivers
 +S:    Supported
 +F:    drivers/iio/adc/ad7091r5.c
 +F:    Documentation/devicetree/bindings/iio/adc/adi,ad7091r5.yaml
 +
  ANALOG DEVICES INC AD7124 DRIVER
  M:    Stefan Popa <stefan.popa@analog.com>
  L:    linux-iio@vger.kernel.org
@@@ -1000,15 -975,6 +1000,15 @@@ W:     http://ez.analog.com/community/linux
  F:    drivers/iio/imu/adis16460.c
  F:    Documentation/devicetree/bindings/iio/imu/adi,adis16460.yaml
  
 +ANALOG DEVICES INC ADM1177 DRIVER
 +M:    Beniamin Bia <beniamin.bia@analog.com>
 +M:    Michael Hennerich <Michael.Hennerich@analog.com>
 +L:    linux-hwmon@vger.kernel.org
 +W:    http://ez.analog.com/community/linux-device-drivers
 +S:    Supported
 +F:    drivers/hwmon/adm1177.c
 +F:    Documentation/devicetree/bindings/hwmon/adi,adm1177.yaml
 +
  ANALOG DEVICES INC ADP5061 DRIVER
  M:    Stefan Popa <stefan.popa@analog.com>
  L:    linux-pm@vger.kernel.org
@@@ -1077,7 -1043,7 +1077,7 @@@ S:      Supporte
  F:    Documentation/ABI/testing/sysfs-bus-iio-frequency-ad9523
  F:    Documentation/ABI/testing/sysfs-bus-iio-frequency-adf4350
  F:    drivers/iio/*/ad*
 -F:    drivers/iio/adc/ltc2497*
 +F:    drivers/iio/adc/ltc249*
  X:    drivers/iio/*/adjd*
  F:    drivers/staging/iio/*/ad*
  
@@@ -1439,7 -1405,7 +1439,7 @@@ T:      git git://git.kernel.org/pub/scm/lin
  
  ARM/ACTIONS SEMI ARCHITECTURE
  M:    Andreas Färber <afaerber@suse.de>
 -R:    Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
 +M:    Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  S:    Maintained
  N:    owl
@@@ -2092,7 -2058,6 +2092,7 @@@ F:      drivers/rtc/rtc-pl031.
  F:    drivers/watchdog/coh901327_wdt.c
  F:    Documentation/devicetree/bindings/arm/ste-*
  F:    Documentation/devicetree/bindings/arm/ux500/
 +F:    Documentation/devicetree/bindings/arm/ux500.yaml
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik.git
  
  ARM/NUVOTON NPCM ARCHITECTURE
@@@ -2275,7 -2240,6 +2275,7 @@@ L:      linux-rockchip@lists.infradead.or
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git
  S:    Maintained
  F:    Documentation/devicetree/bindings/i2c/i2c-rk3x.txt
 +F:    Documentation/devicetree/bindings/mmc/rockchip-dw-mshc.yaml
  F:    arch/arm/boot/dts/rk3*
  F:    arch/arm/boot/dts/rv1108*
  F:    arch/arm/mach-rockchip/
@@@ -2308,7 -2272,6 +2308,7 @@@ F:      drivers/*/*s3c64xx
  F:    drivers/*/*s5pv210*
  F:    drivers/memory/samsung/
  F:    drivers/soc/samsung/
 +F:    drivers/tty/serial/samsung*
  F:    include/linux/soc/samsung/
  F:    Documentation/arm/samsung/
  F:    Documentation/devicetree/bindings/arm/samsung/
@@@ -2728,14 -2691,6 +2728,14 @@@ S:    Maintaine
  F:    drivers/pinctrl/aspeed/
  F:    Documentation/devicetree/bindings/pinctrl/aspeed,*
  
 +ASPEED SCU INTERRUPT CONTROLLER DRIVER
 +M:    Eddie James <eajames@linux.ibm.com>
 +L:    linux-aspeed@lists.ozlabs.org (moderated for non-subscribers)
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/interrupt-controller/aspeed,ast2xxx-scu-ic.txt
 +F:    drivers/irqchip/irq-aspeed-scu-ic.c
 +F:    include/dt-bindings/interrupt-controller/aspeed-scu-ic.h
 +
  ASPEED VIDEO ENGINE DRIVER
  M:    Eddie James <eajames@linux.ibm.com>
  L:    linux-media@vger.kernel.org
@@@ -2796,11 -2751,11 +2796,11 @@@ F:   drivers/block/aoe
  
  ATHEROS 71XX/9XXX GPIO DRIVER
  M:    Alban Bedel <albeu@free.fr>
 +S:    Maintained
  W:    https://github.com/AlbanBedel/linux
  T:    git git://github.com/AlbanBedel/linux
 -S:    Maintained
 -F:    drivers/gpio/gpio-ath79.c
  F:    Documentation/devicetree/bindings/gpio/gpio-ath79.txt
 +F:    drivers/gpio/gpio-ath79.c
  
  ATHEROS 71XX/9XXX USB PHY DRIVER
  M:    Alban Bedel <albeu@free.fr>
@@@ -3133,13 -3088,6 +3133,13 @@@ S:    Supporte
  F:    drivers/net/bonding/
  F:    include/uapi/linux/if_bonding.h
  
 +BOSCH SENSORTEC BMA400 ACCELEROMETER IIO DRIVER
 +M:    Dan Robertson <dan@dlrobertson.com>
 +L:    linux-iio@vger.kernel.org
 +S:    Maintained
 +F:    drivers/iio/accel/bma400*
 +F:    Documentation/devicetree/bindings/iio/accel/bosch,bma400.yaml
 +
  BPF (Safe dynamic programs and tools)
  M:    Alexei Starovoitov <ast@kernel.org>
  M:    Daniel Borkmann <daniel@iogearbox.net>
@@@ -3199,7 -3147,7 +3199,7 @@@ S:      Maintaine
  F:    arch/mips/net/
  
  BPF JIT for NFP NICs
 -M:    Jakub Kicinski <jakub.kicinski@netronome.com>
 +M:    Jakub Kicinski <kuba@kernel.org>
  L:    netdev@vger.kernel.org
  L:    bpf@vger.kernel.org
  S:    Supported
@@@ -3289,8 -3237,6 +3289,8 @@@ S:      Maintaine
  N:    bcm2711
  N:    bcm2835
  F:    drivers/staging/vc04_services
 +F:    Documentation/devicetree/bindings/pci/brcm,stb-pcie.yaml
 +F:    drivers/pci/controller/pcie-brcmstb.c
  
  BROADCOM BCM47XX MIPS ARCHITECTURE
  M:    Hauke Mehrtens <hauke@hauke-m.de>
@@@ -3346,8 -3292,6 +3346,8 @@@ F:      drivers/bus/brcmstb_gisb.
  F:    arch/arm/mm/cache-b15-rac.c
  F:    arch/arm/include/asm/hardware/cache-b15-rac.h
  N:    brcmstb
 +F:    Documentation/devicetree/bindings/pci/brcm,stb-pcie.yaml
 +F:    drivers/pci/controller/pcie-brcmstb.c
  
  BROADCOM BMIPS CPUFREQ DRIVER
  M:    Markus Mayer <mmayer@broadcom.com>
@@@ -3422,8 -3366,8 +3422,8 @@@ BROADCOM BRCMSTB GPIO DRIVE
  M:    Gregory Fong <gregory.0xf0@gmail.com>
  L:    bcm-kernel-feedback-list@broadcom.com
  S:    Supported
 -F:    drivers/gpio/gpio-brcmstb.c
  F:    Documentation/devicetree/bindings/gpio/brcm,brcmstb-gpio.txt
 +F:    drivers/gpio/gpio-brcmstb.c
  
  BROADCOM BRCMSTB I2C DRIVER
  M:    Kamal Dasu <kdasu.kdev@gmail.com>
@@@ -3481,8 -3425,8 +3481,8 @@@ BROADCOM KONA GPIO DRIVE
  M:    Ray Jui <rjui@broadcom.com>
  L:    bcm-kernel-feedback-list@broadcom.com
  S:    Supported
 -F:    drivers/gpio/gpio-bcm-kona.c
  F:    Documentation/devicetree/bindings/gpio/brcm,kona-gpio.txt
 +F:    drivers/gpio/gpio-bcm-kona.c
  
  BROADCOM NETXTREME-E ROCE DRIVER
  M:    Selvin Xavier <selvin.xavier@broadcom.com>
@@@ -3597,8 -3541,8 +3597,8 @@@ F:      sound/pci/bt87x.
  
  BT8XXGPIO DRIVER
  M:    Michael Buesch <m@bues.ch>
 -W:    http://bu3sch.de/btgpio.php
  S:    Maintained
 +W:    http://bu3sch.de/btgpio.php
  F:    drivers/gpio/gpio-bt8xx.c
  
  BTRFS FILE SYSTEM
@@@ -3649,7 -3593,6 +3649,7 @@@ F:      sound/pci/oxygen
  
  C-SKY ARCHITECTURE
  M:    Guo Ren <guoren@kernel.org>
 +L:    linux-csky@vger.kernel.org
  T:    git https://github.com/c-sky/csky-linux.git
  S:    Supported
  F:    arch/csky/
@@@ -3910,7 -3853,7 +3910,7 @@@ S:      Supporte
  F:    Documentation/filesystems/ceph.txt
  F:    fs/ceph/
  
 -CERTIFICATE HANDLING:
 +CERTIFICATE HANDLING
  M:    David Howells <dhowells@redhat.com>
  M:    David Woodhouse <dwmw2@infradead.org>
  L:    keyrings@vger.kernel.org
@@@ -3920,7 -3863,7 +3920,7 @@@ F:      certs
  F:    scripts/sign-file.c
  F:    scripts/extract-cert.c
  
 -CERTIFIED WIRELESS USB (WUSB) SUBSYSTEM:
 +CERTIFIED WIRELESS USB (WUSB) SUBSYSTEM
  L:    devel@driverdev.osuosl.org
  S:    Obsolete
  F:    drivers/staging/wusbcore/
@@@ -4017,12 -3960,12 +4017,12 @@@ M:   Cheng-Yi Chiang <cychiang@chromium.o
  S:    Maintained
  R:    Enric Balletbo i Serra <enric.balletbo@collabora.com>
  R:    Guenter Roeck <groeck@chromium.org>
 -F:    Documentation/devicetree/bindings/sound/google,cros-ec-codec.txt
 +F:    Documentation/devicetree/bindings/sound/google,cros-ec-codec.yaml
  F:    sound/soc/codecs/cros_ec_codec.*
  
  CIRRUS LOGIC AUDIO CODEC DRIVERS
- M:    Brian Austin <brian.austin@cirrus.com>
- M:    Paul Handrigan <Paul.Handrigan@cirrus.com>
+ M:    James Schulman <james.schulman@cirrus.com>
+ M:    David Rhodes <david.rhodes@cirrus.com>
  L:    alsa-devel@alsa-project.org (moderated for non-subscribers)
  S:    Maintained
  F:    sound/soc/codecs/cs*
@@@ -4475,7 -4418,7 +4475,7 @@@ L:      linux-media@vger.kernel.or
  T:    git git://linuxtv.org/media_tree.git
  S:    Maintained
  F:    drivers/media/platform/sunxi/sun6i-csi/
 -F:    Documentation/devicetree/bindings/media/sun6i-csi.txt
 +F:    Documentation/devicetree/bindings/media/allwinner,sun6i-a31-csi.yaml
  
  CW1200 WLAN driver
  M:    Solomon Peachy <pizza@shaftnet.org>
@@@ -4484,10 -4427,13 +4484,10 @@@ F:   drivers/net/wireless/st/cw1200
  
  CX18 VIDEO4LINUX DRIVER
  M:    Andy Walls <awalls@md.metrocast.net>
 -L:    ivtv-devel@ivtvdriver.org (subscribers-only)
  L:    linux-media@vger.kernel.org
  T:    git git://linuxtv.org/media_tree.git
  W:    https://linuxtv.org
 -W:    http://www.ivtvdriver.org/index.php/Cx18
  S:    Maintained
 -F:    Documentation/media/v4l-drivers/cx18*
  F:    drivers/media/pci/cx18/
  F:    include/uapi/linux/ivtv*
  
@@@ -4899,7 -4845,6 +4899,7 @@@ S:      Supporte
  F:    net/core/devlink.c
  F:    include/net/devlink.h
  F:    include/uapi/linux/devlink.h
 +F:    Documentation/networking/devlink
  
  DIALOG SEMICONDUCTOR DRIVERS
  M:    Support Opensource <support.opensource@diasemi.com>
@@@ -5025,25 -4970,6 +5025,25 @@@ F:    include/linux/dma-buf
  F:    include/linux/reservation.h
  F:    include/linux/*fence.h
  F:    Documentation/driver-api/dma-buf.rst
 +K:    dma_(buf|fence|resv)
 +T:    git git://anongit.freedesktop.org/drm/drm-misc
 +
 +DMA-BUF HEAPS FRAMEWORK
 +M:    Sumit Semwal <sumit.semwal@linaro.org>
 +R:    Andrew F. Davis <afd@ti.com>
 +R:    Benjamin Gaignard <benjamin.gaignard@linaro.org>
 +R:    Liam Mark <lmark@codeaurora.org>
 +R:    Laura Abbott <labbott@redhat.com>
 +R:    Brian Starkey <Brian.Starkey@arm.com>
 +R:    John Stultz <john.stultz@linaro.org>
 +S:    Maintained
 +L:    linux-media@vger.kernel.org
 +L:    dri-devel@lists.freedesktop.org
 +L:    linaro-mm-sig@lists.linaro.org (moderated for non-subscribers)
 +F:    include/uapi/linux/dma-heap.h
 +F:    include/linux/dma-heap.h
 +F:    drivers/dma-buf/dma-heap.c
 +F:    drivers/dma-buf/heaps/*
  T:    git git://anongit.freedesktop.org/drm/drm-misc
  
  DMA GENERIC OFFLOAD ENGINE SUBSYSTEM
@@@ -5073,7 -4999,7 +5073,7 @@@ F:      include/linux/dma-mapping.
  F:    include/linux/dma-noncoherent.h
  
  DMC FREQUENCY DRIVER FOR SAMSUNG EXYNOS5422
 -M:    Lukasz Luba <l.luba@partner.samsung.com>
 +M:    Lukasz Luba <lukasz.luba@arm.com>
  L:    linux-pm@vger.kernel.org
  L:    linux-samsung-soc@vger.kernel.org
  S:    Maintained
@@@ -5251,12 -5177,6 +5251,12 @@@ T:    git git://anongit.freedesktop.org/dr
  S:    Maintained
  F:    drivers/gpu/drm/bochs/
  
 +DRM DRIVER FOR BOE HIMAX8279D PANELS
 +M:    Jerry Han <hanxu5@huaqin.corp-partner.google.com>
 +S:    Maintained
 +F:    drivers/gpu/drm/panel/panel-boe-himax8279d.c
 +F:    Documentation/devicetree/bindings/display/panel/boe,himax8279d.txt
 +
  DRM DRIVER FOR FARADAY TVE200 TV ENCODER
  M:    Linus Walleij <linus.walleij@linaro.org>
  T:    git git://anongit.freedesktop.org/drm/drm-misc
@@@ -5412,12 -5332,6 +5412,12 @@@ S:    Maintaine
  F:    drivers/gpu/drm/tiny/st7735r.c
  F:    Documentation/devicetree/bindings/display/sitronix,st7735r.txt
  
 +DRM DRIVER FOR SONY ACX424AKP PANELS
 +M:    Linus Walleij <linus.walleij@linaro.org>
 +T:    git git://anongit.freedesktop.org/drm/drm-misc
 +S:    Maintained
 +F:    drivers/gpu/drm/panel/panel-sony-acx424akp.c
 +
  DRM DRIVER FOR ST-ERICSSON MCDE
  M:    Linus Walleij <linus.walleij@linaro.org>
  T:    git git://anongit.freedesktop.org/drm/drm-misc
@@@ -5490,6 -5404,7 +5490,6 @@@ F:      include/linux/vga
  DRM DRIVERS AND MISC GPU PATCHES
  M:    Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
  M:    Maxime Ripard <mripard@kernel.org>
 -M:    Sean Paul <sean@poorly.run>
  W:    https://01.org/linuxgraphics/gfx-docs/maintainer-tools/drm-misc.html
  S:    Maintained
  T:    git git://anongit.freedesktop.org/drm/drm-misc
@@@ -5668,7 -5583,7 +5668,7 @@@ L:      dri-devel@lists.freedesktop.or
  T:    git git://anongit.freedesktop.org/drm/drm-misc
  S:    Maintained
  F:    drivers/gpu/drm/stm
 -F:    Documentation/devicetree/bindings/display/st,stm32-ltdc.txt
 +F:    Documentation/devicetree/bindings/display/st,stm32-ltdc.yaml
  
  DRM DRIVERS FOR TI LCDC
  M:    Jyri Sarha <jsarha@ti.com>
@@@ -5933,12 -5848,12 +5933,12 @@@ S:   Maintaine
  F:    drivers/media/dvb-frontends/ec100*
  
  ECRYPT FILE SYSTEM
 -M:    Tyler Hicks <tyhicks@canonical.com>
 +M:    Tyler Hicks <code@tyhicks.com>
  L:    ecryptfs@vger.kernel.org
  W:    http://ecryptfs.org
  W:    https://launchpad.net/ecryptfs
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tyhicks/ecryptfs.git
 -S:    Supported
 +S:    Odd Fixes
  F:    Documentation/filesystems/ecryptfs.txt
  F:    fs/ecryptfs/
  
@@@ -6110,7 -6025,6 +6110,7 @@@ M:      Yash Shah <yash.shah@sifive.com
  L:    linux-edac@vger.kernel.org
  S:    Supported
  F:    drivers/edac/sifive_edac.c
 +F:    drivers/soc/sifive_l2_cache.c
  
  EDAC-SKYLAKE
  M:    Tony Luck <tony.luck@intel.com>
@@@ -6236,12 -6150,6 +6236,12 @@@ M:    Maxim Levitsky <maximlevitsky@gmail.
  S:    Maintained
  F:    drivers/media/rc/ene_ir.*
  
 +EPAPR HYPERVISOR BYTE CHANNEL DEVICE DRIVER
 +M:    Laurentiu Tudor <laurentiu.tudor@nxp.com>
 +L:    linuxppc-dev@lists.ozlabs.org
 +S:    Maintained
 +F:    drivers/tty/ehv_bytechan.c
 +
  EPSON S1D13XXX FRAMEBUFFER DRIVER
  M:    Kristoffer Ericson <kristoffer.ericson@gmail.com>
  S:    Maintained
@@@ -6284,7 -6192,6 +6284,7 @@@ ETHERNET PHY LIBRAR
  M:    Andrew Lunn <andrew@lunn.ch>
  M:    Florian Fainelli <f.fainelli@gmail.com>
  M:    Heiner Kallweit <hkallweit1@gmail.com>
 +R:    Russell King <linux@armlinux.org.uk>
  L:    netdev@vger.kernel.org
  S:    Maintained
  F:    Documentation/ABI/testing/sysfs-class-net-phydev
@@@ -6490,7 -6397,6 +6490,7 @@@ F:      fs/
  F:    include/linux/fs.h
  F:    include/linux/fs_types.h
  F:    include/uapi/linux/fs.h
 +F:    include/uapi/linux/openat2.h
  
  FINTEK F75375S HARDWARE MONITOR AND FAN CONTROLLER DRIVER
  M:    Riku Voipio <riku.voipio@iki.fi>
@@@ -6909,7 -6815,7 +6909,7 @@@ T:      git git://git.kernel.org/pub/scm/lin
  S:    Maintained
  F:    fs/fuse/
  F:    include/uapi/linux/fuse.h
 -F:    Documentation/filesystems/fuse.txt
 +F:    Documentation/filesystems/fuse.rst
  
  FUTEX SUBSYSTEM
  M:    Thomas Gleixner <tglx@linutronix.de>
@@@ -7048,7 -6954,7 +7048,7 @@@ L:      kvm@vger.kernel.or
  S:    Supported
  F:    drivers/uio/uio_pci_generic.c
  
 -GENERIC VDSO LIBRARY:
 +GENERIC VDSO LIBRARY
  M:    Andy Lutomirski <luto@kernel.org>
  M:    Thomas Gleixner <tglx@linutronix.de>
  M:    Vincenzo Frascino <vincenzo.frascino@arm.com>
@@@ -7125,7 -7031,6 +7125,7 @@@ L:      linux-acpi@vger.kernel.or
  S:    Maintained
  F:    Documentation/firmware-guide/acpi/gpio-properties.rst
  F:    drivers/gpio/gpiolib-acpi.c
 +F:    drivers/gpio/gpiolib-acpi.h
  
  GPIO IR Transmitter
  M:    Sean Young <sean@mess.org>
@@@ -7144,18 -7049,18 +7144,18 @@@ GPIO SUBSYSTE
  M:    Linus Walleij <linus.walleij@linaro.org>
  M:    Bartosz Golaszewski <bgolaszewski@baylibre.com>
  L:    linux-gpio@vger.kernel.org
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git
  S:    Maintained
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git
 +F:    Documentation/ABI/obsolete/sysfs-gpio
 +F:    Documentation/ABI/testing/gpio-cdev
 +F:    Documentation/admin-guide/gpio/
  F:    Documentation/devicetree/bindings/gpio/
  F:    Documentation/driver-api/gpio/
 -F:    Documentation/admin-guide/gpio/
 -F:    Documentation/ABI/testing/gpio-cdev
 -F:    Documentation/ABI/obsolete/sysfs-gpio
  F:    drivers/gpio/
 +F:    include/asm-generic/gpio.h
  F:    include/linux/gpio/
  F:    include/linux/gpio.h
  F:    include/linux/of_gpio.h
 -F:    include/asm-generic/gpio.h
  F:    include/uapi/linux/gpio.h
  F:    tools/gpio/
  
@@@ -7384,7 -7289,6 +7384,7 @@@ F:      drivers/hwtracing
  HARDWARE SPINLOCK CORE
  M:    Ohad Ben-Cohen <ohad@wizery.com>
  M:    Bjorn Andersson <bjorn.andersson@linaro.org>
 +R:    Baolin Wang <baolin.wang7@gmail.com>
  L:    linux-remoteproc@vger.kernel.org
  S:    Maintained
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc.git hwspinlock-next
@@@ -7588,12 -7492,6 +7588,12 @@@ S:    Supporte
  F:    drivers/scsi/hisi_sas/
  F:    Documentation/devicetree/bindings/scsi/hisilicon-sas.txt
  
 +HISILICON V3XX SPI NOR FLASH Controller Driver
 +M:    John Garry <john.garry@huawei.com>
 +W:    http://www.hisilicon.com
 +S:    Maintained
 +F:    drivers/spi/spi-hisi-sfc-v3xx.c
 +
  HISILICON QM AND ZIP Controller DRIVER
  M:    Zhou Wang <wangzhou1@hisilicon.com>
  L:    linux-crypto@vger.kernel.org
@@@ -7664,8 -7562,9 +7664,8 @@@ S:      Orpha
  F:    drivers/net/usb/hso.c
  
  HSR NETWORK PROTOCOL
 -M:    Arvid Brodin <arvid.brodin@alten.se>
  L:    netdev@vger.kernel.org
 -S:    Maintained
 +S:    Orphan
  F:    net/hsr/
  
  HT16K33 LED CONTROLLER DRIVER
@@@ -7738,7 -7637,7 +7738,7 @@@ Hyper-V CORE AND DRIVER
  M:    "K. Y. Srinivasan" <kys@microsoft.com>
  M:    Haiyang Zhang <haiyangz@microsoft.com>
  M:    Stephen Hemminger <sthemmin@microsoft.com>
 -M:    Sasha Levin <sashal@kernel.org>
 +M:    Wei Liu <wei.liu@kernel.org>
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux.git
  L:    linux-hyperv@vger.kernel.org
  S:    Supported
@@@ -7820,7 -7719,9 +7820,7 @@@ M:      Jean Delvare <jdelvare@suse.com
  L:    linux-i2c@vger.kernel.org
  S:    Maintained
  F:    Documentation/i2c/busses/i2c-parport.rst
 -F:    Documentation/i2c/busses/i2c-parport-light.rst
  F:    drivers/i2c/busses/i2c-parport.c
 -F:    drivers/i2c/busses/i2c-parport-light.c
  
  I2C SUBSYSTEM
  M:    Wolfram Sang <wsa@the-dreams.de>
@@@ -7934,10 -7835,10 +7934,10 @@@ F:   Documentation/devicetree/bindings/i3
  F:    drivers/i3c/master/dw*
  
  I3C DRIVER FOR CADENCE I3C MASTER IP
 -M:      PrzemysĹ‚aw Gaj <pgaj@cadence.com>
 -S:      Maintained
 -F:      Documentation/devicetree/bindings/i3c/cdns,i3c-master.txt
 -F:      drivers/i3c/master/i3c-master-cdns.c
 +M:    PrzemysĹ‚aw Gaj <pgaj@cadence.com>
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/i3c/cdns,i3c-master.txt
 +F:    drivers/i3c/master/i3c-master-cdns.c
  
  IA64 (Itanium) PLATFORM
  M:    Tony Luck <tony.luck@intel.com>
@@@ -8056,8 -7957,8 +8056,8 @@@ F:      drivers/scsi/ips.
  ICH LPC AND GPIO DRIVER
  M:    Peter Tyser <ptyser@xes-inc.com>
  S:    Maintained
 -F:    drivers/mfd/lpc_ich.c
  F:    drivers/gpio/gpio-ich.c
 +F:    drivers/mfd/lpc_ich.c
  
  ICY I2C DRIVER
  M:    Max Staudt <max@enpas.org>
@@@ -8201,7 -8102,8 +8201,7 @@@ F:      Documentation/devicetree/bindings/au
  F:    drivers/auxdisplay/img-ascii-lcd.c
  
  IMGTEC IR DECODER DRIVER
 -M:    James Hogan <jhogan@kernel.org>
 -S:    Maintained
 +S:    Orphan
  F:    drivers/media/rc/img-ir/
  
  IMON SOUNDGRAPH USB IR RECEIVER
@@@ -8393,7 -8295,7 +8393,7 @@@ M:      Joonas Lahtinen <joonas.lahtinen@lin
  M:    Rodrigo Vivi <rodrigo.vivi@intel.com>
  L:    intel-gfx@lists.freedesktop.org
  W:    https://01.org/linuxgraphics/
 -B:    https://01.org/linuxgraphics/documentation/how-report-bugs
 +B:    https://gitlab.freedesktop.org/drm/intel/-/wikis/How-to-file-i915-bugs
  C:    irc://chat.freenode.net/intel-gfx
  Q:    http://patchwork.freedesktop.org/project/intel-gfx/
  T:    git git://anongit.freedesktop.org/drm-intel
@@@ -8442,6 -8344,7 +8442,6 @@@ S:      Maintaine
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/andy/linux-gpio-intel.git
  F:    drivers/gpio/gpio-ich.c
  F:    drivers/gpio/gpio-intel-mid.c
 -F:    drivers/gpio/gpio-lynxpoint.c
  F:    drivers/gpio/gpio-merrifield.c
  F:    drivers/gpio/gpio-ml-ioh.c
  F:    drivers/gpio/gpio-pch.c
@@@ -8472,14 -8375,6 +8472,14 @@@ Q:    https://patchwork.kernel.org/project
  S:    Supported
  F:    drivers/dma/ioat*
  
 +INTEL IADX DRIVER
 +M:    Dave Jiang <dave.jiang@intel.com>
 +L:    dmaengine@vger.kernel.org
 +S:    Supported
 +F:    drivers/dma/idxd/*
 +F:    include/uapi/linux/idxd.h
 +F:    include/linux/idxd.h
 +
  INTEL IDLE DRIVER
  M:    Jacob Pan <jacob.jun.pan@linux.intel.com>
  M:    Len Brown <lenb@kernel.org>
@@@ -8661,12 -8556,6 +8661,12 @@@ S:    Maintaine
  F:    arch/x86/include/asm/intel_telemetry.h
  F:    drivers/platform/x86/intel_telemetry*
  
 +INTEL UNCORE FREQUENCY CONTROL
 +M:    Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
 +L:    platform-driver-x86@vger.kernel.org
 +S:    Maintained
 +F:    drivers/platform/x86/intel-uncore-frequency.c
 +
  INTEL VIRTUAL BUTTON DRIVER
  M:    AceLan Kao <acelan.kao@canonical.com>
  L:    platform-driver-x86@vger.kernel.org
@@@ -8674,7 -8563,7 +8674,7 @@@ S:      Maintaine
  F:    drivers/platform/x86/intel-vbtn.c
  
  INTEL WIRELESS 3945ABG/BG, 4965AGN (iwlegacy)
 -M:    Stanislaw Gruszka <sgruszka@redhat.com>
 +M:    Stanislaw Gruszka <stf_xl@wp.pl>
  L:    linux-wireless@vger.kernel.org
  S:    Supported
  F:    drivers/net/wireless/intel/iwlegacy/
@@@ -8912,12 -8801,10 +8912,12 @@@ L:   isdn4linux@listserv.isdn4linux.de (s
  L:    netdev@vger.kernel.org
  W:    http://www.isdn4linux.de
  S:    Maintained
 -F:    drivers/isdn/mISDN
 -F:    drivers/isdn/hardware
 +F:    drivers/isdn/mISDN/
 +F:    drivers/isdn/hardware/
 +F:    drivers/isdn/Kconfig
 +F:    drivers/isdn/Makefile
  
 -ISDN/CAPI SUBSYSTEM
 +ISDN/CMTP OVER BLUETOOTH
  M:    Karsten Keil <isdn@linux-pingi.de>
  L:    isdn4linux@listserv.isdn4linux.de (subscribers-only)
  L:    netdev@vger.kernel.org
@@@ -8925,6 -8812,7 +8925,6 @@@ W:      http://www.isdn4linux.d
  S:    Odd Fixes
  F:    Documentation/isdn/
  F:    drivers/isdn/capi/
 -F:    drivers/staging/isdn/
  F:    net/bluetooth/cmtp/
  F:    include/linux/isdn/
  F:    include/uapi/linux/isdn/
@@@ -8948,9 -8836,10 +8948,9 @@@ F:     drivers/media/tuners/it913x
  
  IVTV VIDEO4LINUX DRIVER
  M:    Andy Walls <awalls@md.metrocast.net>
 -L:    ivtv-devel@ivtvdriver.org (subscribers-only)
  L:    linux-media@vger.kernel.org
  T:    git git://linuxtv.org/media_tree.git
 -W:    http://www.ivtvdriver.org
 +W:    https://linuxtv.org
  S:    Maintained
  F:    Documentation/media/v4l-drivers/ivtv*
  F:    drivers/media/pci/ivtv/
@@@ -9149,6 -9038,7 +9149,6 @@@ F:      include/linux/umh.
  
  KERNEL VIRTUAL MACHINE (KVM)
  M:    Paolo Bonzini <pbonzini@redhat.com>
 -M:    Radim KrÄŤmář <rkrcmar@redhat.com>
  L:    kvm@vger.kernel.org
  W:    http://www.linux-kvm.org
  T:    git git://git.kernel.org/pub/scm/virt/kvm/kvm.git
@@@ -9183,9 -9073,9 +9183,9 @@@ F:      virt/kvm/arm
  F:    include/kvm/arm_*
  
  KERNEL VIRTUAL MACHINE FOR MIPS (KVM/mips)
 -M:    James Hogan <jhogan@kernel.org>
  L:    linux-mips@vger.kernel.org
 -S:    Supported
 +L:    kvm@vger.kernel.org
 +S:    Orphan
  F:    arch/mips/include/uapi/asm/kvm*
  F:    arch/mips/include/asm/kvm*
  F:    arch/mips/kvm/
@@@ -9220,6 -9110,7 +9220,6 @@@ F:      tools/testing/selftests/kvm/*/s390x
  
  KERNEL VIRTUAL MACHINE FOR X86 (KVM/x86)
  M:    Paolo Bonzini <pbonzini@redhat.com>
 -M:    Radim KrÄŤmář <rkrcmar@redhat.com>
  R:    Sean Christopherson <sean.j.christopherson@intel.com>
  R:    Vitaly Kuznetsov <vkuznets@redhat.com>
  R:    Wanpeng Li <wanpengli@tencent.com>
@@@ -9237,7 -9128,7 +9237,7 @@@ F:      arch/x86/include/uapi/asm/svm.
  F:    arch/x86/include/asm/kvm*
  F:    arch/x86/include/asm/pvclock-abi.h
  F:    arch/x86/include/asm/svm.h
 -F:    arch/x86/include/asm/vmx.h
 +F:    arch/x86/include/asm/vmx*.h
  F:    arch/x86/kernel/kvm.c
  F:    arch/x86/kernel/kvmclock.c
  
@@@ -9279,7 -9170,7 +9279,7 @@@ F:      include/keys/trusted-type.
  F:    security/keys/trusted.c
  F:    include/keys/trusted.h
  
 -KEYS/KEYRINGS:
 +KEYS/KEYRINGS
  M:    David Howells <dhowells@redhat.com>
  M:    Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
  L:    keyrings@vger.kernel.org
@@@ -9686,7 -9577,6 +9686,7 @@@ LINUX KERNEL DUMP TEST MODULE (LKDTM
  M:    Kees Cook <keescook@chromium.org>
  S:    Maintained
  F:    drivers/misc/lkdtm/*
 +F:    tools/testing/selftests/lkdtm/*
  
  LINUX KERNEL MEMORY CONSISTENCY MODEL (LKMM)
  M:    Alan Stern <stern@rowland.harvard.edu>
@@@ -9995,7 -9885,7 +9995,7 @@@ S:      Maintaine
  F:    drivers/net/dsa/mv88e6xxx/
  F:    include/linux/platform_data/mv88e6xxx.h
  F:    Documentation/devicetree/bindings/net/dsa/marvell.txt
 -F:    Documentation/networking/devlink-params-mv88e6xxx.txt
 +F:    Documentation/networking/devlink/mv88e6xxx.rst
  
  MARVELL ARMADA DRM SUPPORT
  M:    Russell King <linux@armlinux.org.uk>
@@@ -10065,7 -9955,8 +10065,7 @@@ F:    drivers/net/ethernet/marvell/mvneta.
  
  MARVELL MWIFIEX WIRELESS DRIVER
  M:    Amitkumar Karwar <amitkarwar@gmail.com>
 -M:    Nishant Sarmukadam <nishants@marvell.com>
 -M:    Ganapathi Bhat <gbhat@marvell.com>
 +M:    Ganapathi Bhat <ganapathi.bhat@nxp.com>
  M:    Xinming Hu <huxinming820@gmail.com>
  L:    linux-wireless@vger.kernel.org
  S:    Maintained
@@@ -10104,16 -9995,6 +10104,16 @@@ M:  Jerin Jacob <jerinj@marvell.com
  L:    netdev@vger.kernel.org
  S:    Supported
  F:    drivers/net/ethernet/marvell/octeontx2/af/
 +F:    Documentation/networking/device_drivers/marvell/octeontx2.rst
 +
 +MARVELL OCTEONTX2 PHYSICAL FUNCTION DRIVER
 +M:    Sunil Goutham <sgoutham@marvell.com>
 +M:    Geetha sowjanya <gakula@marvell.com>
 +M:    Subbaraya Sundeep <sbhatta@marvell.com>
 +M:    hariprasad <hkelam@marvell.com>
 +L:    netdev@vger.kernel.org
 +S:    Supported
 +F:    drivers/net/ethernet/marvell/octeontx2/nic/
  
  MATROX FRAMEBUFFER DRIVER
  L:    linux-fbdev@vger.kernel.org
@@@ -10164,7 -10045,7 +10164,7 @@@ MAXBOTIX ULTRASONIC RANGER IIO DRIVE
  M:    Andreas Klinger <ak@it-klinger.de>
  L:    linux-iio@vger.kernel.org
  S:    Maintained
 -F:    Documentation/devicetree/bindings/iio/proximity/maxbotix,mb1232.txt
 +F:    Documentation/devicetree/bindings/iio/proximity/maxbotix,mb1232.yaml
  F:    drivers/iio/proximity/mb1232.c
  
  MAXIM MAX77650 PMIC MFD DRIVER
@@@ -10227,7 -10108,6 +10227,7 @@@ S:   Maintaine
  F:    drivers/media/radio/radio-maxiradio*
  
  MCAN MMIO DEVICE DRIVER
 +M:    Dan Murphy <dmurphy@ti.com>
  M:    Sriram Dash <sriram.dash@samsung.com>
  L:    linux-can@vger.kernel.org
  S:    Maintained
@@@ -10396,7 -10276,7 +10396,7 @@@ L:   linux-media@vger.kernel.or
  L:    linux-renesas-soc@vger.kernel.org
  T:    git git://linuxtv.org/media_tree.git
  S:    Supported
 -F:    Documentation/devicetree/bindings/media/renesas,ceu.txt
 +F:    Documentation/devicetree/bindings/media/renesas,ceu.yaml
  F:    drivers/media/platform/renesas-ceu.c
  F:    include/media/drv-intf/renesas-ceu.h
  
@@@ -10434,7 -10314,7 +10434,7 @@@ L:   linux-media@vger.kernel.or
  L:    linux-renesas-soc@vger.kernel.org
  T:    git git://linuxtv.org/media_tree.git
  S:    Supported
 -F:    Documentation/devicetree/bindings/media/renesas,csi2.txt
 +F:    Documentation/devicetree/bindings/media/renesas,csi2.yaml
  F:    Documentation/devicetree/bindings/media/renesas,vin.txt
  F:    drivers/media/platform/rcar-vin/
  
@@@ -10467,7 -10347,7 +10467,7 @@@ M:   Hugues Fruchet <hugues.fruchet@st.co
  L:    linux-media@vger.kernel.org
  T:    git git://linuxtv.org/media_tree.git
  S:    Supported
 -F:    Documentation/devicetree/bindings/media/st,stm32-dcmi.txt
 +F:    Documentation/devicetree/bindings/media/st,stm32-dcmi.yaml
  F:    drivers/media/platform/stm32/stm32-dcmi.c
  
  MEDIA DRIVERS FOR NVIDIA TEGRA - VDE
@@@ -11115,12 -10995,15 +11115,12 @@@ S:        Maintaine
  F:    drivers/usb/image/microtek.*
  
  MIPS
 -M:    Ralf Baechle <ralf@linux-mips.org>
 -M:    Paul Burton <paulburton@kernel.org>
 -M:    James Hogan <jhogan@kernel.org>
 +M:    Thomas Bogendoerfer <tsbogend@alpha.franken.de>
  L:    linux-mips@vger.kernel.org
  W:    http://www.linux-mips.org/
 -T:    git git://git.linux-mips.org/pub/scm/ralf/linux.git
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux.git
  Q:    http://patchwork.linux-mips.org/project/linux-mips/list/
 -S:    Supported
 +S:    Maintained
  F:    Documentation/devicetree/bindings/mips/
  F:    Documentation/mips/
  F:    arch/mips/
@@@ -11255,13 -11138,6 +11255,13 @@@ S: Maintaine
  F:    Documentation/driver-api/serial/moxa-smartio.rst
  F:    drivers/tty/mxser.*
  
 +MONOLITHIC POWER SYSTEM PMIC DRIVER
 +M:    Saravanan Sekar <sravanhome@gmail.com>
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/regulator/mpq7920.yaml
 +F:    drivers/regulator/mpq7920.c
 +F:    drivers/regulator/mpq7920.h
 +
  MR800 AVERMEDIA USB FM RADIO DRIVER
  M:    Alexey Klimov <klimov.linux@gmail.com>
  L:    linux-media@vger.kernel.org
@@@ -11483,7 -11359,7 +11483,7 @@@ F:   drivers/scsi/mac_scsi.
  F:    drivers/scsi/sun3_scsi.*
  F:    drivers/scsi/sun3_scsi_vme.c
  
 -NCSI LIBRARY:
 +NCSI LIBRARY
  M:    Samuel Mendoza-Jonas <sam@mendozajonas.com>
  S:    Maintained
  F:    net/ncsi/
@@@ -11505,7 -11381,7 +11505,7 @@@ F:   Documentation/networking/net_failove
  
  NETEM NETWORK EMULATOR
  M:    Stephen Hemminger <stephen@networkplumber.org>
 -L:    netem@lists.linux-foundation.org (moderated for non-subscribers)
 +L:    netdev@vger.kernel.org
  S:    Maintained
  F:    net/sched/sch_netem.c
  
@@@ -11550,7 -11426,7 +11550,7 @@@ F:   include/uapi/linux/netrom.
  F:    net/netrom/
  
  NETRONOME ETHERNET DRIVERS
 -M:    Jakub Kicinski <jakub.kicinski@netronome.com>
 +M:    Jakub Kicinski <kuba@kernel.org>
  L:    oss-drivers@netronome.com
  S:    Maintained
  F:    drivers/net/ethernet/netronome/
@@@ -11579,8 -11455,8 +11579,8 @@@ M:   "David S. Miller" <davem@davemloft.n
  L:    netdev@vger.kernel.org
  W:    http://www.linuxfoundation.org/en/Net
  Q:    http://patchwork.ozlabs.org/project/netdev/list/
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git
  S:    Odd Fixes
  F:    Documentation/devicetree/bindings/net/
  F:    drivers/net/
@@@ -11618,12 -11494,11 +11618,12 @@@ F:        drivers/net/dsa
  
  NETWORKING [GENERAL]
  M:    "David S. Miller" <davem@davemloft.net>
 +M:    Jakub Kicinski <kuba@kernel.org>
  L:    netdev@vger.kernel.org
  W:    http://www.linuxfoundation.org/en/Net
  Q:    http://patchwork.ozlabs.org/project/netdev/list/
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git
  B:    mailto:netdev@vger.kernel.org
  S:    Maintained
  F:    net/
@@@ -11668,7 -11543,7 +11668,7 @@@ M:   "David S. Miller" <davem@davemloft.n
  M:    Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
  M:    Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
  L:    netdev@vger.kernel.org
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git
  S:    Maintained
  F:    net/ipv4/
  F:    net/ipv6/
@@@ -11693,18 -11568,6 +11693,18 @@@ F: net/ipv6/calipso.
  F:    net/netfilter/xt_CONNSECMARK.c
  F:    net/netfilter/xt_SECMARK.c
  
 +NETWORKING [MPTCP]
 +M:    Mat Martineau <mathew.j.martineau@linux.intel.com>
 +M:    Matthieu Baerts <matthieu.baerts@tessares.net>
 +L:    netdev@vger.kernel.org
 +L:    mptcp@lists.01.org
 +W:    https://github.com/multipath-tcp/mptcp_net-next/wiki
 +B:    https://github.com/multipath-tcp/mptcp_net-next/issues
 +S:    Maintained
 +F:    include/net/mptcp.h
 +F:    net/mptcp/
 +F:    tools/testing/selftests/net/mptcp/
 +
  NETWORKING [TCP]
  M:    Eric Dumazet <edumazet@google.com>
  L:    netdev@vger.kernel.org
@@@ -11723,7 -11586,7 +11723,7 @@@ M:   Boris Pismenny <borisp@mellanox.com
  M:    Aviad Yehezkel <aviadye@mellanox.com>
  M:    John Fastabend <john.fastabend@gmail.com>
  M:    Daniel Borkmann <daniel@iogearbox.net>
 -M:    Jakub Kicinski <jakub.kicinski@netronome.com>
 +M:    Jakub Kicinski <kuba@kernel.org>
  L:    netdev@vger.kernel.org
  S:    Maintained
  F:    net/tls/*
@@@ -11735,7 -11598,7 +11735,7 @@@ L:   linux-wireless@vger.kernel.or
  Q:    http://patchwork.kernel.org/project/linux-wireless/list/
  
  NETDEVSIM
 -M:    Jakub Kicinski <jakub.kicinski@netronome.com>
 +M:    Jakub Kicinski <kuba@kernel.org>
  S:    Maintained
  F:    drivers/net/netdevsim/*
  
@@@ -11812,7 -11675,7 +11812,7 @@@ F:   Documentation/scsi/NinjaSCSI.tx
  F:    drivers/scsi/nsp32*
  
  NIOS2 ARCHITECTURE
 -M:    Ley Foon Tan <lftan@altera.com>
 +M:    Ley Foon Tan <ley.foon.tan@intel.com>
  L:    nios2-dev@lists.rocketboards.org (moderated for non-subscribers)
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/lftan/nios2.git
  S:    Maintained
@@@ -12530,7 -12393,7 +12530,7 @@@ L:   linux-unionfs@vger.kernel.or
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs.git
  S:    Supported
  F:    fs/overlayfs/
 -F:    Documentation/filesystems/overlayfs.txt
 +F:    Documentation/filesystems/overlayfs.rst
  
  P54 WIRELESS DRIVER
  M:    Christian Lamparter <chunkeey@googlemail.com>
@@@ -12563,7 -12426,7 +12563,7 @@@ L:   linux-crypto@vger.kernel.or
  S:    Maintained
  F:    kernel/padata.c
  F:    include/linux/padata.h
 -F:    Documentation/padata.txt
 +F:    Documentation/core-api/padata.rst
  
  PAGE POOL
  M:    Jesper Dangaard Brouer <hawk@kernel.org>
@@@ -12579,13 -12442,6 +12579,13 @@@ L: platform-driver-x86@vger.kernel.or
  S:    Maintained
  F:    drivers/platform/x86/panasonic-laptop.c
  
 +PARALLAX PING IIO SENSOR DRIVER
 +M:    Andreas Klinger <ak@it-klinger.de>
 +L:    linux-iio@vger.kernel.org
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/iio/proximity/parallax-ping.yaml
 +F:    drivers/iio/proximity/ping.c
 +
  PARALLEL LCD/KEYPAD PANEL DRIVER
  M:    Willy Tarreau <willy@haproxy.com>
  M:    Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
@@@ -12703,7 -12559,7 +12703,7 @@@ F:   Documentation/devicetree/bindings/pc
  F:    drivers/pci/controller/pci-aardvark.c
  
  PCI DRIVER FOR ALTERA PCIE IP
 -M:    Ley Foon Tan <lftan@altera.com>
 +M:    Ley Foon Tan <ley.foon.tan@intel.com>
  L:    rfi@lists.rocketboards.org (moderated for non-subscribers)
  L:    linux-pci@vger.kernel.org
  S:    Supported
@@@ -12723,7 -12579,7 +12723,7 @@@ M:   Rob Herring <robh@kernel.org
  L:    linux-pci@vger.kernel.org
  L:    linux-arm-kernel@lists.infradead.org
  S:    Maintained
 -F:    Documentation/devicetree/bindings/pci/versatile.txt
 +F:    Documentation/devicetree/bindings/pci/versatile.yaml
  F:    drivers/pci/controller/pci-versatile.c
  
  PCI DRIVER FOR ARMADA 8K
@@@ -12739,7 -12595,7 +12739,7 @@@ M:   Tom Joseph <tjoseph@cadence.com
  L:    linux-pci@vger.kernel.org
  S:    Maintained
  F:    Documentation/devicetree/bindings/pci/cdns,*.txt
 -F:    drivers/pci/controller/pcie-cadence*
 +F:    drivers/pci/controller/cadence/
  
  PCI DRIVER FOR FREESCALE LAYERSCAPE
  M:    Minghuan Lian <minghuan.Lian@nxp.com>
@@@ -12756,7 -12612,7 +12756,7 @@@ M:   Will Deacon <will@kernel.org
  L:    linux-pci@vger.kernel.org
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  S:    Maintained
 -F:    Documentation/devicetree/bindings/pci/host-generic-pci.txt
 +F:    Documentation/devicetree/bindings/pci/host-generic-pci.yaml
  F:    drivers/pci/controller/pci-host-common.c
  F:    drivers/pci/controller/pci-host-generic.c
  
@@@ -12882,7 -12738,7 +12882,7 @@@ S:   Supporte
  F:    Documentation/PCI/pci-error-recovery.rst
  
  PCI MSI DRIVER FOR ALTERA MSI IP
 -M:    Ley Foon Tan <lftan@altera.com>
 +M:    Ley Foon Tan <ley.foon.tan@intel.com>
  L:    rfi@lists.rocketboards.org (moderated for non-subscribers)
  L:    linux-pci@vger.kernel.org
  S:    Supported
@@@ -12918,7 -12774,7 +12918,7 @@@ F:   arch/x86/kernel/early-quirks.
  
  PCI NATIVE HOST BRIDGE AND ENDPOINT DRIVERS
  M:    Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
 -R:    Andrew Murray <andrew.murray@arm.com>
 +R:    Andrew Murray <amurray@thegoodpenguin.co.uk>
  L:    linux-pci@vger.kernel.org
  Q:    http://patchwork.ozlabs.org/project/linux-pci/list/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/lpieralisi/pci.git/
@@@ -12952,6 -12808,7 +12952,6 @@@ M:   Robert Richter <rrichter@marvell.com
  L:    linux-pci@vger.kernel.org
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  S:    Supported
 -F:    Documentation/devicetree/bindings/pci/pci-thunder-*
  F:    drivers/pci/controller/pci-thunder-*
  
  PCIE DRIVER FOR HISILICON
@@@ -13282,11 -13139,6 +13282,11 @@@ S: Maintaine
  F:    drivers/iio/chemical/pms7003.c
  F:    Documentation/devicetree/bindings/iio/chemical/plantower,pms7003.yaml
  
 +PLX DMA DRIVER
 +M:    Logan Gunthorpe <logang@deltatee.com>
 +S:    Maintained
 +F:    drivers/dma/plx_dma.c
 +
  PMBUS HARDWARE MONITORING DRIVERS
  M:    Guenter Roeck <linux@roeck-us.net>
  L:    linux-hwmon@vger.kernel.org
@@@ -13338,6 -13190,11 +13338,6 @@@ T:  git git://github.com/intel/pm-grap
  S:    Supported
  F:    tools/power/pm-graph
  
 -PNP SUPPORT
 -M:    "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
 -S:    Maintained
 -F:    drivers/pnp/
 -
  PNI RM3100 IIO DRIVER
  M:    Song Qiang <songqiang1304521@gmail.com>
  L:    linux-iio@vger.kernel.org
@@@ -13345,11 -13202,6 +13345,11 @@@ S: Maintaine
  F:    drivers/iio/magnetometer/rm3100*
  F:    Documentation/devicetree/bindings/iio/magnetometer/pni,rm3100.txt
  
 +PNP SUPPORT
 +M:    "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
 +S:    Maintained
 +F:    drivers/pnp/
 +
  POSIX CLOCKS and TIMERS
  M:    Thomas Gleixner <tglx@linutronix.de>
  L:    linux-kernel@vger.kernel.org
@@@ -13357,8 -13209,6 +13357,8 @@@ T:   git git://git.kernel.org/pub/scm/lin
  S:    Maintained
  F:    fs/timerfd.c
  F:    include/linux/timer*
 +F:    include/linux/time_namespace.h
 +F:    kernel/time/namespace.c
  F:    kernel/time/*timer*
  
  POWER MANAGEMENT CORE
@@@ -13510,7 -13360,7 +13510,7 @@@ L:   linuxppc-dev@lists.ozlabs.or
  S:    Maintained
  F:    drivers/block/ps3vram.c
  
 -PSAMPLE PACKET SAMPLING SUPPORT:
 +PSAMPLE PACKET SAMPLING SUPPORT
  M:    Yotam Gigi <yotam.gi@gmail.com>
  S:    Maintained
  F:    net/psample
@@@ -13794,13 -13644,6 +13794,13 @@@ T: git git://git.kernel.org/pub/scm/lin
  S:    Supported
  F:    drivers/net/wireless/ath/ath10k/
  
 +QUALCOMM ATHEROS ATH11K WIRELESS DRIVER
 +M:    Kalle Valo <kvalo@codeaurora.org>
 +L:    ath11k@lists.infradead.org
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
 +S:    Supported
 +F:    drivers/net/wireless/ath/ath11k/
 +
  QUALCOMM ATHEROS ATH9K WIRELESS DRIVER
  M:    QCA ath9k Development <ath9k-devel@qca.qualcomm.com>
  L:    linux-wireless@vger.kernel.org
@@@ -13823,14 -13666,6 +13823,14 @@@ S: Maintaine
  F:    Documentation/devicetree/bindings/opp/qcom-nvmem-cpufreq.txt
  F:    drivers/cpufreq/qcom-cpufreq-nvmem.c
  
 +QUALCOMM CORE POWER REDUCTION (CPR) AVS DRIVER
 +M:    Niklas Cassel <nks@flawful.org>
 +L:    linux-pm@vger.kernel.org
 +L:    linux-arm-msm@vger.kernel.org
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/power/avs/qcom,cpr.txt
 +F:    drivers/power/avs/qcom-cpr.c
 +
  QUALCOMM EMAC GIGABIT ETHERNET DRIVER
  M:    Timur Tabi <timur@kernel.org>
  L:    netdev@vger.kernel.org
@@@ -13839,6 -13674,7 +13839,6 @@@ F:   drivers/net/ethernet/qualcomm/emac
  
  QUALCOMM ETHQOS ETHERNET DRIVER
  M:    Vinod Koul <vkoul@kernel.org>
 -M:    Niklas Cassel <niklas.cassel@linaro.org>
  L:    netdev@vger.kernel.org
  S:    Maintained
  F:    drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
@@@ -13872,15 -13708,6 +13872,15 @@@ L: linux-arm-msm@vger.kernel.or
  S:    Maintained
  F:    drivers/iommu/qcom_iommu.c
  
 +QUALCOMM RMNET DRIVER
 +M:    Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
 +M:    Sean Tranchetti <stranche@codeaurora.org>
 +L:    netdev@vger.kernel.org
 +S:    Maintained
 +F:    drivers/net/ethernet/qualcomm/rmnet/
 +F:    Documentation/networking/device_drivers/qualcomm/rmnet.txt
 +F:    include/linux/if_rmnet.h
 +
  QUALCOMM TSENS THERMAL DRIVER
  M:    Amit Kucheria <amit.kucheria@linaro.org>
  L:    linux-pm@vger.kernel.org
@@@ -13980,7 -13807,7 +13980,7 @@@ S:   Maintaine
  F:    arch/mips/ralink
  
  RALINK RT2X00 WIRELESS LAN DRIVER
 -M:    Stanislaw Gruszka <sgruszka@redhat.com>
 +M:    Stanislaw Gruszka <stf_xl@wp.pl>
  M:    Helmut Schaa <helmut.schaa@googlemail.com>
  L:    linux-wireless@vger.kernel.org
  S:    Maintained
@@@ -14226,7 -14053,7 +14226,7 @@@ F:   include/dt-bindings/reset
  F:    include/linux/reset.h
  F:    include/linux/reset/
  F:    include/linux/reset-controller.h
 -K:      \b(?:devm_|of_)?reset_control(?:ler_[a-z]+|_[a-z_]+)?\b
 +K:    \b(?:devm_|of_)?reset_control(?:ler_[a-z]+|_[a-z_]+)?\b
  
  RESTARTABLE SEQUENCES SUPPORT
  M:    Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
@@@ -14279,7 -14106,6 +14279,7 @@@ M:   Paul Walmsley <paul.walmsley@sifive.
  M:    Palmer Dabbelt <palmer@dabbelt.com>
  M:    Albert Ou <aou@eecs.berkeley.edu>
  L:    linux-riscv@lists.infradead.org
 +P:    Documentation/riscv/patch-acceptance.rst
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git
  S:    Supported
  F:    arch/riscv/
@@@ -14294,12 -14120,6 +14294,12 @@@ F: drivers/hid/hid-roccat
  F:    include/linux/hid-roccat*
  F:    Documentation/ABI/*/sysfs-driver-hid-roccat*
  
 +ROCKCHIP ISP V1 DRIVER
 +M:    Helen Koike <helen.koike@collabora.com>
 +L:    linux-media@vger.kernel.org
 +S:    Maintained
 +F:    drivers/staging/media/rkisp1/
 +
  ROCKCHIP RASTER 2D GRAPHIC ACCELERATION UNIT DRIVER
  M:    Jacob Chen <jacob-chen@iotwrt.com>
  M:    Ezequiel Garcia <ezequiel@collabora.com>
@@@ -14580,10 -14400,10 +14580,10 @@@ F:        drivers/media/pci/saa7146
  F:    include/media/drv-intf/saa7146*
  
  SAFESETID SECURITY MODULE
 -M:     Micah Morton <mortonm@chromium.org>
 -S:     Supported
 -F:     security/safesetid/
 -F:     Documentation/admin-guide/LSM/SafeSetID.rst
 +M:    Micah Morton <mortonm@chromium.org>
 +S:    Supported
 +F:    security/safesetid/
 +F:    Documentation/admin-guide/LSM/SafeSetID.rst
  
  SAMSUNG AUDIO (ASoC) DRIVERS
  M:    Krzysztof Kozlowski <krzk@kernel.org>
@@@ -14671,7 -14491,7 +14671,7 @@@ F:   drivers/media/i2c/s5k5baf.
  SAMSUNG S5P Security SubSystem (SSS) DRIVER
  M:    Krzysztof Kozlowski <krzk@kernel.org>
  M:    Vladimir Zapolskiy <vz@mleia.com>
 -M:    Kamil Konieczny <k.konieczny@partner.samsung.com>
 +M:    Kamil Konieczny <k.konieczny@samsung.com>
  L:    linux-crypto@vger.kernel.org
  L:    linux-samsung-soc@vger.kernel.org
  S:    Maintained
@@@ -14713,6 -14533,8 +14713,6 @@@ F:   include/linux/platform_data/spi-s3c6
  
  SAMSUNG SXGBE DRIVERS
  M:    Byungho An <bh74.an@samsung.com>
 -M:    Girish K S <ks.giri@samsung.com>
 -M:    Vipul Pandya <vipul.pandya@samsung.com>
  S:    Supported
  L:    netdev@vger.kernel.org
  F:    drivers/net/ethernet/samsung/sxgbe/
@@@ -14947,8 -14769,8 +14947,8 @@@ S:   Maintaine
  F:    drivers/mmc/host/sdhci-omap.c
  
  SECURE ENCRYPTING DEVICE (SED) OPAL DRIVER
 -M:    Scott Bauer <scott.bauer@intel.com>
  M:    Jonathan Derrick <jonathan.derrick@intel.com>
 +M:    Revanth Rajashekar <revanth.rajashekar@intel.com>
  L:    linux-block@vger.kernel.org
  S:    Supported
  F:    block/sed*
@@@ -14983,7 -14805,6 +14983,7 @@@ F:   include/uapi/linux/selinux_netlink.
  F:    security/selinux/
  F:    scripts/selinux/
  F:    Documentation/admin-guide/LSM/SELinux.rst
 +F:    Documentation/ABI/obsolete/sysfs-selinux-disable
  
  SENSABLE PHANTOM
  M:    Jiri Slaby <jirislaby@gmail.com>
@@@ -15210,8 -15031,11 +15210,8 @@@ F:  drivers/video/fbdev/sm712
  F:    Documentation/fb/sm712fb.rst
  
  SIMPLE FIRMWARE INTERFACE (SFI)
 -M:    Len Brown <lenb@kernel.org>
 -L:    sfi-devel@simplefirmware.org
  W:    http://simplefirmware.org/
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-sfi-2.6.git
 -S:    Supported
 +S:    Obsolete
  F:    arch/x86/platform/sfi/
  F:    drivers/sfi/
  F:    include/linux/sfi*.h
@@@ -15615,6 -15439,17 +15615,17 @@@ F: sound/soc
  F:    include/dt-bindings/sound/
  F:    include/sound/soc*
  
+ SOUND - SOUND OPEN FIRMWARE (SOF) DRIVERS
+ M:    Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
+ M:    Liam Girdwood <lgirdwood@gmail.com>
+ M:    Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
+ M:    Kai Vehmanen <kai.vehmanen@linux.intel.com>
+ M:    Daniel Baluta <daniel.baluta@nxp.com>
+ L:    sound-open-firmware@alsa-project.org (moderated for non-subscribers)
+ W:    https://github.com/thesofproject/linux/
+ S:    Supported
+ F:    sound/soc/sof/
  SOUNDWIRE SUBSYSTEM
  M:    Vinod Koul <vkoul@kernel.org>
  M:    Sanyog Kale <sanyog.r.kale@intel.com>
@@@ -15921,7 -15756,7 +15932,7 @@@ F:   drivers/*/stm32-*timer
  F:    drivers/pwm/pwm-stm32*
  F:    include/linux/*/stm32-*tim*
  F:    Documentation/ABI/testing/*timer-stm32
 -F:    Documentation/devicetree/bindings/*/stm32-*timer*
 +F:    Documentation/devicetree/bindings/*/*stm32-*timer*
  F:    Documentation/devicetree/bindings/pwm/pwm-stm32*
  
  STMMAC ETHERNET DRIVER
@@@ -15931,18 -15766,8 +15942,18 @@@ M: Jose Abreu <joabreu@synopsys.com
  L:    netdev@vger.kernel.org
  W:    http://www.stlinux.com
  S:    Supported
 +F:    Documentation/networking/device_drivers/stmicro/
  F:    drivers/net/ethernet/stmicro/stmmac/
  
 +EXTRA BOOT CONFIG
 +M:    Masami Hiramatsu <mhiramat@kernel.org>
 +S:    Maintained
 +F:    lib/bootconfig.c
 +F:    fs/proc/bootconfig.c
 +F:    include/linux/bootconfig.h
 +F:    tools/bootconfig/*
 +F:    Documentation/admin-guide/bootconfig.rst
 +
  SUN3/3X
  M:    Sam Creasey <sammy@sammy.net>
  W:    http://sammy.net/sun3/
@@@ -16073,22 -15898,20 +16084,22 @@@ F:        Documentation/devicetree/bindings/re
  SYNOPSYS CREG GPIO DRIVER
  M:    Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
  S:    Maintained
 -F:    drivers/gpio/gpio-creg-snps.c
  F:    Documentation/devicetree/bindings/gpio/snps,creg-gpio.txt
 +F:    drivers/gpio/gpio-creg-snps.c
  
  SYNOPSYS DESIGNWARE 8250 UART DRIVER
  R:    Andy Shevchenko <andriy.shevchenko@linux.intel.com>
  S:    Maintained
  F:    drivers/tty/serial/8250/8250_dw.c
 +F:    drivers/tty/serial/8250/8250_dwlib.*
 +F:    drivers/tty/serial/8250/8250_lpss.c
  
  SYNOPSYS DESIGNWARE APB GPIO DRIVER
  M:    Hoan Tran <hoan@os.amperecomputing.com>
  L:    linux-gpio@vger.kernel.org
  S:    Maintained
 -F:    drivers/gpio/gpio-dwapb.c
  F:    Documentation/devicetree/bindings/gpio/snps-dwapb-gpio.txt
 +F:    drivers/gpio/gpio-dwapb.c
  
  SYNOPSYS DESIGNWARE AXI DMAC DRIVER
  M:    Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
@@@ -16152,7 -15975,6 +16163,7 @@@ F:   drivers/firmware/arm_scpi.
  F:    drivers/firmware/arm_scmi/
  F:    drivers/reset/reset-scmi.c
  F:    include/linux/sc[mp]i_protocol.h
 +F:    include/trace/events/scmi.h
  
  SYSTEM RESET/SHUTDOWN DRIVERS
  M:    Sebastian Reichel <sre@kernel.org>
@@@ -16502,10 -16324,12 +16513,10 @@@ F:        drivers/media/radio/radio-raremono.
  
  THERMAL
  M:    Zhang Rui <rui.zhang@intel.com>
 -M:    Eduardo Valentin <edubezval@gmail.com>
 -R:    Daniel Lezcano <daniel.lezcano@linaro.org>
 +M:    Daniel Lezcano <daniel.lezcano@linaro.org>
  R:    Amit Kucheria <amit.kucheria@verdurent.com>
  L:    linux-pm@vger.kernel.org
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux.git
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal.git
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git
  Q:    https://patchwork.kernel.org/project/linux-pm/list/
  S:    Supported
  F:    drivers/thermal/
@@@ -16516,15 -16340,12 +16527,15 @@@ F:        Documentation/devicetree/bindings/th
  
  THERMAL/CPU_COOLING
  M:    Amit Daniel Kachhap <amit.kachhap@gmail.com>
 +M:    Daniel Lezcano <daniel.lezcano@linaro.org>
  M:    Viresh Kumar <viresh.kumar@linaro.org>
  M:    Javi Merino <javi.merino@kernel.org>
  L:    linux-pm@vger.kernel.org
  S:    Supported
  F:    Documentation/driver-api/thermal/cpu-cooling-api.rst
 -F:    drivers/thermal/cpu_cooling.c
 +F:    Documentation/driver-api/thermal/cpu-idle-cooling.rst
 +F:    drivers/thermal/cpufreq_cooling.c
 +F:    drivers/thermal/cpuidle_cooling.c
  F:    include/linux/cpu_cooling.h
  
  THERMAL DRIVER FOR AMLOGIC SOCS
@@@ -16551,9 -16372,8 +16562,9 @@@ M:   Andreas Noever <andreas.noever@gmail
  M:    Michael Jamet <michael.jamet@intel.com>
  M:    Mika Westerberg <mika.westerberg@linux.intel.com>
  M:    Yehezkel Bernat <YehezkelShB@gmail.com>
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt.git
 +L:    linux-usb@vger.kernel.org
  S:    Maintained
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt.git
  F:    Documentation/admin-guide/thunderbolt.rst
  F:    drivers/thunderbolt/
  F:    include/linux/thunderbolt.h
@@@ -16723,13 -16543,6 +16734,13 @@@ L: alsa-devel@alsa-project.org (moderat
  S:    Odd Fixes
  F:    sound/soc/codecs/tas571x*
  
 +TI TCAN4X5X DEVICE DRIVER
 +M:    Dan Murphy <dmurphy@ti.com>
 +L:    linux-can@vger.kernel.org
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/net/can/tcan4x5x.txt
 +F:    drivers/net/can/m_can/tcan4x5x.c
 +
  TI TRF7970A NFC DRIVER
  M:    Mark Greer <mgreer@animalcreek.com>
  L:    linux-wireless@vger.kernel.org
@@@ -16752,7 -16565,6 +16763,7 @@@ Q:   http://patchwork.linuxtv.org/project
  S:    Maintained
  F:    drivers/media/platform/ti-vpe/
  F:    Documentation/devicetree/bindings/media/ti,vpe.yaml
 +      Documentation/devicetree/bindings/media/ti,cal.yaml
  
  TI WILINK WIRELESS DRIVERS
  L:    linux-wireless@vger.kernel.org
@@@ -16782,7 -16594,7 +16793,7 @@@ F:   kernel/time/ntp.
  F:    tools/testing/selftests/timers/
  
  TIPC NETWORK LAYER
 -M:    Jon Maloy <jon.maloy@ericsson.com>
 +M:    Jon Maloy <jmaloy@redhat.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)
@@@ -17080,7 -16892,7 +17091,7 @@@ S:   Maintaine
  F:    Documentation/admin-guide/ufs.rst
  F:    fs/ufs/
  
 -UHID USERSPACE HID IO DRIVER:
 +UHID USERSPACE HID IO DRIVER
  M:    David Herrmann <dh.herrmann@googlemail.com>
  L:    linux-input@vger.kernel.org
  S:    Maintained
@@@ -17094,18 -16906,18 +17105,18 @@@ S:        Maintaine
  F:    drivers/usb/common/ulpi.c
  F:    include/linux/ulpi/
  
 -ULTRA-WIDEBAND (UWB) SUBSYSTEM:
 +ULTRA-WIDEBAND (UWB) SUBSYSTEM
  L:    devel@driverdev.osuosl.org
  S:    Obsolete
  F:    drivers/staging/uwb/
  
 -UNICODE SUBSYSTEM:
 +UNICODE SUBSYSTEM
  M:    Gabriel Krisman Bertazi <krisman@collabora.com>
  L:    linux-fsdevel@vger.kernel.org
  S:    Supported
  F:    fs/unicode/
  
 -UNICORE32 ARCHITECTURE:
 +UNICORE32 ARCHITECTURE
  M:    Guan Xuetao <gxt@pku.edu.cn>
  W:    http://mprc.pku.edu.cn/~guanxuetao/linux
  S:    Maintained
@@@ -17138,6 -16950,7 +17149,6 @@@ F:   drivers/staging/unisys
  UNIVERSAL FLASH STORAGE HOST CONTROLLER DRIVER
  R:    Alim Akhtar <alim.akhtar@samsung.com>
  R:    Avri Altman <avri.altman@wdc.com>
 -R:    Pedro Sousa <pedrom.sousa@synopsys.com>
  L:    linux-scsi@vger.kernel.org
  S:    Supported
  F:    Documentation/scsi/ufs.txt
@@@ -17392,14 -17205,11 +17403,14 @@@ F:        drivers/usb
  F:    include/linux/usb.h
  F:    include/linux/usb/
  
 -USB TYPEC PI3USB30532 MUX DRIVER
 -M:    Hans de Goede <hdegoede@redhat.com>
 +USB TYPEC BUS FOR ALTERNATE MODES
 +M:    Heikki Krogerus <heikki.krogerus@linux.intel.com>
  L:    linux-usb@vger.kernel.org
  S:    Maintained
 -F:    drivers/usb/typec/mux/pi3usb30532.c
 +F:    Documentation/ABI/testing/sysfs-bus-typec
 +F:    Documentation/driver-api/usb/typec_bus.rst
 +F:    drivers/usb/typec/altmodes/
 +F:    include/linux/usb/typec_altmode.h
  
  USB TYPEC CLASS
  M:    Heikki Krogerus <heikki.krogerus@linux.intel.com>
@@@ -17410,11 -17220,14 +17421,11 @@@ F:        Documentation/driver-api/usb/typec.r
  F:    drivers/usb/typec/
  F:    include/linux/usb/typec.h
  
 -USB TYPEC BUS FOR ALTERNATE MODES
 -M:    Heikki Krogerus <heikki.krogerus@linux.intel.com>
 +USB TYPEC PI3USB30532 MUX DRIVER
 +M:    Hans de Goede <hdegoede@redhat.com>
  L:    linux-usb@vger.kernel.org
  S:    Maintained
 -F:    Documentation/ABI/testing/sysfs-bus-typec
 -F:    Documentation/driver-api/usb/typec_bus.rst
 -F:    drivers/usb/typec/altmodes/
 -F:    include/linux/usb/typec_altmode.h
 +F:    drivers/usb/typec/mux/pi3usb30532.c
  
  USB TYPEC PORT CONTROLLER DRIVERS
  M:    Guenter Roeck <linux@roeck-us.net>
@@@ -17554,7 -17367,7 +17565,7 @@@ F:   drivers/mtd/nand/raw/vf610_nfc.
  VFAT/FAT/MSDOS FILESYSTEM
  M:    OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
  S:    Maintained
 -F:    Documentation/filesystems/vfat.txt
 +F:    Documentation/filesystems/vfat.rst
  F:    fs/fat/
  
  VFIO DRIVER
@@@ -17677,7 -17490,6 +17688,7 @@@ F:   net/vmw_vsock/diag.
  F:    net/vmw_vsock/af_vsock_tap.c
  F:    net/vmw_vsock/virtio_transport_common.c
  F:    net/vmw_vsock/virtio_transport.c
 +F:    net/vmw_vsock/vsock_loopback.c
  F:    drivers/net/vsockmon.c
  F:    drivers/vhost/vsock.c
  F:    tools/testing/vsock/
@@@ -17791,12 -17603,6 +17802,12 @@@ F: include/linux/vbox_utils.
  F:    include/uapi/linux/vbox*.h
  F:    drivers/virt/vboxguest/
  
 +VIRTUAL BOX SHARED FOLDER VFS DRIVER
 +M:    Hans de Goede <hdegoede@redhat.com>
 +L:    linux-fsdevel@vger.kernel.org
 +S:    Maintained
 +F:    fs/vboxsf/*
 +
  VIRTUAL SERIO DEVICE DRIVER
  M:    Stephen Chandler Paul <thatslyude@gmail.com>
  S:    Maintained
@@@ -18054,14 -17860,6 +18065,14 @@@ L: linux-gpio@vger.kernel.or
  S:    Maintained
  F:    drivers/gpio/gpio-ws16c48.c
  
 +WIREGUARD SECURE NETWORK TUNNEL
 +M:    Jason A. Donenfeld <Jason@zx2c4.com>
 +S:    Maintained
 +F:    drivers/net/wireguard/
 +F:    tools/testing/selftests/wireguard/
 +L:    wireguard@lists.zx2c4.com
 +L:    netdev@vger.kernel.org
 +
  WISTRON LAPTOP BUTTON DRIVER
  M:    Miloslav Trmac <mitr@volny.cz>
  S:    Maintained
@@@ -18125,8 -17923,8 +18136,8 @@@ F:   Documentation/core-api/workqueue.rs
  X-POWERS AXP288 PMIC DRIVERS
  M:    Hans de Goede <hdegoede@redhat.com>
  S:    Maintained
 -N:    axp288
  F:    drivers/acpi/pmic/intel_pmic_xpower.c
 +N:    axp288
  
  X-POWERS MULTIFUNCTION PMIC DEVICE DRIVERS
  M:    Chen-Yu Tsai <wens@csie.org>
@@@ -18237,7 -18035,7 +18248,7 @@@ XDP (eXpress Data Path
  M:    Alexei Starovoitov <ast@kernel.org>
  M:    Daniel Borkmann <daniel@iogearbox.net>
  M:    David S. Miller <davem@davemloft.net>
 -M:    Jakub Kicinski <jakub.kicinski@netronome.com>
 +M:    Jakub Kicinski <kuba@kernel.org>
  M:    Jesper Dangaard Brouer <hawk@kernel.org>
  M:    John Fastabend <john.fastabend@gmail.com>
  L:    netdev@vger.kernel.org
@@@ -18414,8 -18212,8 +18425,8 @@@ M:   Nandor Han <nandor.han@ge.com
  M:    Semi Malinen <semi.malinen@ge.com>
  L:    linux-gpio@vger.kernel.org
  S:    Maintained
 -F:    drivers/gpio/gpio-xra1403.c
  F:    Documentation/devicetree/bindings/gpio/gpio-xra1403.txt
 +F:    drivers/gpio/gpio-xra1403.c
  
  XTENSA XTFPGA PLATFORM SUPPORT
  M:    Max Filippov <jcmvbkbc@gmail.com>
@@@ -18496,16 -18294,6 +18507,16 @@@ L: linux-kernel@vger.kernel.or
  S:    Maintained
  F:    arch/x86/kernel/cpu/zhaoxin.c
  
 +ZONEFS FILESYSTEM
 +M:    Damien Le Moal <damien.lemoal@wdc.com>
 +M:    Naohiro Aota <naohiro.aota@wdc.com>
 +R:    Johannes Thumshirn <jth@kernel.org>
 +L:    linux-fsdevel@vger.kernel.org
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/zonefs.git
 +S:    Maintained
 +F:    fs/zonefs/
 +F:    Documentation/filesystems/zonefs.txt
 +
  ZPOOL COMPRESSED PAGE STORAGE API
  M:    Dan Streetman <ddstreet@ieee.org>
  L:    linux-mm@kvack.org
diff --combined include/sound/soc.h
@@@ -471,9 -471,6 +471,9 @@@ bool snd_soc_runtime_ignore_pmdown_time
  void snd_soc_runtime_activate(struct snd_soc_pcm_runtime *rtd, int stream);
  void snd_soc_runtime_deactivate(struct snd_soc_pcm_runtime *rtd, int stream);
  
 +int snd_soc_runtime_calc_hw(struct snd_soc_pcm_runtime *rtd,
 +                          struct snd_pcm_hardware *hw, int stream);
 +
  int snd_soc_runtime_set_dai_fmt(struct snd_soc_pcm_runtime *rtd,
        unsigned int dai_fmt);
  
@@@ -858,11 -855,6 +858,11 @@@ struct snd_soc_dai_link 
             ((platform) = &link->platforms[i]);                        \
             (i)++)
  
 +#define for_each_link_cpus(link, i, cpu)                              \
 +      for ((i) = 0;                                                   \
 +           ((i) < link->num_cpus) && ((cpu) = &link->cpus[i]);        \
 +           (i)++)
 +
  /*
   * Sample 1 : Single CPU/Codec/Platform
   *
@@@ -1066,6 -1058,7 +1066,7 @@@ struct snd_soc_card 
        const struct snd_soc_dapm_route *of_dapm_routes;
        int num_of_dapm_routes;
        bool fully_routed;
+       bool disable_route_checks;
  
        /* lists of probed devices belonging to this card */
        struct list_head component_dev_list;
  #define for_each_card_components(card, component)                     \
        list_for_each_entry(component, &(card)->component_dev_list, card_list)
  
 +#define for_each_card_dapms(card, dapm)                                       \
 +      list_for_each_entry(dapm, &card->dapm_list, list)
 +
 +#define for_each_card_widgets(card, w)\
 +      list_for_each_entry(w, &card->widgets, list)
 +#define for_each_card_widgets_safe(card, w, _w)       \
 +      list_for_each_entry_safe(w, _w, &card->widgets, list)
 +
  /* SoC machine DAI configuration, glues a codec and cpu DAI together */
  struct snd_soc_pcm_runtime {
        struct device *dev;
        struct snd_soc_dai **codec_dais;
        unsigned int num_codecs;
  
 +      struct snd_soc_dai **cpu_dais;
 +      unsigned int num_cpus;
 +
        struct delayed_work delayed_work;
        void (*close_delayed_work_func)(struct snd_soc_pcm_runtime *rtd);
  #ifdef CONFIG_DEBUG_FS
        for ((i) = 0;                                                   \
             ((i) < rtd->num_components) && ((component) = rtd->components[i]);\
             (i)++)
 -#define for_each_rtd_codec_dai(rtd, i, dai)\
 -      for ((i) = 0;                                                  \
 -           ((i) < rtd->num_codecs) && ((dai) = rtd->codec_dais[i]); \
 +#define for_each_rtd_cpu_dais(rtd, i, dai)                            \
 +      for ((i) = 0;                                                   \
 +           ((i) < rtd->num_cpus) && ((dai) = rtd->cpu_dais[i]);       \
 +           (i)++)
 +#define for_each_rtd_cpu_dais_rollback(rtd, i, dai)           \
 +      for (; (--(i) >= 0) && ((dai) = rtd->cpu_dais[i]);)
 +#define for_each_rtd_codec_dais(rtd, i, dai)                          \
 +      for ((i) = 0;                                                   \
 +           ((i) < rtd->num_codecs) && ((dai) = rtd->codec_dais[i]);   \
             (i)++)
 -#define for_each_rtd_codec_dai_rollback(rtd, i, dai)          \
 +#define for_each_rtd_codec_dais_rollback(rtd, i, dai)         \
        for (; (--(i) >= 0) && ((dai) = rtd->codec_dais[i]);)
  
 +
  void snd_soc_close_delayed_work(struct snd_soc_pcm_runtime *rtd);
  
  /* mixer control */
@@@ -5,7 -5,6 +5,7 @@@
   */
  
  #include <linux/acpi.h>
 +#include <linux/delay.h>
  #include <linux/device.h>
  #include <linux/err.h>
  #include <linux/gpio.h>
@@@ -25,24 -24,26 +25,24 @@@ struct max98357a_priv 
        unsigned int sdmode_delay;
  };
  
 -static int max98357a_daiops_trigger(struct snd_pcm_substream *substream,
 -              int cmd, struct snd_soc_dai *dai)
 +static int max98357a_sdmode_event(struct snd_soc_dapm_widget *w,
 +              struct snd_kcontrol *kcontrol, int event)
  {
 -      struct max98357a_priv *max98357a = snd_soc_dai_get_drvdata(dai);
 +      struct snd_soc_component *component =
 +              snd_soc_dapm_to_component(w->dapm);
 +      struct max98357a_priv *max98357a =
 +              snd_soc_component_get_drvdata(component);
  
        if (!max98357a->sdmode)
                return 0;
  
 -      switch (cmd) {
 -      case SNDRV_PCM_TRIGGER_START:
 -      case SNDRV_PCM_TRIGGER_RESUME:
 -      case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
 -              mdelay(max98357a->sdmode_delay);
 +      if (event & SND_SOC_DAPM_POST_PMU) {
 +              msleep(max98357a->sdmode_delay);
                gpiod_set_value(max98357a->sdmode, 1);
 -              break;
 -      case SNDRV_PCM_TRIGGER_STOP:
 -      case SNDRV_PCM_TRIGGER_SUSPEND:
 -      case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
 +              dev_dbg(component->dev, "set sdmode to 1");
 +      } else if (event & SND_SOC_DAPM_PRE_PMD) {
                gpiod_set_value(max98357a->sdmode, 0);
 -              break;
 +              dev_dbg(component->dev, "set sdmode to 0");
        }
  
        return 0;
  
  static const struct snd_soc_dapm_widget max98357a_dapm_widgets[] = {
        SND_SOC_DAPM_OUTPUT("Speaker"),
 +      SND_SOC_DAPM_OUT_DRV_E("SD_MODE", SND_SOC_NOPM, 0, 0, NULL, 0,
 +                      max98357a_sdmode_event,
 +                      SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD),
  };
  
  static const struct snd_soc_dapm_route max98357a_dapm_routes[] = {
 -      {"Speaker", NULL, "HiFi Playback"},
 +      {"SD_MODE", NULL, "HiFi Playback"},
 +      {"Speaker", NULL, "SD_MODE"},
  };
  
  static const struct snd_soc_component_driver max98357a_component_driver = {
        .non_legacy_dai_naming  = 1,
  };
  
 -static const struct snd_soc_dai_ops max98357a_dai_ops = {
 -      .trigger        = max98357a_daiops_trigger,
 -};
 -
  static struct snd_soc_dai_driver max98357a_dai_driver = {
        .name = "HiFi",
        .playback = {
@@@ -90,6 -91,7 +90,6 @@@
                .channels_min   = 1,
                .channels_max   = 2,
        },
 -      .ops    = &max98357a_dai_ops,
  };
  
  static int max98357a_platform_probe(struct platform_device *pdev)
@@@ -133,6 -135,7 +133,7 @@@ MODULE_DEVICE_TABLE(of, max98357a_devic
  #ifdef CONFIG_ACPI
  static const struct acpi_device_id max98357a_acpi_match[] = {
        { "MX98357A", 0 },
+       { "MX98360A", 0 },
        {},
  };
  MODULE_DEVICE_TABLE(acpi, max98357a_acpi_match);
  #include <linux/init.h>
  #include <linux/delay.h>
  #include <linux/pm.h>
 +#include <linux/pm_runtime.h>
  #include <linux/i2c.h>
  #include <linux/platform_device.h>
  #include <linux/spi/spi.h>
  #include <linux/acpi.h>
  #include <linux/gpio.h>
  #include <linux/of_gpio.h>
 -#include <linux/regulator/consumer.h>
  #include <linux/mutex.h>
  #include <sound/core.h>
  #include <sound/pcm.h>
@@@ -31,7 -31,8 +31,7 @@@
  
  #include "rl6231.h"
  #include "rt5682.h"
 -
 -#define RT5682_NUM_SUPPLIES 3
 +#include "rt5682-sdw.h"
  
  static const char *rt5682_supply_names[RT5682_NUM_SUPPLIES] = {
        "AVDD",
@@@ -44,15 -45,35 +44,15 @@@ static const struct rt5682_platform_dat
        .dmic1_clk_pin = RT5682_DMIC1_CLK_GPIO3,
        .jd_src = RT5682_JD1,
        .btndet_delay = 16,
 -};
 -
 -struct rt5682_priv {
 -      struct snd_soc_component *component;
 -      struct rt5682_platform_data pdata;
 -      struct regmap *regmap;
 -      struct snd_soc_jack *hs_jack;
 -      struct regulator_bulk_data supplies[RT5682_NUM_SUPPLIES];
 -      struct delayed_work jack_detect_work;
 -      struct delayed_work jd_check_work;
 -      struct mutex calibrate_mutex;
 -
 -      int sysclk;
 -      int sysclk_src;
 -      int lrck[RT5682_AIFS];
 -      int bclk[RT5682_AIFS];
 -      int master[RT5682_AIFS];
 -
 -      int pll_src;
 -      int pll_in;
 -      int pll_out;
 -
 -      int jack_type;
 +      .dai_clk_names[RT5682_DAI_WCLK_IDX] = "rt5682-dai-wclk",
 +      .dai_clk_names[RT5682_DAI_BCLK_IDX] = "rt5682-dai-bclk",
  };
  
  static const struct reg_sequence patch_list[] = {
        {RT5682_HP_IMP_SENS_CTRL_19, 0x1000},
        {RT5682_DAC_ADC_DIG_VOL1, 0xa020},
        {RT5682_I2C_CTRL, 0x000f},
 +      {RT5682_PLL2_INTERNAL, 0x8266},
  };
  
  static const struct reg_default rt5682_reg[] = {
        {0x0148, 0x0000},
        {0x0149, 0x0000},
        {0x0150, 0x79a1},
 -      {0x0151, 0x0000},
 +      {0x0156, 0xaaaa},
        {0x0160, 0x4ec0},
        {0x0161, 0x0080},
        {0x0162, 0x0200},
@@@ -784,27 -805,10 +784,27 @@@ static const struct snd_kcontrol_new rt
  static const struct snd_kcontrol_new rt5682_if1_67_adc_swap_mux =
        SOC_DAPM_ENUM("IF1 67 ADC Swap Mux", rt5682_if1_67_adc_enum);
  
 -static void rt5682_reset(struct regmap *regmap)
 +static const char * const rt5682_dac_select[] = {
 +      "IF1", "SOUND"
 +};
 +
 +static SOC_ENUM_SINGLE_DECL(rt5682_dacl_enum,
 +      RT5682_AD_DA_MIXER, RT5682_DAC1_L_SEL_SFT, rt5682_dac_select);
 +
 +static const struct snd_kcontrol_new rt5682_dac_l_mux =
 +      SOC_DAPM_ENUM("DAC L Mux", rt5682_dacl_enum);
 +
 +static SOC_ENUM_SINGLE_DECL(rt5682_dacr_enum,
 +      RT5682_AD_DA_MIXER, RT5682_DAC1_R_SEL_SFT, rt5682_dac_select);
 +
 +static const struct snd_kcontrol_new rt5682_dac_r_mux =
 +      SOC_DAPM_ENUM("DAC R Mux", rt5682_dacr_enum);
 +
 +static void rt5682_reset(struct rt5682_priv *rt5682)
  {
 -      regmap_write(regmap, RT5682_RESET, 0);
 -      regmap_write(regmap, RT5682_I2C_MODE, 1);
 +      regmap_write(rt5682->regmap, RT5682_RESET, 0);
 +      if (!rt5682->is_sdw)
 +              regmap_write(rt5682->regmap, RT5682_I2C_MODE, 1);
  }
  /**
   * rt5682_sel_asrc_clk_src - select ASRC clock source for a set of filters
@@@ -867,8 -871,6 +867,8 @@@ static int rt5682_button_detect(struct 
  static void rt5682_enable_push_button_irq(struct snd_soc_component *component,
                bool enable)
  {
 +      struct rt5682_priv *rt5682 = snd_soc_component_get_drvdata(component);
 +
        if (enable) {
                snd_soc_component_update_bits(component, RT5682_SAR_IL_CMD_1,
                        RT5682_SAR_BUTT_DET_MASK, RT5682_SAR_BUTT_DET_EN);
                snd_soc_component_update_bits(component, RT5682_4BTN_IL_CMD_2,
                        RT5682_4BTN_IL_MASK | RT5682_4BTN_IL_RST_MASK,
                        RT5682_4BTN_IL_EN | RT5682_4BTN_IL_NOR);
 -              snd_soc_component_update_bits(component, RT5682_IRQ_CTRL_3,
 -                      RT5682_IL_IRQ_MASK, RT5682_IL_IRQ_EN);
 +              if (rt5682->is_sdw)
 +                      snd_soc_component_update_bits(component,
 +                              RT5682_IRQ_CTRL_3,
 +                              RT5682_IL_IRQ_MASK | RT5682_IL_IRQ_TYPE_MASK,
 +                              RT5682_IL_IRQ_EN | RT5682_IL_IRQ_PUL);
 +              else
 +                      snd_soc_component_update_bits(component,
 +                              RT5682_IRQ_CTRL_3, RT5682_IL_IRQ_MASK,
 +                              RT5682_IL_IRQ_EN);
        } else {
                snd_soc_component_update_bits(component, RT5682_IRQ_CTRL_3,
                        RT5682_IL_IRQ_MASK, RT5682_IL_IRQ_DIS);
@@@ -914,7 -909,6 +914,7 @@@ static int rt5682_headset_detect(struc
                int jack_insert)
  {
        struct rt5682_priv *rt5682 = snd_soc_component_get_drvdata(component);
 +      struct snd_soc_dapm_context *dapm = &component->dapm;
        unsigned int val, count;
  
        if (jack_insert) {
                        RT5682_PWR_VREF2 | RT5682_PWR_MB,
                        RT5682_PWR_VREF2 | RT5682_PWR_MB);
                snd_soc_component_update_bits(component,
 -                              RT5682_PWR_ANLG_1, RT5682_PWR_FV2, 0);
 +                      RT5682_PWR_ANLG_1, RT5682_PWR_FV2, 0);
                usleep_range(15000, 20000);
                snd_soc_component_update_bits(component,
 -                              RT5682_PWR_ANLG_1, RT5682_PWR_FV2, RT5682_PWR_FV2);
 +                      RT5682_PWR_ANLG_1, RT5682_PWR_FV2, RT5682_PWR_FV2);
                snd_soc_component_update_bits(component, RT5682_PWR_ANLG_3,
                        RT5682_PWR_CBJ, RT5682_PWR_CBJ);
  
                rt5682_enable_push_button_irq(component, false);
                snd_soc_component_update_bits(component, RT5682_CBJ_CTRL_1,
                        RT5682_TRIG_JD_MASK, RT5682_TRIG_JD_LOW);
 -              snd_soc_component_update_bits(component, RT5682_PWR_ANLG_1,
 -                      RT5682_PWR_VREF2 | RT5682_PWR_MB, 0);
 +              if (snd_soc_dapm_get_pin_status(dapm, "MICBIAS"))
 +                      snd_soc_component_update_bits(component,
 +                              RT5682_PWR_ANLG_1, RT5682_PWR_VREF2, 0);
 +              else
 +                      snd_soc_component_update_bits(component,
 +                              RT5682_PWR_ANLG_1,
 +                              RT5682_PWR_VREF2 | RT5682_PWR_MB, 0);
                snd_soc_component_update_bits(component, RT5682_PWR_ANLG_3,
                        RT5682_PWR_CBJ, 0);
  
@@@ -1010,69 -999,62 +1010,69 @@@ static int rt5682_set_jack_detect(struc
  
        rt5682->hs_jack = hs_jack;
  
 -      if (!hs_jack) {
 -              regmap_update_bits(rt5682->regmap, RT5682_IRQ_CTRL_2,
 -                                 RT5682_JD1_EN_MASK, RT5682_JD1_DIS);
 -              regmap_update_bits(rt5682->regmap, RT5682_RC_CLK_CTRL,
 -                                 RT5682_POW_JDH | RT5682_POW_JDL, 0);
 -              cancel_delayed_work_sync(&rt5682->jack_detect_work);
 -              return 0;
 -      }
 +      if (!rt5682->is_sdw) {
 +              if (!hs_jack) {
 +                      regmap_update_bits(rt5682->regmap, RT5682_IRQ_CTRL_2,
 +                                         RT5682_JD1_EN_MASK, RT5682_JD1_DIS);
 +                      regmap_update_bits(rt5682->regmap, RT5682_RC_CLK_CTRL,
 +                                         RT5682_POW_JDH | RT5682_POW_JDL, 0);
 +                      cancel_delayed_work_sync(&rt5682->jack_detect_work);
 +                      return 0;
 +              }
  
 -      switch (rt5682->pdata.jd_src) {
 -      case RT5682_JD1:
 -              snd_soc_component_update_bits(component, RT5682_CBJ_CTRL_2,
 -                      RT5682_EXT_JD_SRC, RT5682_EXT_JD_SRC_MANUAL);
 -              snd_soc_component_write(component, RT5682_CBJ_CTRL_1, 0xd042);
 -              snd_soc_component_update_bits(component, RT5682_CBJ_CTRL_3,
 -                      RT5682_CBJ_IN_BUF_EN, RT5682_CBJ_IN_BUF_EN);
 -              snd_soc_component_update_bits(component, RT5682_SAR_IL_CMD_1,
 -                      RT5682_SAR_POW_MASK, RT5682_SAR_POW_EN);
 -              regmap_update_bits(rt5682->regmap, RT5682_GPIO_CTRL_1,
 -                      RT5682_GP1_PIN_MASK, RT5682_GP1_PIN_IRQ);
 -              regmap_update_bits(rt5682->regmap, RT5682_RC_CLK_CTRL,
 +              switch (rt5682->pdata.jd_src) {
 +              case RT5682_JD1:
 +                      snd_soc_component_update_bits(component,
 +                              RT5682_CBJ_CTRL_2, RT5682_EXT_JD_SRC,
 +                              RT5682_EXT_JD_SRC_MANUAL);
 +                      snd_soc_component_write(component, RT5682_CBJ_CTRL_1,
 +                              0xd042);
 +                      snd_soc_component_update_bits(component,
 +                              RT5682_CBJ_CTRL_3, RT5682_CBJ_IN_BUF_EN,
 +                              RT5682_CBJ_IN_BUF_EN);
 +                      snd_soc_component_update_bits(component,
 +                              RT5682_SAR_IL_CMD_1, RT5682_SAR_POW_MASK,
 +                              RT5682_SAR_POW_EN);
 +                      regmap_update_bits(rt5682->regmap, RT5682_GPIO_CTRL_1,
 +                              RT5682_GP1_PIN_MASK, RT5682_GP1_PIN_IRQ);
 +                      regmap_update_bits(rt5682->regmap, RT5682_RC_CLK_CTRL,
                                RT5682_POW_IRQ | RT5682_POW_JDH |
                                RT5682_POW_ANA, RT5682_POW_IRQ |
                                RT5682_POW_JDH | RT5682_POW_ANA);
 -              regmap_update_bits(rt5682->regmap, RT5682_PWR_ANLG_2,
 -                      RT5682_PWR_JDH | RT5682_PWR_JDL,
 -                      RT5682_PWR_JDH | RT5682_PWR_JDL);
 -              regmap_update_bits(rt5682->regmap, RT5682_IRQ_CTRL_2,
 -                      RT5682_JD1_EN_MASK | RT5682_JD1_POL_MASK,
 -                      RT5682_JD1_EN | RT5682_JD1_POL_NOR);
 -              regmap_update_bits(rt5682->regmap, RT5682_4BTN_IL_CMD_4,
 -                      0x7f7f, (rt5682->pdata.btndet_delay << 8 |
 -                      rt5682->pdata.btndet_delay));
 -              regmap_update_bits(rt5682->regmap, RT5682_4BTN_IL_CMD_5,
 -                      0x7f7f, (rt5682->pdata.btndet_delay << 8 |
 -                      rt5682->pdata.btndet_delay));
 -              regmap_update_bits(rt5682->regmap, RT5682_4BTN_IL_CMD_6,
 -                      0x7f7f, (rt5682->pdata.btndet_delay << 8 |
 -                      rt5682->pdata.btndet_delay));
 -              regmap_update_bits(rt5682->regmap, RT5682_4BTN_IL_CMD_7,
 -                      0x7f7f, (rt5682->pdata.btndet_delay << 8 |
 -                      rt5682->pdata.btndet_delay));
 -              mod_delayed_work(system_power_efficient_wq,
 -                         &rt5682->jack_detect_work, msecs_to_jiffies(250));
 -              break;
 +                      regmap_update_bits(rt5682->regmap, RT5682_PWR_ANLG_2,
 +                              RT5682_PWR_JDH | RT5682_PWR_JDL,
 +                              RT5682_PWR_JDH | RT5682_PWR_JDL);
 +                      regmap_update_bits(rt5682->regmap, RT5682_IRQ_CTRL_2,
 +                              RT5682_JD1_EN_MASK | RT5682_JD1_POL_MASK,
 +                              RT5682_JD1_EN | RT5682_JD1_POL_NOR);
 +                      regmap_update_bits(rt5682->regmap, RT5682_4BTN_IL_CMD_4,
 +                              0x7f7f, (rt5682->pdata.btndet_delay << 8 |
 +                              rt5682->pdata.btndet_delay));
 +                      regmap_update_bits(rt5682->regmap, RT5682_4BTN_IL_CMD_5,
 +                              0x7f7f, (rt5682->pdata.btndet_delay << 8 |
 +                              rt5682->pdata.btndet_delay));
 +                      regmap_update_bits(rt5682->regmap, RT5682_4BTN_IL_CMD_6,
 +                              0x7f7f, (rt5682->pdata.btndet_delay << 8 |
 +                              rt5682->pdata.btndet_delay));
 +                      regmap_update_bits(rt5682->regmap, RT5682_4BTN_IL_CMD_7,
 +                              0x7f7f, (rt5682->pdata.btndet_delay << 8 |
 +                              rt5682->pdata.btndet_delay));
 +                      mod_delayed_work(system_power_efficient_wq,
 +                                 &rt5682->jack_detect_work,
 +                                      msecs_to_jiffies(250));
 +                      break;
  
 -      case RT5682_JD_NULL:
 -              regmap_update_bits(rt5682->regmap, RT5682_IRQ_CTRL_2,
 -                      RT5682_JD1_EN_MASK, RT5682_JD1_DIS);
 -              regmap_update_bits(rt5682->regmap, RT5682_RC_CLK_CTRL,
 -                              RT5682_POW_JDH | RT5682_POW_JDL, 0);
 -              break;
 +              case RT5682_JD_NULL:
 +                      regmap_update_bits(rt5682->regmap, RT5682_IRQ_CTRL_2,
 +                              RT5682_JD1_EN_MASK, RT5682_JD1_DIS);
 +                      regmap_update_bits(rt5682->regmap, RT5682_RC_CLK_CTRL,
 +                                      RT5682_POW_JDH | RT5682_POW_JDL, 0);
 +                      break;
  
 -      default:
 -              dev_warn(component->dev, "Wrong JD source\n");
 -              break;
 +              default:
 +                      dev_warn(component->dev, "Wrong JD source\n");
 +                      break;
 +              }
        }
  
        return 0;
@@@ -1152,13 -1134,11 +1152,13 @@@ static void rt5682_jack_detect_handler(
                            SND_JACK_BTN_0 | SND_JACK_BTN_1 |
                            SND_JACK_BTN_2 | SND_JACK_BTN_3);
  
 -      if (rt5682->jack_type & (SND_JACK_BTN_0 | SND_JACK_BTN_1 |
 -              SND_JACK_BTN_2 | SND_JACK_BTN_3))
 -              schedule_delayed_work(&rt5682->jd_check_work, 0);
 -      else
 -              cancel_delayed_work_sync(&rt5682->jd_check_work);
 +      if (!rt5682->is_sdw) {
 +              if (rt5682->jack_type & (SND_JACK_BTN_0 | SND_JACK_BTN_1 |
 +                      SND_JACK_BTN_2 | SND_JACK_BTN_3))
 +                      schedule_delayed_work(&rt5682->jd_check_work, 0);
 +              else
 +                      cancel_delayed_work_sync(&rt5682->jd_check_work);
 +      }
  
        mutex_unlock(&rt5682->calibrate_mutex);
  }
  static const struct snd_kcontrol_new rt5682_snd_controls[] = {
        /* DAC Digital Volume */
        SOC_DOUBLE_TLV("DAC1 Playback Volume", RT5682_DAC1_DIG_VOL,
-               RT5682_L_VOL_SFT + 1, RT5682_R_VOL_SFT + 1, 86, 0, dac_vol_tlv),
+               RT5682_L_VOL_SFT + 1, RT5682_R_VOL_SFT + 1, 87, 0, dac_vol_tlv),
  
        /* IN Boost Volume */
        SOC_SINGLE_TLV("CBJ Boost Volume", RT5682_CBJ_BST_CTRL,
@@@ -1252,9 -1232,6 +1252,9 @@@ static int set_filter_clk(struct snd_so
        static const int div_f[] = {1, 2, 3, 4, 6, 8, 12, 16, 24, 32, 48};
        static const int div_o[] = {1, 2, 4, 6, 8, 12, 16, 24, 32, 48};
  
 +      if (rt5682->is_sdw)
 +              return 0;
 +
        val = snd_soc_component_read32(component, RT5682_GPIO_CTRL_1) &
                RT5682_GP4_PIN_MASK;
        if (w->shift == RT5682_PWR_ADC_S1F_BIT &&
@@@ -1301,21 -1278,6 +1301,21 @@@ static int is_sys_clk_from_pll1(struct 
                return 0;
  }
  
 +static int is_sys_clk_from_pll2(struct snd_soc_dapm_widget *w,
 +                       struct snd_soc_dapm_widget *sink)
 +{
 +      unsigned int val;
 +      struct snd_soc_component *component =
 +              snd_soc_dapm_to_component(w->dapm);
 +
 +      val = snd_soc_component_read32(component, RT5682_GLB_CLK);
 +      val &= RT5682_SCLK_SRC_MASK;
 +      if (val == RT5682_SCLK_SRC_PLL2)
 +              return 1;
 +      else
 +              return 0;
 +}
 +
  static int is_using_asrc(struct snd_soc_dapm_widget *w,
                         struct snd_soc_dapm_widget *sink)
  {
@@@ -1554,7 -1516,7 +1554,7 @@@ static int set_dmic_power(struct snd_so
        return 0;
  }
  
 -static int rt5655_set_verf(struct snd_soc_dapm_widget *w,
 +static int rt5682_set_verf(struct snd_soc_dapm_widget *w,
        struct snd_kcontrol *kcontrol, int event)
  {
        struct snd_soc_component *component =
@@@ -1630,12 -1592,9 +1630,12 @@@ static const struct snd_soc_dapm_widge
        SND_SOC_DAPM_SUPPLY("PLL2B", RT5682_PWR_ANLG_3, RT5682_PWR_PLL2B_BIT,
                0, NULL, 0),
        SND_SOC_DAPM_SUPPLY("PLL2F", RT5682_PWR_ANLG_3, RT5682_PWR_PLL2F_BIT,
 -              0, NULL, 0),
 +              0, set_filter_clk, SND_SOC_DAPM_PRE_PMU),
        SND_SOC_DAPM_SUPPLY("Vref1", RT5682_PWR_ANLG_1, RT5682_PWR_VREF1_BIT, 0,
 -              rt5655_set_verf, SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMU),
 +              rt5682_set_verf, SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMU),
 +      SND_SOC_DAPM_SUPPLY("Vref2", RT5682_PWR_ANLG_1, RT5682_PWR_VREF2_BIT, 0,
 +              NULL, 0),
 +      SND_SOC_DAPM_SUPPLY("MICBIAS", SND_SOC_NOPM, 0, 0, NULL, 0),
  
        /* ASRC */
        SND_SOC_DAPM_SUPPLY_S("DAC STO1 ASRC", 1, RT5682_PLL_TRACK_1,
        SND_SOC_DAPM_PGA("IF1 DAC1", SND_SOC_NOPM, 0, 0, NULL, 0),
        SND_SOC_DAPM_PGA("IF1 DAC1 L", SND_SOC_NOPM, 0, 0, NULL, 0),
        SND_SOC_DAPM_PGA("IF1 DAC1 R", SND_SOC_NOPM, 0, 0, NULL, 0),
 +      SND_SOC_DAPM_PGA("SOUND DAC L", SND_SOC_NOPM, 0, 0, NULL, 0),
 +      SND_SOC_DAPM_PGA("SOUND DAC R", SND_SOC_NOPM, 0, 0, NULL, 0),
  
        /* Digital Interface Select */
        SND_SOC_DAPM_MUX("IF1 01 ADC Swap Mux", SND_SOC_NOPM, 0, 0,
        SND_SOC_DAPM_MUX("ADCDAT Mux", SND_SOC_NOPM, 0, 0,
                        &rt5682_adcdat_pin_ctrl),
  
 +      SND_SOC_DAPM_MUX("DAC L Mux", SND_SOC_NOPM, 0, 0,
 +                      &rt5682_dac_l_mux),
 +      SND_SOC_DAPM_MUX("DAC R Mux", SND_SOC_NOPM, 0, 0,
 +                      &rt5682_dac_r_mux),
 +
        /* Audio Interface */
        SND_SOC_DAPM_AIF_OUT("AIF1TX", "AIF1 Capture", 0,
                RT5682_I2S1_SDP, RT5682_SEL_ADCDAT_SFT, 1),
        SND_SOC_DAPM_AIF_OUT("AIF2TX", "AIF2 Capture", 0,
                RT5682_I2S2_SDP, RT5682_I2S2_PIN_CFG_SFT, 1),
        SND_SOC_DAPM_AIF_IN("AIF1RX", "AIF1 Playback", 0, SND_SOC_NOPM, 0, 0),
 +      SND_SOC_DAPM_AIF_IN("SDWRX", "SDW Playback", 0, SND_SOC_NOPM, 0, 0),
 +      SND_SOC_DAPM_AIF_OUT("SDWTX", "SDW Capture", 0, SND_SOC_NOPM, 0, 0),
  
        /* Output Side */
        /* DAC mixer before sound effect  */
  static const struct snd_soc_dapm_route rt5682_dapm_routes[] = {
        /*PLL*/
        {"ADC Stereo1 Filter", NULL, "PLL1", is_sys_clk_from_pll1},
 +      {"ADC Stereo1 Filter", NULL, "PLL2B", is_sys_clk_from_pll2},
 +      {"ADC Stereo1 Filter", NULL, "PLL2F", is_sys_clk_from_pll2},
        {"DAC Stereo1 Filter", NULL, "PLL1", is_sys_clk_from_pll1},
 +      {"DAC Stereo1 Filter", NULL, "PLL2B", is_sys_clk_from_pll2},
 +      {"DAC Stereo1 Filter", NULL, "PLL2F", is_sys_clk_from_pll2},
  
        /*ASRC*/
        {"ADC Stereo1 Filter", NULL, "ADC STO1 ASRC", is_using_asrc},
        {"IF1_ADC Mux", "Slot 2", "IF1 23 ADC Swap Mux"},
        {"IF1_ADC Mux", "Slot 4", "IF1 45 ADC Swap Mux"},
        {"IF1_ADC Mux", "Slot 6", "IF1 67 ADC Swap Mux"},
 -      {"IF1_ADC Mux", NULL, "I2S1"},
        {"ADCDAT Mux", "ADCDAT1", "IF1_ADC Mux"},
 +      {"AIF1TX", NULL, "I2S1"},
        {"AIF1TX", NULL, "ADCDAT Mux"},
        {"IF2 ADC Swap Mux", "L/R", "Stereo1 ADC MIX"},
        {"IF2 ADC Swap Mux", "R/L", "Stereo1 ADC MIX"},
        {"ADCDAT Mux", "ADCDAT2", "IF2 ADC Swap Mux"},
        {"AIF2TX", NULL, "ADCDAT Mux"},
  
 +      {"SDWTX", NULL, "PLL2B"},
 +      {"SDWTX", NULL, "PLL2F"},
 +      {"SDWTX", NULL, "ADCDAT Mux"},
 +
        {"IF1 DAC1 L", NULL, "AIF1RX"},
        {"IF1 DAC1 L", NULL, "I2S1"},
        {"IF1 DAC1 L", NULL, "DAC Stereo1 Filter"},
        {"IF1 DAC1 R", NULL, "I2S1"},
        {"IF1 DAC1 R", NULL, "DAC Stereo1 Filter"},
  
 +      {"SOUND DAC L", NULL, "SDWRX"},
 +      {"SOUND DAC L", NULL, "DAC Stereo1 Filter"},
 +      {"SOUND DAC L", NULL, "PLL2B"},
 +      {"SOUND DAC L", NULL, "PLL2F"},
 +      {"SOUND DAC R", NULL, "SDWRX"},
 +      {"SOUND DAC R", NULL, "DAC Stereo1 Filter"},
 +      {"SOUND DAC R", NULL, "PLL2B"},
 +      {"SOUND DAC R", NULL, "PLL2F"},
 +
 +      {"DAC L Mux", "IF1", "IF1 DAC1 L"},
 +      {"DAC L Mux", "SOUND", "SOUND DAC L"},
 +      {"DAC R Mux", "IF1", "IF1 DAC1 R"},
 +      {"DAC R Mux", "SOUND", "SOUND DAC R"},
 +
        {"DAC1 MIXL", "Stereo ADC Switch", "Stereo1 ADC MIXL"},
 -      {"DAC1 MIXL", "DAC1 Switch", "IF1 DAC1 L"},
 +      {"DAC1 MIXL", "DAC1 Switch", "DAC L Mux"},
        {"DAC1 MIXR", "Stereo ADC Switch", "Stereo1 ADC MIXR"},
 -      {"DAC1 MIXR", "DAC1 Switch", "IF1 DAC1 R"},
 +      {"DAC1 MIXR", "DAC1 Switch", "DAC R Mux"},
  
        {"Stereo1 DAC MIXL", "DAC L1 Switch", "DAC1 MIXL"},
        {"Stereo1 DAC MIXL", "DAC R1 Switch", "DAC1 MIXR"},
@@@ -2105,10 -2033,8 +2105,10 @@@ static int rt5682_hw_params(struct snd_
                        RT5682_I2S1_DL_MASK, len_1);
                if (rt5682->master[RT5682_AIF1]) {
                        snd_soc_component_update_bits(component,
 -                              RT5682_ADDA_CLK_1, RT5682_I2S_M_DIV_MASK,
 -                              pre_div << RT5682_I2S_M_DIV_SFT);
 +                              RT5682_ADDA_CLK_1, RT5682_I2S_M_DIV_MASK |
 +                              RT5682_I2S_CLK_SRC_MASK,
 +                              pre_div << RT5682_I2S_M_DIV_SFT |
 +                              (rt5682->sysclk_src) << RT5682_I2S_CLK_SRC_SFT);
                }
                if (params_channels(params) == 1) /* mono mode */
                        snd_soc_component_update_bits(component,
@@@ -2281,157 -2207,61 +2281,157 @@@ static int rt5682_set_component_pll(str
                unsigned int freq_out)
  {
        struct rt5682_priv *rt5682 = snd_soc_component_get_drvdata(component);
 -      struct rl6231_pll_code pll_code;
 +      struct rl6231_pll_code pll_code, pll2f_code, pll2b_code;
 +      unsigned int pll2_fout1;
        int ret;
  
 -      if (source == rt5682->pll_src && freq_in == rt5682->pll_in &&
 -          freq_out == rt5682->pll_out)
 +      if (source == rt5682->pll_src[pll_id] &&
 +          freq_in == rt5682->pll_in[pll_id] &&
 +          freq_out == rt5682->pll_out[pll_id])
                return 0;
  
        if (!freq_in || !freq_out) {
                dev_dbg(component->dev, "PLL disabled\n");
  
 -              rt5682->pll_in = 0;
 -              rt5682->pll_out = 0;
 +              rt5682->pll_in[pll_id] = 0;
 +              rt5682->pll_out[pll_id] = 0;
                snd_soc_component_update_bits(component, RT5682_GLB_CLK,
                        RT5682_SCLK_SRC_MASK, RT5682_SCLK_SRC_MCLK);
                return 0;
        }
  
 -      switch (source) {
 -      case RT5682_PLL1_S_MCLK:
 -              snd_soc_component_update_bits(component, RT5682_GLB_CLK,
 -                      RT5682_PLL1_SRC_MASK, RT5682_PLL1_SRC_MCLK);
 -              break;
 -      case RT5682_PLL1_S_BCLK1:
 -              snd_soc_component_update_bits(component, RT5682_GLB_CLK,
 -                              RT5682_PLL1_SRC_MASK, RT5682_PLL1_SRC_BCLK1);
 -              break;
 -      default:
 -              dev_err(component->dev, "Unknown PLL Source %d\n", source);
 -              return -EINVAL;
 -      }
 +      if (pll_id == RT5682_PLL2) {
 +              switch (source) {
 +              case RT5682_PLL2_S_MCLK:
 +                      snd_soc_component_update_bits(component,
 +                              RT5682_GLB_CLK, RT5682_PLL2_SRC_MASK,
 +                              RT5682_PLL2_SRC_MCLK);
 +                      break;
 +              default:
 +                      dev_err(component->dev, "Unknown PLL2 Source %d\n",
 +                              source);
 +                      return -EINVAL;
 +              }
  
 -      ret = rl6231_pll_calc(freq_in, freq_out, &pll_code);
 -      if (ret < 0) {
 -              dev_err(component->dev, "Unsupport input clock %d\n", freq_in);
 -              return ret;
 +              /**
 +               * PLL2 concatenates 2 PLL units.
 +               * We suggest the Fout of the front PLL is 3.84MHz.
 +               */
 +              pll2_fout1 = 3840000;
 +              ret = rl6231_pll_calc(freq_in, pll2_fout1, &pll2f_code);
 +              if (ret < 0) {
 +                      dev_err(component->dev, "Unsupport input clock %d\n",
 +                              freq_in);
 +                      return ret;
 +              }
 +              dev_dbg(component->dev, "PLL2F: fin=%d fout=%d bypass=%d m=%d n=%d k=%d\n",
 +                      freq_in, pll2_fout1,
 +                      pll2f_code.m_bp,
 +                      (pll2f_code.m_bp ? 0 : pll2f_code.m_code),
 +                      pll2f_code.n_code, pll2f_code.k_code);
 +
 +              ret = rl6231_pll_calc(pll2_fout1, freq_out, &pll2b_code);
 +              if (ret < 0) {
 +                      dev_err(component->dev, "Unsupport input clock %d\n",
 +                              pll2_fout1);
 +                      return ret;
 +              }
 +              dev_dbg(component->dev, "PLL2B: fin=%d fout=%d bypass=%d m=%d n=%d k=%d\n",
 +                      pll2_fout1, freq_out,
 +                      pll2b_code.m_bp,
 +                      (pll2b_code.m_bp ? 0 : pll2b_code.m_code),
 +                      pll2b_code.n_code, pll2b_code.k_code);
 +
 +              snd_soc_component_write(component, RT5682_PLL2_CTRL_1,
 +                      pll2f_code.k_code << RT5682_PLL2F_K_SFT |
 +                      pll2b_code.k_code << RT5682_PLL2B_K_SFT |
 +                      pll2b_code.m_code);
 +              snd_soc_component_write(component, RT5682_PLL2_CTRL_2,
 +                      pll2f_code.m_code << RT5682_PLL2F_M_SFT |
 +                      pll2b_code.n_code);
 +              snd_soc_component_write(component, RT5682_PLL2_CTRL_3,
 +                      pll2f_code.n_code << RT5682_PLL2F_N_SFT);
 +              snd_soc_component_update_bits(component, RT5682_PLL2_CTRL_4,
 +                      RT5682_PLL2B_M_BP_MASK | RT5682_PLL2F_M_BP_MASK | 0xf,
 +                      (pll2b_code.m_bp ? 1 : 0) << RT5682_PLL2B_M_BP_SFT |
 +                      (pll2f_code.m_bp ? 1 : 0) << RT5682_PLL2F_M_BP_SFT |
 +                      0xf);
 +      } else {
 +              switch (source) {
 +              case RT5682_PLL1_S_MCLK:
 +                      snd_soc_component_update_bits(component,
 +                              RT5682_GLB_CLK, RT5682_PLL1_SRC_MASK,
 +                              RT5682_PLL1_SRC_MCLK);
 +                      break;
 +              case RT5682_PLL1_S_BCLK1:
 +                      snd_soc_component_update_bits(component,
 +                              RT5682_GLB_CLK, RT5682_PLL1_SRC_MASK,
 +                              RT5682_PLL1_SRC_BCLK1);
 +                      break;
 +              default:
 +                      dev_err(component->dev, "Unknown PLL1 Source %d\n",
 +                              source);
 +                      return -EINVAL;
 +              }
 +
 +              ret = rl6231_pll_calc(freq_in, freq_out, &pll_code);
 +              if (ret < 0) {
 +                      dev_err(component->dev, "Unsupport input clock %d\n",
 +                              freq_in);
 +                      return ret;
 +              }
 +
 +              dev_dbg(component->dev, "bypass=%d m=%d n=%d k=%d\n",
 +                      pll_code.m_bp, (pll_code.m_bp ? 0 : pll_code.m_code),
 +                      pll_code.n_code, pll_code.k_code);
 +
 +              snd_soc_component_write(component, RT5682_PLL_CTRL_1,
 +                      pll_code.n_code << RT5682_PLL_N_SFT | pll_code.k_code);
 +              snd_soc_component_write(component, RT5682_PLL_CTRL_2,
 +                  (pll_code.m_bp ? 0 : pll_code.m_code) << RT5682_PLL_M_SFT |
 +                  pll_code.m_bp << RT5682_PLL_M_BP_SFT | RT5682_PLL_RST);
        }
  
 -      dev_dbg(component->dev, "bypass=%d m=%d n=%d k=%d\n",
 -              pll_code.m_bp, (pll_code.m_bp ? 0 : pll_code.m_code),
 -              pll_code.n_code, pll_code.k_code);
 +      rt5682->pll_in[pll_id] = freq_in;
 +      rt5682->pll_out[pll_id] = freq_out;
 +      rt5682->pll_src[pll_id] = source;
 +
 +      return 0;
 +}
 +
 +static int rt5682_set_bclk1_ratio(struct snd_soc_dai *dai, unsigned int ratio)
 +{
 +      struct snd_soc_component *component = dai->component;
 +      struct rt5682_priv *rt5682 = snd_soc_component_get_drvdata(component);
  
 -      snd_soc_component_write(component, RT5682_PLL_CTRL_1,
 -              pll_code.n_code << RT5682_PLL_N_SFT | pll_code.k_code);
 -      snd_soc_component_write(component, RT5682_PLL_CTRL_2,
 -              (pll_code.m_bp ? 0 : pll_code.m_code) << RT5682_PLL_M_SFT |
 -              pll_code.m_bp << RT5682_PLL_M_BP_SFT | RT5682_PLL_RST);
 +      rt5682->bclk[dai->id] = ratio;
  
 -      rt5682->pll_in = freq_in;
 -      rt5682->pll_out = freq_out;
 -      rt5682->pll_src = source;
 +      switch (ratio) {
 +      case 256:
 +              snd_soc_component_update_bits(component, RT5682_TDM_TCON_CTRL,
 +                      RT5682_TDM_BCLK_MS1_MASK, RT5682_TDM_BCLK_MS1_256);
 +              break;
 +      case 128:
 +              snd_soc_component_update_bits(component, RT5682_TDM_TCON_CTRL,
 +                      RT5682_TDM_BCLK_MS1_MASK, RT5682_TDM_BCLK_MS1_128);
 +              break;
 +      case 64:
 +              snd_soc_component_update_bits(component, RT5682_TDM_TCON_CTRL,
 +                      RT5682_TDM_BCLK_MS1_MASK, RT5682_TDM_BCLK_MS1_64);
 +              break;
 +      case 32:
 +              snd_soc_component_update_bits(component, RT5682_TDM_TCON_CTRL,
 +                      RT5682_TDM_BCLK_MS1_MASK, RT5682_TDM_BCLK_MS1_32);
 +              break;
 +      default:
 +              dev_err(dai->dev, "Invalid bclk1 ratio %d\n", ratio);
 +              return -EINVAL;
 +      }
  
        return 0;
  }
  
 -static int rt5682_set_bclk_ratio(struct snd_soc_dai *dai, unsigned int ratio)
 +static int rt5682_set_bclk2_ratio(struct snd_soc_dai *dai, unsigned int ratio)
  {
        struct snd_soc_component *component = dai->component;
        struct rt5682_priv *rt5682 = snd_soc_component_get_drvdata(component);
                        RT5682_I2S2_BCLK_MS2_32);
                break;
        default:
 -              dev_err(dai->dev, "Invalid bclk ratio %d\n", ratio);
 +              dev_err(dai->dev, "Invalid bclk2 ratio %d\n", ratio);
                return -EINVAL;
        }
  
@@@ -2489,393 -2319,12 +2489,393 @@@ static int rt5682_set_bias_level(struc
        return 0;
  }
  
 +#ifdef CONFIG_COMMON_CLK
 +#define CLK_PLL2_FIN 48000000
 +#define CLK_PLL2_FOUT 24576000
 +#define CLK_48 48000
 +
 +static bool rt5682_clk_check(struct rt5682_priv *rt5682)
 +{
 +      if (!rt5682->master[RT5682_AIF1]) {
 +              dev_err(rt5682->component->dev, "sysclk/dai not set correctly\n");
 +              return false;
 +      }
 +      return true;
 +}
 +
 +static int rt5682_wclk_prepare(struct clk_hw *hw)
 +{
 +      struct rt5682_priv *rt5682 =
 +              container_of(hw, struct rt5682_priv,
 +                           dai_clks_hw[RT5682_DAI_WCLK_IDX]);
 +      struct snd_soc_component *component = rt5682->component;
 +      struct snd_soc_dapm_context *dapm =
 +                      snd_soc_component_get_dapm(component);
 +
 +      if (!rt5682_clk_check(rt5682))
 +              return -EINVAL;
 +
 +      snd_soc_dapm_mutex_lock(dapm);
 +
 +      snd_soc_dapm_force_enable_pin_unlocked(dapm, "MICBIAS");
 +      snd_soc_component_update_bits(component, RT5682_PWR_ANLG_1,
 +                              RT5682_PWR_MB, RT5682_PWR_MB);
 +      snd_soc_dapm_force_enable_pin_unlocked(dapm, "I2S1");
 +      snd_soc_dapm_force_enable_pin_unlocked(dapm, "PLL2F");
 +      snd_soc_dapm_force_enable_pin_unlocked(dapm, "PLL2B");
 +      snd_soc_dapm_sync_unlocked(dapm);
 +
 +      snd_soc_dapm_mutex_unlock(dapm);
 +
 +      return 0;
 +}
 +
 +static void rt5682_wclk_unprepare(struct clk_hw *hw)
 +{
 +      struct rt5682_priv *rt5682 =
 +              container_of(hw, struct rt5682_priv,
 +                           dai_clks_hw[RT5682_DAI_WCLK_IDX]);
 +      struct snd_soc_component *component = rt5682->component;
 +      struct snd_soc_dapm_context *dapm =
 +                      snd_soc_component_get_dapm(component);
 +
 +      if (!rt5682_clk_check(rt5682))
 +              return;
 +
 +      snd_soc_dapm_mutex_lock(dapm);
 +
 +      snd_soc_dapm_disable_pin_unlocked(dapm, "MICBIAS");
 +      if (!rt5682->jack_type)
 +              snd_soc_component_update_bits(component, RT5682_PWR_ANLG_1,
 +                              RT5682_PWR_MB, 0);
 +      snd_soc_dapm_disable_pin_unlocked(dapm, "I2S1");
 +      snd_soc_dapm_disable_pin_unlocked(dapm, "PLL2F");
 +      snd_soc_dapm_disable_pin_unlocked(dapm, "PLL2B");
 +      snd_soc_dapm_sync_unlocked(dapm);
 +
 +      snd_soc_dapm_mutex_unlock(dapm);
 +}
 +
 +static unsigned long rt5682_wclk_recalc_rate(struct clk_hw *hw,
 +                                           unsigned long parent_rate)
 +{
 +      struct rt5682_priv *rt5682 =
 +              container_of(hw, struct rt5682_priv,
 +                           dai_clks_hw[RT5682_DAI_WCLK_IDX]);
 +
 +      if (!rt5682_clk_check(rt5682))
 +              return 0;
 +      /*
 +       * Only accept to set wclk rate to 48kHz temporarily.
 +       */
 +      return CLK_48;
 +}
 +
 +static long rt5682_wclk_round_rate(struct clk_hw *hw, unsigned long rate,
 +                                 unsigned long *parent_rate)
 +{
 +      struct rt5682_priv *rt5682 =
 +              container_of(hw, struct rt5682_priv,
 +                           dai_clks_hw[RT5682_DAI_WCLK_IDX]);
 +
 +      if (!rt5682_clk_check(rt5682))
 +              return -EINVAL;
 +      /*
 +       * Only accept to set wclk rate to 48kHz temporarily.
 +       */
 +      return CLK_48;
 +}
 +
 +static int rt5682_wclk_set_rate(struct clk_hw *hw, unsigned long rate,
 +                              unsigned long parent_rate)
 +{
 +      struct rt5682_priv *rt5682 =
 +              container_of(hw, struct rt5682_priv,
 +                           dai_clks_hw[RT5682_DAI_WCLK_IDX]);
 +      struct snd_soc_component *component = rt5682->component;
 +      struct clk *parent_clk;
 +      const char * const clk_name = __clk_get_name(hw->clk);
 +      int pre_div;
 +
 +      if (!rt5682_clk_check(rt5682))
 +              return -EINVAL;
 +
 +      /*
 +       * Whether the wclk's parent clk (mclk) exists or not, please ensure
 +       * it is fixed or set to 48MHz before setting wclk rate. It's a
 +       * temporary limitation. Only accept 48MHz clk as the clk provider.
 +       *
 +       * It will set the codec anyway by assuming mclk is 48MHz.
 +       */
 +      parent_clk = clk_get_parent(hw->clk);
 +      if (!parent_clk)
 +              dev_warn(component->dev,
 +                      "Parent mclk of wclk not acquired in driver. Please ensure mclk was provided as %d Hz.\n",
 +                      CLK_PLL2_FIN);
 +
 +      if (parent_rate != CLK_PLL2_FIN)
 +              dev_warn(component->dev, "clk %s only support %d Hz input\n",
 +                      clk_name, CLK_PLL2_FIN);
 +
 +      /*
 +       * It's a temporary limitation. Only accept to set wclk rate to 48kHz.
 +       * It will force wclk to 48kHz even it's not.
 +       */
 +      if (rate != CLK_48) {
 +              dev_warn(component->dev, "clk %s only support %d Hz output\n",
 +                      clk_name, CLK_48);
 +              rate = CLK_48;
 +      }
 +
 +      /*
 +       * To achieve the rate conversion from 48MHz to 48kHz, PLL2 is needed.
 +       */
 +      rt5682_set_component_pll(component, RT5682_PLL2, RT5682_PLL2_S_MCLK,
 +              CLK_PLL2_FIN, CLK_PLL2_FOUT);
 +
 +      rt5682_set_component_sysclk(component, RT5682_SCLK_S_PLL2, 0,
 +              CLK_PLL2_FOUT, SND_SOC_CLOCK_IN);
 +
 +      pre_div = rl6231_get_clk_info(rt5682->sysclk, rate);
 +
 +      snd_soc_component_update_bits(component, RT5682_ADDA_CLK_1,
 +              RT5682_I2S_M_DIV_MASK | RT5682_I2S_CLK_SRC_MASK,
 +              pre_div << RT5682_I2S_M_DIV_SFT |
 +              (rt5682->sysclk_src) << RT5682_I2S_CLK_SRC_SFT);
 +
 +      return 0;
 +}
 +
 +static unsigned long rt5682_bclk_recalc_rate(struct clk_hw *hw,
 +                                           unsigned long parent_rate)
 +{
 +      struct rt5682_priv *rt5682 =
 +              container_of(hw, struct rt5682_priv,
 +                           dai_clks_hw[RT5682_DAI_BCLK_IDX]);
 +      struct snd_soc_component *component = rt5682->component;
 +      unsigned int bclks_per_wclk;
 +
 +      snd_soc_component_read(component, RT5682_TDM_TCON_CTRL,
 +                              &bclks_per_wclk);
 +
 +      switch (bclks_per_wclk & RT5682_TDM_BCLK_MS1_MASK) {
 +      case RT5682_TDM_BCLK_MS1_256:
 +              return parent_rate * 256;
 +      case RT5682_TDM_BCLK_MS1_128:
 +              return parent_rate * 128;
 +      case RT5682_TDM_BCLK_MS1_64:
 +              return parent_rate * 64;
 +      case RT5682_TDM_BCLK_MS1_32:
 +              return parent_rate * 32;
 +      default:
 +              return 0;
 +      }
 +}
 +
 +static unsigned long rt5682_bclk_get_factor(unsigned long rate,
 +                                          unsigned long parent_rate)
 +{
 +      unsigned long factor;
 +
 +      factor = rate / parent_rate;
 +      if (factor < 64)
 +              return 32;
 +      else if (factor < 128)
 +              return 64;
 +      else if (factor < 256)
 +              return 128;
 +      else
 +              return 256;
 +}
 +
 +static long rt5682_bclk_round_rate(struct clk_hw *hw, unsigned long rate,
 +                                 unsigned long *parent_rate)
 +{
 +      struct rt5682_priv *rt5682 =
 +              container_of(hw, struct rt5682_priv,
 +                           dai_clks_hw[RT5682_DAI_BCLK_IDX]);
 +      unsigned long factor;
 +
 +      if (!*parent_rate || !rt5682_clk_check(rt5682))
 +              return -EINVAL;
 +
 +      /*
 +       * BCLK rates are set as a multiplier of WCLK in HW.
 +       * We don't allow changing the parent WCLK. We just do
 +       * some rounding down based on the parent WCLK rate
 +       * and find the appropriate multiplier of BCLK to
 +       * get the rounded down BCLK value.
 +       */
 +      factor = rt5682_bclk_get_factor(rate, *parent_rate);
 +
 +      return *parent_rate * factor;
 +}
 +
 +static int rt5682_bclk_set_rate(struct clk_hw *hw, unsigned long rate,
 +                              unsigned long parent_rate)
 +{
 +      struct rt5682_priv *rt5682 =
 +              container_of(hw, struct rt5682_priv,
 +                           dai_clks_hw[RT5682_DAI_BCLK_IDX]);
 +      struct snd_soc_component *component = rt5682->component;
 +      struct snd_soc_dai *dai = NULL;
 +      unsigned long factor;
 +
 +      if (!rt5682_clk_check(rt5682))
 +              return -EINVAL;
 +
 +      factor = rt5682_bclk_get_factor(rate, parent_rate);
 +
 +      for_each_component_dais(component, dai)
 +              if (dai->id == RT5682_AIF1)
 +                      break;
 +      if (!dai) {
 +              dev_err(component->dev, "dai %d not found in component\n",
 +                      RT5682_AIF1);
 +              return -ENODEV;
 +      }
 +
 +      return rt5682_set_bclk1_ratio(dai, factor);
 +}
 +
 +static const struct clk_ops rt5682_dai_clk_ops[RT5682_DAI_NUM_CLKS] = {
 +      [RT5682_DAI_WCLK_IDX] = {
 +              .prepare = rt5682_wclk_prepare,
 +              .unprepare = rt5682_wclk_unprepare,
 +              .recalc_rate = rt5682_wclk_recalc_rate,
 +              .round_rate = rt5682_wclk_round_rate,
 +              .set_rate = rt5682_wclk_set_rate,
 +      },
 +      [RT5682_DAI_BCLK_IDX] = {
 +              .recalc_rate = rt5682_bclk_recalc_rate,
 +              .round_rate = rt5682_bclk_round_rate,
 +              .set_rate = rt5682_bclk_set_rate,
 +      },
 +};
 +
 +static int rt5682_register_dai_clks(struct snd_soc_component *component)
 +{
 +      struct device *dev = component->dev;
 +      struct rt5682_priv *rt5682 = snd_soc_component_get_drvdata(component);
 +      struct rt5682_platform_data *pdata = &rt5682->pdata;
 +      struct clk_init_data init;
 +      struct clk *dai_clk;
 +      struct clk_lookup *dai_clk_lookup;
 +      struct clk_hw *dai_clk_hw;
 +      const char *parent_name;
 +      int i, ret;
 +
 +      for (i = 0; i < RT5682_DAI_NUM_CLKS; ++i) {
 +              dai_clk_hw = &rt5682->dai_clks_hw[i];
 +
 +              switch (i) {
 +              case RT5682_DAI_WCLK_IDX:
 +                      /* Make MCLK the parent of WCLK */
 +                      if (rt5682->mclk) {
 +                              parent_name = __clk_get_name(rt5682->mclk);
 +                              init.parent_names = &parent_name;
 +                              init.num_parents = 1;
 +                      } else {
 +                              init.parent_names = NULL;
 +                              init.num_parents = 0;
 +                      }
 +                      break;
 +              case RT5682_DAI_BCLK_IDX:
 +                      /* Make WCLK the parent of BCLK */
 +                      parent_name = __clk_get_name(
 +                              rt5682->dai_clks[RT5682_DAI_WCLK_IDX]);
 +                      init.parent_names = &parent_name;
 +                      init.num_parents = 1;
 +                      break;
 +              default:
 +                      dev_err(dev, "Invalid clock index\n");
 +                      ret = -EINVAL;
 +                      goto err;
 +              }
 +
 +              init.name = pdata->dai_clk_names[i];
 +              init.ops = &rt5682_dai_clk_ops[i];
 +              init.flags = CLK_GET_RATE_NOCACHE | CLK_SET_RATE_GATE;
 +              dai_clk_hw->init = &init;
 +
 +              dai_clk = devm_clk_register(dev, dai_clk_hw);
 +              if (IS_ERR(dai_clk)) {
 +                      dev_warn(dev, "Failed to register %s: %ld\n",
 +                               init.name, PTR_ERR(dai_clk));
 +                      ret = PTR_ERR(dai_clk);
 +                      goto err;
 +              }
 +              rt5682->dai_clks[i] = dai_clk;
 +
 +              if (dev->of_node) {
 +                      devm_of_clk_add_hw_provider(dev, of_clk_hw_simple_get,
 +                                                  dai_clk_hw);
 +              } else {
 +                      dai_clk_lookup = clkdev_create(dai_clk, init.name,
 +                                                     "%s", dev_name(dev));
 +                      if (!dai_clk_lookup) {
 +                              ret = -ENOMEM;
 +                              goto err;
 +                      } else {
 +                              rt5682->dai_clks_lookup[i] = dai_clk_lookup;
 +                      }
 +              }
 +      }
 +
 +      return 0;
 +
 +err:
 +      do {
 +              if (rt5682->dai_clks_lookup[i])
 +                      clkdev_drop(rt5682->dai_clks_lookup[i]);
 +      } while (i-- > 0);
 +
 +      return ret;
 +}
 +#endif /* CONFIG_COMMON_CLK */
 +
  static int rt5682_probe(struct snd_soc_component *component)
  {
        struct rt5682_priv *rt5682 = snd_soc_component_get_drvdata(component);
 +      struct sdw_slave *slave;
 +      unsigned long time;
  
 +#ifdef CONFIG_COMMON_CLK
 +      int ret;
 +#endif
        rt5682->component = component;
  
 +#ifdef CONFIG_COMMON_CLK
 +      /* Check if MCLK provided */
 +      rt5682->mclk = devm_clk_get(component->dev, "mclk");
 +      if (IS_ERR(rt5682->mclk)) {
 +              if (PTR_ERR(rt5682->mclk) != -ENOENT) {
 +                      ret = PTR_ERR(rt5682->mclk);
 +                      return ret;
 +              }
 +              rt5682->mclk = NULL;
 +      }
 +
 +      /* Register CCF DAI clock control */
 +      ret = rt5682_register_dai_clks(component);
 +      if (ret)
 +              return ret;
 +
 +      /* Initial setup for CCF */
 +      rt5682->lrck[RT5682_AIF1] = CLK_48;
 +#endif
 +
 +      if (rt5682->is_sdw) {
 +              slave = rt5682->slave;
 +              time = wait_for_completion_timeout(
 +                      &slave->initialization_complete,
 +                      msecs_to_jiffies(RT5682_PROBE_TIMEOUT));
 +              if (!time) {
 +                      dev_err(&slave->dev, "Initialization not complete, timed out\n");
 +                      return -ETIMEDOUT;
 +              }
 +      }
 +
        return 0;
  }
  
@@@ -2883,16 -2332,7 +2883,16 @@@ static void rt5682_remove(struct snd_so
  {
        struct rt5682_priv *rt5682 = snd_soc_component_get_drvdata(component);
  
 -      rt5682_reset(rt5682->regmap);
 +#ifdef CONFIG_COMMON_CLK
 +      int i;
 +
 +      for (i = RT5682_DAI_NUM_CLKS - 1; i >= 0; --i) {
 +              if (rt5682->dai_clks_lookup[i])
 +                      clkdev_drop(rt5682->dai_clks_lookup[i]);
 +      }
 +#endif
 +
 +      rt5682_reset(rt5682);
  }
  
  #ifdef CONFIG_PM
@@@ -2929,202 -2369,13 +2929,202 @@@ static const struct snd_soc_dai_ops rt5
        .hw_params = rt5682_hw_params,
        .set_fmt = rt5682_set_dai_fmt,
        .set_tdm_slot = rt5682_set_tdm_slot,
 +      .set_bclk_ratio = rt5682_set_bclk1_ratio,
  };
  
  static const struct snd_soc_dai_ops rt5682_aif2_dai_ops = {
        .hw_params = rt5682_hw_params,
        .set_fmt = rt5682_set_dai_fmt,
 -      .set_bclk_ratio = rt5682_set_bclk_ratio,
 +      .set_bclk_ratio = rt5682_set_bclk2_ratio,
 +};
 +
 +#if IS_ENABLED(CONFIG_SND_SOC_RT5682_SDW)
 +struct sdw_stream_data {
 +      struct sdw_stream_runtime *sdw_stream;
 +};
 +
 +static int rt5682_set_sdw_stream(struct snd_soc_dai *dai, void *sdw_stream,
 +                              int direction)
 +{
 +      struct sdw_stream_data *stream;
 +
 +      stream = kzalloc(sizeof(*stream), GFP_KERNEL);
 +      if (!stream)
 +              return -ENOMEM;
 +
 +      stream->sdw_stream = (struct sdw_stream_runtime *)sdw_stream;
 +
 +      /* Use tx_mask or rx_mask to configure stream tag and set dma_data */
 +      if (direction == SNDRV_PCM_STREAM_PLAYBACK)
 +              dai->playback_dma_data = stream;
 +      else
 +              dai->capture_dma_data = stream;
 +
 +      return 0;
 +}
 +
 +static void rt5682_sdw_shutdown(struct snd_pcm_substream *substream,
 +                              struct snd_soc_dai *dai)
 +{
 +      struct sdw_stream_data *stream;
 +
 +      stream = snd_soc_dai_get_dma_data(dai, substream);
 +      snd_soc_dai_set_dma_data(dai, substream, NULL);
 +      kfree(stream);
 +}
 +
 +static int rt5682_sdw_hw_params(struct snd_pcm_substream *substream,
 +                              struct snd_pcm_hw_params *params,
 +                              struct snd_soc_dai *dai)
 +{
 +      struct snd_soc_component *component = dai->component;
 +      struct rt5682_priv *rt5682 = snd_soc_component_get_drvdata(component);
 +      struct sdw_stream_config stream_config;
 +      struct sdw_port_config port_config;
 +      enum sdw_data_direction direction;
 +      struct sdw_stream_data *stream;
 +      int retval, port, num_channels;
 +      unsigned int val_p = 0, val_c = 0, osr_p = 0, osr_c = 0;
 +
 +      dev_dbg(dai->dev, "%s %s", __func__, dai->name);
 +      stream = snd_soc_dai_get_dma_data(dai, substream);
 +
 +      if (!stream)
 +              return -ENOMEM;
 +
 +      if (!rt5682->slave)
 +              return -EINVAL;
 +
 +      /* SoundWire specific configuration */
 +      if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
 +              direction = SDW_DATA_DIR_RX;
 +              port = 1;
 +      } else {
 +              direction = SDW_DATA_DIR_TX;
 +              port = 2;
 +      }
 +
 +      stream_config.frame_rate = params_rate(params);
 +      stream_config.ch_count = params_channels(params);
 +      stream_config.bps = snd_pcm_format_width(params_format(params));
 +      stream_config.direction = direction;
 +
 +      num_channels = params_channels(params);
 +      port_config.ch_mask = (1 << (num_channels)) - 1;
 +      port_config.num = port;
 +
 +      retval = sdw_stream_add_slave(rt5682->slave, &stream_config,
 +                                    &port_config, 1, stream->sdw_stream);
 +      if (retval) {
 +              dev_err(dai->dev, "Unable to configure port\n");
 +              return retval;
 +      }
 +
 +      switch (params_rate(params)) {
 +      case 48000:
 +              val_p = RT5682_SDW_REF_1_48K;
 +              val_c = RT5682_SDW_REF_2_48K;
 +              break;
 +      case 96000:
 +              val_p = RT5682_SDW_REF_1_96K;
 +              val_c = RT5682_SDW_REF_2_96K;
 +              break;
 +      case 192000:
 +              val_p = RT5682_SDW_REF_1_192K;
 +              val_c = RT5682_SDW_REF_2_192K;
 +              break;
 +      case 32000:
 +              val_p = RT5682_SDW_REF_1_32K;
 +              val_c = RT5682_SDW_REF_2_32K;
 +              break;
 +      case 24000:
 +              val_p = RT5682_SDW_REF_1_24K;
 +              val_c = RT5682_SDW_REF_2_24K;
 +              break;
 +      case 16000:
 +              val_p = RT5682_SDW_REF_1_16K;
 +              val_c = RT5682_SDW_REF_2_16K;
 +              break;
 +      case 12000:
 +              val_p = RT5682_SDW_REF_1_12K;
 +              val_c = RT5682_SDW_REF_2_12K;
 +              break;
 +      case 8000:
 +              val_p = RT5682_SDW_REF_1_8K;
 +              val_c = RT5682_SDW_REF_2_8K;
 +              break;
 +      case 44100:
 +              val_p = RT5682_SDW_REF_1_44K;
 +              val_c = RT5682_SDW_REF_2_44K;
 +              break;
 +      case 88200:
 +              val_p = RT5682_SDW_REF_1_88K;
 +              val_c = RT5682_SDW_REF_2_88K;
 +              break;
 +      case 176400:
 +              val_p = RT5682_SDW_REF_1_176K;
 +              val_c = RT5682_SDW_REF_2_176K;
 +              break;
 +      case 22050:
 +              val_p = RT5682_SDW_REF_1_22K;
 +              val_c = RT5682_SDW_REF_2_22K;
 +              break;
 +      case 11025:
 +              val_p = RT5682_SDW_REF_1_11K;
 +              val_c = RT5682_SDW_REF_2_11K;
 +              break;
 +      default:
 +              return -EINVAL;
 +      }
 +
 +      if (params_rate(params) <= 48000) {
 +              osr_p = RT5682_DAC_OSR_D_8;
 +              osr_c = RT5682_ADC_OSR_D_8;
 +      } else if (params_rate(params) <= 96000) {
 +              osr_p = RT5682_DAC_OSR_D_4;
 +              osr_c = RT5682_ADC_OSR_D_4;
 +      } else {
 +              osr_p = RT5682_DAC_OSR_D_2;
 +              osr_c = RT5682_ADC_OSR_D_2;
 +      }
 +
 +      if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
 +              regmap_update_bits(rt5682->regmap, RT5682_SDW_REF_CLK,
 +                      RT5682_SDW_REF_1_MASK, val_p);
 +              regmap_update_bits(rt5682->regmap, RT5682_ADDA_CLK_1,
 +                      RT5682_DAC_OSR_MASK, osr_p);
 +      } else {
 +              regmap_update_bits(rt5682->regmap, RT5682_SDW_REF_CLK,
 +                      RT5682_SDW_REF_2_MASK, val_c);
 +              regmap_update_bits(rt5682->regmap, RT5682_ADDA_CLK_1,
 +                      RT5682_ADC_OSR_MASK, osr_c);
 +      }
 +
 +      return retval;
 +}
 +
 +static int rt5682_sdw_hw_free(struct snd_pcm_substream *substream,
 +                              struct snd_soc_dai *dai)
 +{
 +      struct snd_soc_component *component = dai->component;
 +      struct rt5682_priv *rt5682 = snd_soc_component_get_drvdata(component);
 +      struct sdw_stream_data *stream =
 +              snd_soc_dai_get_dma_data(dai, substream);
 +
 +      if (!rt5682->slave)
 +              return -EINVAL;
 +
 +      sdw_stream_remove_slave(rt5682->slave, stream->sdw_stream);
 +      return 0;
 +}
 +
 +static struct snd_soc_dai_ops rt5682_sdw_ops = {
 +      .hw_params      = rt5682_sdw_hw_params,
 +      .hw_free        = rt5682_sdw_hw_free,
 +      .set_sdw_stream = rt5682_set_sdw_stream,
 +      .shutdown       = rt5682_sdw_shutdown,
  };
 +#endif
  
  static struct snd_soc_dai_driver rt5682_dai[] = {
        {
                },
                .ops = &rt5682_aif2_dai_ops,
        },
 +#if IS_ENABLED(CONFIG_SND_SOC_RT5682_SDW)
 +      {
 +              .name = "rt5682-sdw",
 +              .id = RT5682_SDW,
 +              .playback = {
 +                      .stream_name = "SDW Playback",
 +                      .channels_min = 1,
 +                      .channels_max = 2,
 +                      .rates = RT5682_STEREO_RATES,
 +                      .formats = RT5682_FORMATS,
 +              },
 +              .capture = {
 +                      .stream_name = "SDW Capture",
 +                      .channels_min = 1,
 +                      .channels_max = 2,
 +                      .rates = RT5682_STEREO_RATES,
 +                      .formats = RT5682_FORMATS,
 +              },
 +              .ops = &rt5682_sdw_ops,
 +      },
 +#endif
  };
  
  static const struct snd_soc_component_driver soc_component_dev_rt5682 = {
@@@ -3235,13 -2465,6 +3235,13 @@@ static int rt5682_parse_dt(struct rt568
        rt5682->pdata.ldo1_en = of_get_named_gpio(dev->of_node,
                "realtek,ldo1-en-gpios", 0);
  
 +      if (device_property_read_string_array(dev, "clock-output-names",
 +                                            rt5682->pdata.dai_clk_names,
 +                                            RT5682_DAI_NUM_CLKS) < 0)
 +              dev_warn(dev, "Using default DAI clk names: %s, %s\n",
 +                       rt5682->pdata.dai_clk_names[RT5682_DAI_WCLK_IDX],
 +                       rt5682->pdata.dai_clk_names[RT5682_DAI_BCLK_IDX]);
 +
        return 0;
  }
  
@@@ -3251,7 -2474,7 +3251,7 @@@ static void rt5682_calibrate(struct rt5
  
        mutex_lock(&rt5682->calibrate_mutex);
  
 -      rt5682_reset(rt5682->regmap);
 +      rt5682_reset(rt5682);
        regmap_write(rt5682->regmap, RT5682_I2C_CTRL, 0x000f);
        regmap_write(rt5682->regmap, RT5682_PWR_ANLG_1, 0xa2af);
        usleep_range(15000, 20000);
  
  }
  
 +#if IS_ENABLED(CONFIG_SND_SOC_RT5682_SDW)
 +static int rt5682_sdw_read(void *context, unsigned int reg, unsigned int *val)
 +{
 +      struct device *dev = context;
 +      struct rt5682_priv *rt5682 = dev_get_drvdata(dev);
 +      unsigned int data_l, data_h;
 +
 +      regmap_write(rt5682->sdw_regmap, RT5682_SDW_CMD, 0);
 +      regmap_write(rt5682->sdw_regmap, RT5682_SDW_ADDR_H, (reg >> 8) & 0xff);
 +      regmap_write(rt5682->sdw_regmap, RT5682_SDW_ADDR_L, (reg & 0xff));
 +      regmap_read(rt5682->sdw_regmap, RT5682_SDW_DATA_H, &data_h);
 +      regmap_read(rt5682->sdw_regmap, RT5682_SDW_DATA_L, &data_l);
 +
 +      *val = (data_h << 8) | data_l;
 +
 +      dev_vdbg(dev, "[%s] %04x => %04x\n", __func__, reg, *val);
 +
 +      return 0;
 +}
 +
 +static int rt5682_sdw_write(void *context, unsigned int reg, unsigned int val)
 +{
 +      struct device *dev = context;
 +      struct rt5682_priv *rt5682 = dev_get_drvdata(dev);
 +
 +      regmap_write(rt5682->sdw_regmap, RT5682_SDW_CMD, 1);
 +      regmap_write(rt5682->sdw_regmap, RT5682_SDW_ADDR_H, (reg >> 8) & 0xff);
 +      regmap_write(rt5682->sdw_regmap, RT5682_SDW_ADDR_L, (reg & 0xff));
 +      regmap_write(rt5682->sdw_regmap, RT5682_SDW_DATA_H, (val >> 8) & 0xff);
 +      regmap_write(rt5682->sdw_regmap, RT5682_SDW_DATA_L, (val & 0xff));
 +
 +      dev_vdbg(dev, "[%s] %04x <= %04x\n", __func__, reg, val);
 +
 +      return 0;
 +}
 +
 +static const struct regmap_config rt5682_sdw_regmap = {
 +      .reg_bits = 16,
 +      .val_bits = 16,
 +      .max_register = RT5682_I2C_MODE,
 +      .volatile_reg = rt5682_volatile_register,
 +      .readable_reg = rt5682_readable_register,
 +      .cache_type = REGCACHE_RBTREE,
 +      .reg_defaults = rt5682_reg,
 +      .num_reg_defaults = ARRAY_SIZE(rt5682_reg),
 +      .use_single_read = true,
 +      .use_single_write = true,
 +      .reg_read = rt5682_sdw_read,
 +      .reg_write = rt5682_sdw_write,
 +};
 +
 +int rt5682_sdw_init(struct device *dev, struct regmap *regmap,
 +      struct sdw_slave *slave)
 +{
 +      struct rt5682_priv *rt5682;
 +      int ret;
 +
 +      rt5682 = devm_kzalloc(dev, sizeof(*rt5682), GFP_KERNEL);
 +      if (!rt5682)
 +              return -ENOMEM;
 +
 +      dev_set_drvdata(dev, rt5682);
 +      rt5682->slave = slave;
 +      rt5682->sdw_regmap = regmap;
 +      rt5682->is_sdw = true;
 +
 +      rt5682->regmap = devm_regmap_init(dev, NULL, dev, &rt5682_sdw_regmap);
 +      if (IS_ERR(rt5682->regmap)) {
 +              ret = PTR_ERR(rt5682->regmap);
 +              dev_err(dev, "Failed to allocate register map: %d\n",
 +                      ret);
 +              return ret;
 +      }
 +
 +      /*
 +       * Mark hw_init to false
 +       * HW init will be performed when device reports present
 +       */
 +      rt5682->hw_init = false;
 +      rt5682->first_hw_init = false;
 +
 +      mutex_init(&rt5682->calibrate_mutex);
 +      INIT_DELAYED_WORK(&rt5682->jack_detect_work,
 +              rt5682_jack_detect_handler);
 +
 +      ret = devm_snd_soc_register_component(dev, &soc_component_dev_rt5682,
 +              rt5682_dai, ARRAY_SIZE(rt5682_dai));
 +
 +      dev_dbg(&slave->dev, "%s\n", __func__);
 +
 +      return ret;
 +}
 +EXPORT_SYMBOL_GPL(rt5682_sdw_init);
 +
 +int rt5682_io_init(struct device *dev, struct sdw_slave *slave)
 +{
 +      struct rt5682_priv *rt5682 = dev_get_drvdata(dev);
 +      int ret = 0;
 +      unsigned int val;
 +
 +      if (rt5682->hw_init)
 +              return 0;
 +
 +      regmap_read(rt5682->regmap, RT5682_DEVICE_ID, &val);
 +      if (val != DEVICE_ID) {
 +              pr_err("Device with ID register %x is not rt5682\n", val);
 +              return -ENODEV;
 +      }
 +
 +      /*
 +       * PM runtime is only enabled when a Slave reports as Attached
 +       */
 +      if (!rt5682->first_hw_init) {
 +              /* set autosuspend parameters */
 +              pm_runtime_set_autosuspend_delay(&slave->dev, 3000);
 +              pm_runtime_use_autosuspend(&slave->dev);
 +
 +              /* update count of parent 'active' children */
 +              pm_runtime_set_active(&slave->dev);
 +
 +              /* make sure the device does not suspend immediately */
 +              pm_runtime_mark_last_busy(&slave->dev);
 +
 +              pm_runtime_enable(&slave->dev);
 +      }
 +
 +      pm_runtime_get_noresume(&slave->dev);
 +
 +      rt5682_reset(rt5682);
 +
 +      if (rt5682->first_hw_init) {
 +              regcache_cache_only(rt5682->regmap, false);
 +              regcache_cache_bypass(rt5682->regmap, true);
 +      }
 +
 +      rt5682_calibrate(rt5682);
 +
 +      if (rt5682->first_hw_init) {
 +              regcache_cache_bypass(rt5682->regmap, false);
 +              regcache_mark_dirty(rt5682->regmap);
 +              regcache_sync(rt5682->regmap);
 +
 +              /* volatile registers */
 +              regmap_update_bits(rt5682->regmap, RT5682_CBJ_CTRL_2,
 +                      RT5682_EXT_JD_SRC, RT5682_EXT_JD_SRC_MANUAL);
 +
 +              goto reinit;
 +      }
 +
 +      ret = regmap_multi_reg_write(rt5682->regmap, patch_list,
 +                                  ARRAY_SIZE(patch_list));
 +      if (ret != 0)
 +              dev_warn(dev, "Failed to apply regmap patch: %d\n", ret);
 +
 +      regmap_write(rt5682->regmap, RT5682_DEPOP_1, 0x0000);
 +
 +      regmap_update_bits(rt5682->regmap, RT5682_PWR_ANLG_1,
 +                      RT5682_LDO1_DVO_MASK | RT5682_HP_DRIVER_MASK,
 +                      RT5682_LDO1_DVO_12 | RT5682_HP_DRIVER_5X);
 +      regmap_write(rt5682->regmap, RT5682_MICBIAS_2, 0x0380);
 +      regmap_write(rt5682->regmap, RT5682_TEST_MODE_CTRL_1, 0x0000);
 +      regmap_update_bits(rt5682->regmap, RT5682_BIAS_CUR_CTRL_8,
 +                      RT5682_HPA_CP_BIAS_CTRL_MASK, RT5682_HPA_CP_BIAS_3UA);
 +      regmap_update_bits(rt5682->regmap, RT5682_CHARGE_PUMP_1,
 +                      RT5682_CP_CLK_HP_MASK, RT5682_CP_CLK_HP_300KHZ);
 +      regmap_update_bits(rt5682->regmap, RT5682_HP_CHARGE_PUMP_1,
 +                      RT5682_PM_HP_MASK, RT5682_PM_HP_HV);
 +
 +      /* Soundwire */
 +      regmap_write(rt5682->regmap, RT5682_PLL2_INTERNAL, 0xa266);
 +      regmap_write(rt5682->regmap, RT5682_PLL2_CTRL_1, 0x1700);
 +      regmap_write(rt5682->regmap, RT5682_PLL2_CTRL_2, 0x0006);
 +      regmap_write(rt5682->regmap, RT5682_PLL2_CTRL_3, 0x2600);
 +      regmap_write(rt5682->regmap, RT5682_PLL2_CTRL_4, 0x0c8f);
 +      regmap_write(rt5682->regmap, RT5682_PLL_TRACK_2, 0x3000);
 +      regmap_write(rt5682->regmap, RT5682_PLL_TRACK_3, 0x4000);
 +      regmap_update_bits(rt5682->regmap, RT5682_GLB_CLK,
 +              RT5682_SCLK_SRC_MASK | RT5682_PLL2_SRC_MASK,
 +              RT5682_SCLK_SRC_PLL2 | RT5682_PLL2_SRC_SDW);
 +
 +      regmap_update_bits(rt5682->regmap, RT5682_CBJ_CTRL_2,
 +              RT5682_EXT_JD_SRC, RT5682_EXT_JD_SRC_MANUAL);
 +      regmap_write(rt5682->regmap, RT5682_CBJ_CTRL_1, 0xd042);
 +      regmap_update_bits(rt5682->regmap, RT5682_CBJ_CTRL_3,
 +              RT5682_CBJ_IN_BUF_EN, RT5682_CBJ_IN_BUF_EN);
 +      regmap_update_bits(rt5682->regmap, RT5682_SAR_IL_CMD_1,
 +              RT5682_SAR_POW_MASK, RT5682_SAR_POW_EN);
 +      regmap_update_bits(rt5682->regmap, RT5682_RC_CLK_CTRL,
 +                      RT5682_POW_IRQ | RT5682_POW_JDH |
 +                      RT5682_POW_ANA, RT5682_POW_IRQ |
 +                      RT5682_POW_JDH | RT5682_POW_ANA);
 +      regmap_update_bits(rt5682->regmap, RT5682_PWR_ANLG_2,
 +              RT5682_PWR_JDH, RT5682_PWR_JDH);
 +      regmap_update_bits(rt5682->regmap, RT5682_IRQ_CTRL_2,
 +              RT5682_JD1_EN_MASK | RT5682_JD1_IRQ_MASK,
 +              RT5682_JD1_EN | RT5682_JD1_IRQ_PUL);
 +
 +reinit:
 +      mod_delayed_work(system_power_efficient_wq,
 +                 &rt5682->jack_detect_work, msecs_to_jiffies(250));
 +
 +      /* Mark Slave initialization complete */
 +      rt5682->hw_init = true;
 +      rt5682->first_hw_init = true;
 +
 +      pm_runtime_mark_last_busy(&slave->dev);
 +      pm_runtime_put_autosuspend(&slave->dev);
 +
 +      dev_dbg(&slave->dev, "%s hw_init complete\n", __func__);
 +
 +      return ret;
 +}
 +EXPORT_SYMBOL_GPL(rt5682_io_init);
 +#endif
 +
  static int rt5682_i2c_probe(struct i2c_client *i2c,
                    const struct i2c_device_id *id)
  {
                return -ENODEV;
        }
  
 -      rt5682_reset(rt5682->regmap);
 +      rt5682_reset(rt5682);
  
        mutex_init(&rt5682->calibrate_mutex);
        rt5682_calibrate(rt5682);
@@@ -3668,7 -2676,7 +3668,7 @@@ static void rt5682_i2c_shutdown(struct 
  {
        struct rt5682_priv *rt5682 = i2c_get_clientdata(client);
  
 -      rt5682_reset(rt5682->regmap);
 +      rt5682_reset(rt5682);
  }
  
  #ifdef CONFIG_OF
@@@ -1030,8 -1030,8 +1030,8 @@@ static int wm_coeff_write_acked_control
        return -ETIMEDOUT;
  }
  
 -static int wm_coeff_write_control(struct wm_coeff_ctl *ctl,
 -                                const void *buf, size_t len)
 +static int wm_coeff_write_ctrl_raw(struct wm_coeff_ctl *ctl,
 +                                 const void *buf, size_t len)
  {
        struct wm_adsp *dsp = ctl->dsp;
        void *scratch;
        return 0;
  }
  
 +static int wm_coeff_write_ctrl(struct wm_coeff_ctl *ctl,
 +                             const void *buf, size_t len)
 +{
 +      int ret = 0;
 +
 +      if (ctl->flags & WMFW_CTL_FLAG_VOLATILE)
 +              ret = -EPERM;
 +      else if (buf != ctl->cache)
 +              memcpy(ctl->cache, buf, len);
 +
 +      ctl->set = 1;
 +      if (ctl->enabled && ctl->dsp->running)
 +              ret = wm_coeff_write_ctrl_raw(ctl, buf, len);
 +
 +      return ret;
 +}
 +
  static int wm_coeff_put(struct snd_kcontrol *kctl,
                        struct snd_ctl_elem_value *ucontrol)
  {
        int ret = 0;
  
        mutex_lock(&ctl->dsp->pwr_lock);
 -
 -      if (ctl->flags & WMFW_CTL_FLAG_VOLATILE)
 -              ret = -EPERM;
 -      else
 -              memcpy(ctl->cache, p, ctl->len);
 -
 -      ctl->set = 1;
 -      if (ctl->enabled && ctl->dsp->running)
 -              ret = wm_coeff_write_control(ctl, p, ctl->len);
 -
 +      ret = wm_coeff_write_ctrl(ctl, p, ctl->len);
        mutex_unlock(&ctl->dsp->pwr_lock);
  
        return ret;
@@@ -1104,10 -1096,15 +1104,10 @@@ static int wm_coeff_tlv_put(struct snd_
  
        mutex_lock(&ctl->dsp->pwr_lock);
  
 -      if (copy_from_user(ctl->cache, bytes, size)) {
 +      if (copy_from_user(ctl->cache, bytes, size))
                ret = -EFAULT;
 -      } else {
 -              ctl->set = 1;
 -              if (ctl->enabled && ctl->dsp->running)
 -                      ret = wm_coeff_write_control(ctl, ctl->cache, size);
 -              else if (ctl->flags & WMFW_CTL_FLAG_VOLATILE)
 -                      ret = -EPERM;
 -      }
 +      else
 +              ret = wm_coeff_write_ctrl(ctl, ctl->cache, size);
  
        mutex_unlock(&ctl->dsp->pwr_lock);
  
@@@ -1138,8 -1135,8 +1138,8 @@@ static int wm_coeff_put_acked(struct sn
        return ret;
  }
  
 -static int wm_coeff_read_control(struct wm_coeff_ctl *ctl,
 -                               void *buf, size_t len)
 +static int wm_coeff_read_ctrl_raw(struct wm_coeff_ctl *ctl,
 +                                void *buf, size_t len)
  {
        struct wm_adsp *dsp = ctl->dsp;
        void *scratch;
        return 0;
  }
  
 -static int wm_coeff_get(struct snd_kcontrol *kctl,
 -                      struct snd_ctl_elem_value *ucontrol)
 +static int wm_coeff_read_ctrl(struct wm_coeff_ctl *ctl, void *buf, size_t len)
  {
 -      struct soc_bytes_ext *bytes_ext =
 -              (struct soc_bytes_ext *)kctl->private_value;
 -      struct wm_coeff_ctl *ctl = bytes_ext_to_ctl(bytes_ext);
 -      char *p = ucontrol->value.bytes.data;
        int ret = 0;
  
 -      mutex_lock(&ctl->dsp->pwr_lock);
 -
        if (ctl->flags & WMFW_CTL_FLAG_VOLATILE) {
                if (ctl->enabled && ctl->dsp->running)
 -                      ret = wm_coeff_read_control(ctl, p, ctl->len);
 +                      return wm_coeff_read_ctrl_raw(ctl, buf, len);
                else
 -                      ret = -EPERM;
 +                      return -EPERM;
        } else {
                if (!ctl->flags && ctl->enabled && ctl->dsp->running)
 -                      ret = wm_coeff_read_control(ctl, ctl->cache, ctl->len);
 +                      ret = wm_coeff_read_ctrl_raw(ctl, ctl->cache, ctl->len);
  
 -              memcpy(p, ctl->cache, ctl->len);
 +              if (buf != ctl->cache)
 +                      memcpy(buf, ctl->cache, len);
        }
  
 +      return ret;
 +}
 +
 +static int wm_coeff_get(struct snd_kcontrol *kctl,
 +                      struct snd_ctl_elem_value *ucontrol)
 +{
 +      struct soc_bytes_ext *bytes_ext =
 +              (struct soc_bytes_ext *)kctl->private_value;
 +      struct wm_coeff_ctl *ctl = bytes_ext_to_ctl(bytes_ext);
 +      char *p = ucontrol->value.bytes.data;
 +      int ret;
 +
 +      mutex_lock(&ctl->dsp->pwr_lock);
 +      ret = wm_coeff_read_ctrl(ctl, p, ctl->len);
        mutex_unlock(&ctl->dsp->pwr_lock);
  
        return ret;
@@@ -1215,7 -1204,15 +1215,7 @@@ static int wm_coeff_tlv_get(struct snd_
  
        mutex_lock(&ctl->dsp->pwr_lock);
  
 -      if (ctl->flags & WMFW_CTL_FLAG_VOLATILE) {
 -              if (ctl->enabled && ctl->dsp->running)
 -                      ret = wm_coeff_read_control(ctl, ctl->cache, size);
 -              else
 -                      ret = -EPERM;
 -      } else {
 -              if (!ctl->flags && ctl->enabled && ctl->dsp->running)
 -                      ret = wm_coeff_read_control(ctl, ctl->cache, size);
 -      }
 +      ret = wm_coeff_read_ctrl_raw(ctl, ctl->cache, size);
  
        if (!ret && copy_to_user(bytes, ctl->cache, size))
                ret = -EFAULT;
@@@ -1343,7 -1340,7 +1343,7 @@@ static int wm_coeff_init_control_caches
                 * created so we don't need to do anything.
                 */
                if (!ctl->flags || (ctl->flags & WMFW_CTL_FLAG_READABLE)) {
 -                      ret = wm_coeff_read_control(ctl, ctl->cache, ctl->len);
 +                      ret = wm_coeff_read_ctrl_raw(ctl, ctl->cache, ctl->len);
                        if (ret < 0)
                                return ret;
                }
@@@ -1361,8 -1358,7 +1361,8 @@@ static int wm_coeff_sync_controls(struc
                if (!ctl->enabled)
                        continue;
                if (ctl->set && !(ctl->flags & WMFW_CTL_FLAG_VOLATILE)) {
 -                      ret = wm_coeff_write_control(ctl, ctl->cache, ctl->len);
 +                      ret = wm_coeff_write_ctrl_raw(ctl, ctl->cache,
 +                                                    ctl->len);
                        if (ret < 0)
                                return ret;
                }
@@@ -1436,12 -1432,12 +1436,12 @@@ static int wm_adsp_create_control(struc
                subname = NULL; /* don't append subname */
                break;
        case 2:
-               ret = snprintf(name, SNDRV_CTL_ELEM_ID_NAME_MAXLEN,
+               ret = scnprintf(name, SNDRV_CTL_ELEM_ID_NAME_MAXLEN,
                                "%s%c %.12s %x", dsp->name, *region_name,
                                wm_adsp_fw_text[dsp->fw], alg_region->alg);
                break;
        default:
-               ret = snprintf(name, SNDRV_CTL_ELEM_ID_NAME_MAXLEN,
+               ret = scnprintf(name, SNDRV_CTL_ELEM_ID_NAME_MAXLEN,
                                "%s %.12s %x", dsp->name,
                                wm_adsp_fw_text[dsp->fw], alg_region->alg);
                break;
@@@ -2052,7 -2048,7 +2052,7 @@@ int wm_adsp_write_ctl(struct wm_adsp *d
        if (len > ctl->len)
                return -EINVAL;
  
 -      ret = wm_coeff_write_control(ctl, buf, len);
 +      ret = wm_coeff_write_ctrl(ctl, buf, len);
  
        kcontrol = snd_soc_card_get_kcontrol(dsp->component->card, ctl->name);
        snd_ctl_notify(dsp->component->card->snd_card,
@@@ -2074,7 -2070,7 +2074,7 @@@ int wm_adsp_read_ctl(struct wm_adsp *ds
        if (len > ctl->len)
                return -EINVAL;
  
 -      return wm_coeff_read_control(ctl, buf, len);
 +      return wm_coeff_read_ctrl(ctl, buf, len);
  }
  EXPORT_SYMBOL_GPL(wm_adsp_read_ctl);
  
@@@ -686,6 -686,7 +686,7 @@@ static struct snd_soc_card skylake_audi
        .codec_conf = ssm4567_codec_conf,
        .num_configs = ARRAY_SIZE(ssm4567_codec_conf),
        .fully_routed = true,
+       .disable_route_checks = true,
        .late_probe = skylake_card_late_probe,
  };
  
@@@ -703,7 -704,7 +704,7 @@@ static int skylake_audio_probe(struct p
        skylake_audio_card.dev = &pdev->dev;
        snd_soc_card_set_drvdata(&skylake_audio_card, ctx);
  
 -      mach = (&pdev->dev)->platform_data;
 +      mach = pdev->dev.platform_data;
        if (mach)
                dmic_constraints = mach->mach_params.dmic_num == 2 ?
                        &constraints_dmic_2ch : &constraints_dmic_channels;
@@@ -130,6 -130,7 +130,7 @@@ static int skl_init_chip(struct hdac_bu
        struct hdac_ext_link *hlink;
        int ret;
  
+       snd_hdac_set_codec_wakeup(bus, true);
        skl_enable_miscbdcge(bus->dev, false);
        ret = snd_hdac_bus_init_chip(bus, full_reset);
  
                writel(0, hlink->ml_addr + AZX_REG_ML_LOSIDV);
  
        skl_enable_miscbdcge(bus->dev, true);
+       snd_hdac_set_codec_wakeup(bus, false);
  
        return ret;
  }
@@@ -359,7 -361,7 +361,7 @@@ static int skl_resume(struct device *de
        struct pci_dev *pci = to_pci_dev(dev);
        struct hdac_bus *bus = pci_get_drvdata(pci);
        struct skl_dev *skl  = bus_to_skl(bus);
 -      struct hdac_ext_link *hlink = NULL;
 +      struct hdac_ext_link *hlink;
        int ret;
  
        /*
@@@ -481,13 -483,8 +483,8 @@@ static struct skl_ssp_clk skl_ssp_clks[
  static struct snd_soc_acpi_mach *skl_find_hda_machine(struct skl_dev *skl,
                                        struct snd_soc_acpi_mach *machines)
  {
-       struct hdac_bus *bus = skl_to_bus(skl);
        struct snd_soc_acpi_mach *mach;
  
-       /* check if we have any codecs detected on bus */
-       if (bus->codec_mask == 0)
-               return NULL;
        /* point to common table */
        mach = snd_soc_acpi_intel_hda_machines;
  
@@@ -636,6 -633,9 +633,9 @@@ static int skl_clock_device_register(st
        struct platform_device_info pdevinfo = {NULL};
        struct skl_clk_pdata *clk_pdata;
  
+       if (!skl->nhlt)
+               return 0;
        clk_pdata = devm_kzalloc(&skl->pci->dev, sizeof(*clk_pdata),
                                                        GFP_KERNEL);
        if (!clk_pdata)
@@@ -794,7 -794,7 +794,7 @@@ static void skl_probe_work(struct work_
  {
        struct skl_dev *skl = container_of(work, struct skl_dev, probe_work);
        struct hdac_bus *bus = skl_to_bus(skl);
 -      struct hdac_ext_link *hlink = NULL;
 +      struct hdac_ext_link *hlink;
        int err;
  
        if (IS_ENABLED(CONFIG_SND_SOC_HDAC_HDMI)) {
                        return;
        }
  
+       skl_init_pci(skl);
+       skl_dum_set(bus);
        err = skl_init_chip(bus, true);
        if (err < 0) {
                dev_err(bus->dev, "Init chip failed with err: %d\n", err);
@@@ -918,8 -921,6 +921,6 @@@ static int skl_first_init(struct hdac_b
                return -ENXIO;
        }
  
-       snd_hdac_bus_reset_link(bus, true);
        snd_hdac_bus_parse_capabilities(bus);
  
        /* check if PPCAP exists */
        if (err < 0)
                return err;
  
-       /* initialize chip */
-       skl_init_pci(skl);
-       skl_dum_set(bus);
-       return skl_init_chip(bus, true);
+       return 0;
  }
  
  static int skl_probe(struct pci_dev *pci,
        if (bus->mlcap)
                snd_hdac_ext_bus_get_ml_capabilities(bus);
  
-       snd_hdac_bus_stop_chip(bus);
        /* create device for soc dmic */
        err = skl_dmic_device_register(skl);
        if (err < 0) {
@@@ -1082,7 -1077,8 +1077,8 @@@ out_dsp_free
  out_clk_free:
        skl_clock_device_unregister(skl);
  out_nhlt_free:
-       intel_nhlt_free(skl->nhlt);
+       if (skl->nhlt)
+               intel_nhlt_free(skl->nhlt);
  out_free:
        skl_free(bus);
  
@@@ -1131,7 -1127,8 +1127,8 @@@ static void skl_remove(struct pci_dev *
        skl_dmic_device_unregister(skl);
        skl_clock_device_unregister(skl);
        skl_nhlt_remove_sysfs(skl);
-       intel_nhlt_free(skl->nhlt);
+       if (skl->nhlt)
+               intel_nhlt_free(skl->nhlt);
        skl_free(bus);
        dev_set_drvdata(&pci->dev, NULL);
  }
@@@ -83,7 -83,7 +83,7 @@@
  #define JZ_AIC_I2S_STATUS_BUSY BIT(2)
  
  #define JZ_AIC_CLK_DIV_MASK 0xf
- #define I2SDIV_DV_SHIFT 8
+ #define I2SDIV_DV_SHIFT 0
  #define I2SDIV_DV_MASK (0xf << I2SDIV_DV_SHIFT)
  #define I2SDIV_IDV_SHIFT 8
  #define I2SDIV_IDV_MASK (0xf << I2SDIV_IDV_SHIFT)
@@@ -93,11 -93,6 +93,11 @@@ enum jz47xx_i2s_version 
        JZ_I2S_JZ4780,
  };
  
 +struct i2s_soc_info {
 +      enum jz47xx_i2s_version version;
 +      struct snd_soc_dai_driver *dai;
 +};
 +
  struct jz4740_i2s {
        struct resource *mem;
        void __iomem *base;
        struct snd_dmaengine_dai_dma_data playback_dma_data;
        struct snd_dmaengine_dai_dma_data capture_dma_data;
  
 -      enum jz47xx_i2s_version version;
 +      const struct i2s_soc_info *soc_info;
  };
  
  static inline uint32_t jz4740_i2s_read(const struct jz4740_i2s *i2s,
@@@ -289,7 -284,7 +289,7 @@@ static int jz4740_i2s_hw_params(struct 
                ctrl &= ~JZ_AIC_CTRL_INPUT_SAMPLE_SIZE_MASK;
                ctrl |= sample_size << JZ_AIC_CTRL_INPUT_SAMPLE_SIZE_OFFSET;
  
 -              if (i2s->version >= JZ_I2S_JZ4780) {
 +              if (i2s->soc_info->version >= JZ_I2S_JZ4780) {
                        div_reg &= ~I2SDIV_IDV_MASK;
                        div_reg |= (div - 1) << I2SDIV_IDV_SHIFT;
                } else {
@@@ -403,7 -398,7 +403,7 @@@ static int jz4740_i2s_dai_probe(struct 
        snd_soc_dai_init_dma_data(dai, &i2s->playback_dma_data,
                &i2s->capture_dma_data);
  
 -      if (i2s->version >= JZ_I2S_JZ4780) {
 +      if (i2s->soc_info->version >= JZ_I2S_JZ4780) {
                conf = (7 << JZ4780_AIC_CONF_FIFO_RX_THRESHOLD_OFFSET) |
                        (8 << JZ4780_AIC_CONF_FIFO_TX_THRESHOLD_OFFSET) |
                        JZ_AIC_CONF_OVERFLOW_PLAY_LAST |
@@@ -462,11 -457,6 +462,11 @@@ static struct snd_soc_dai_driver jz4740
        .ops = &jz4740_i2s_dai_ops,
  };
  
 +static const struct i2s_soc_info jz4740_i2s_soc_info = {
 +      .version = JZ_I2S_JZ4740,
 +      .dai = &jz4740_i2s_dai,
 +};
 +
  static struct snd_soc_dai_driver jz4780_i2s_dai = {
        .probe = jz4740_i2s_dai_probe,
        .remove = jz4740_i2s_dai_remove,
        .ops = &jz4740_i2s_dai_ops,
  };
  
 +static const struct i2s_soc_info jz4780_i2s_soc_info = {
 +      .version = JZ_I2S_JZ4780,
 +      .dai = &jz4780_i2s_dai,
 +};
 +
  static const struct snd_soc_component_driver jz4740_i2s_component = {
        .name           = "jz4740-i2s",
        .suspend        = jz4740_i2s_suspend,
  
  #ifdef CONFIG_OF
  static const struct of_device_id jz4740_of_matches[] = {
 -      { .compatible = "ingenic,jz4740-i2s", .data = (void *)JZ_I2S_JZ4740 },
 -      { .compatible = "ingenic,jz4780-i2s", .data = (void *)JZ_I2S_JZ4780 },
 +      { .compatible = "ingenic,jz4740-i2s", .data = &jz4740_i2s_soc_info },
 +      { .compatible = "ingenic,jz4780-i2s", .data = &jz4780_i2s_soc_info },
        { /* sentinel */ }
  };
  MODULE_DEVICE_TABLE(of, jz4740_of_matches);
  
  static int jz4740_i2s_dev_probe(struct platform_device *pdev)
  {
 +      struct device *dev = &pdev->dev;
        struct jz4740_i2s *i2s;
        struct resource *mem;
        int ret;
  
 -      i2s = devm_kzalloc(&pdev->dev, sizeof(*i2s), GFP_KERNEL);
 +      i2s = devm_kzalloc(dev, sizeof(*i2s), GFP_KERNEL);
        if (!i2s)
                return -ENOMEM;
  
 -      i2s->version =
 -              (enum jz47xx_i2s_version)of_device_get_match_data(&pdev->dev);
 +      i2s->soc_info = device_get_match_data(dev);
  
        mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 -      i2s->base = devm_ioremap_resource(&pdev->dev, mem);
 +      i2s->base = devm_ioremap_resource(dev, mem);
        if (IS_ERR(i2s->base))
                return PTR_ERR(i2s->base);
  
        i2s->phys_base = mem->start;
  
 -      i2s->clk_aic = devm_clk_get(&pdev->dev, "aic");
 +      i2s->clk_aic = devm_clk_get(dev, "aic");
        if (IS_ERR(i2s->clk_aic))
                return PTR_ERR(i2s->clk_aic);
  
 -      i2s->clk_i2s = devm_clk_get(&pdev->dev, "i2s");
 +      i2s->clk_i2s = devm_clk_get(dev, "i2s");
        if (IS_ERR(i2s->clk_i2s))
                return PTR_ERR(i2s->clk_i2s);
  
        platform_set_drvdata(pdev, i2s);
  
 -      if (i2s->version == JZ_I2S_JZ4780)
 -              ret = devm_snd_soc_register_component(&pdev->dev,
 -                      &jz4740_i2s_component, &jz4780_i2s_dai, 1);
 -      else
 -              ret = devm_snd_soc_register_component(&pdev->dev,
 -                      &jz4740_i2s_component, &jz4740_i2s_dai, 1);
 -
 +      ret = devm_snd_soc_register_component(dev, &jz4740_i2s_component,
 +                                            i2s->soc_info->dai, 1);
        if (ret)
                return ret;
  
 -      return devm_snd_dmaengine_pcm_register(&pdev->dev, NULL,
 +      return devm_snd_dmaengine_pcm_register(dev, NULL,
                SND_DMAENGINE_PCM_FLAG_COMPAT);
  }
  
diff --combined sound/soc/soc-core.c
@@@ -365,20 -365,19 +365,20 @@@ EXPORT_SYMBOL_GPL(snd_soc_get_pcm_runti
  void snd_soc_close_delayed_work(struct snd_soc_pcm_runtime *rtd)
  {
        struct snd_soc_dai *codec_dai = rtd->codec_dai;
 +      int playback = SNDRV_PCM_STREAM_PLAYBACK;
  
        mutex_lock_nested(&rtd->card->pcm_mutex, rtd->card->pcm_subclass);
  
        dev_dbg(rtd->dev,
                "ASoC: pop wq checking: %s status: %s waiting: %s\n",
                codec_dai->driver->playback.stream_name,
 -              codec_dai->playback_active ? "active" : "inactive",
 +              codec_dai->stream_active[playback] ? "active" : "inactive",
                rtd->pop_wait ? "yes" : "no");
  
        /* are we waiting on this codec DAI stream */
        if (rtd->pop_wait == 1) {
                rtd->pop_wait = 0;
 -              snd_soc_dapm_stream_event(rtd, SNDRV_PCM_STREAM_PLAYBACK,
 +              snd_soc_dapm_stream_event(rtd, playback,
                                          SND_SOC_DAPM_STREAM_STOP);
        }
  
@@@ -432,7 -431,6 +432,7 @@@ static struct snd_soc_pcm_runtime *soc_
        struct snd_soc_component *component;
        struct device *dev;
        int ret;
 +      int stream;
  
        /*
         * for rtd->dev
  
        rtd->dev = dev;
        INIT_LIST_HEAD(&rtd->list);
 -      INIT_LIST_HEAD(&rtd->dpcm[SNDRV_PCM_STREAM_PLAYBACK].be_clients);
 -      INIT_LIST_HEAD(&rtd->dpcm[SNDRV_PCM_STREAM_CAPTURE].be_clients);
 -      INIT_LIST_HEAD(&rtd->dpcm[SNDRV_PCM_STREAM_PLAYBACK].fe_clients);
 -      INIT_LIST_HEAD(&rtd->dpcm[SNDRV_PCM_STREAM_CAPTURE].fe_clients);
 +      for_each_pcm_streams(stream) {
 +              INIT_LIST_HEAD(&rtd->dpcm[stream].be_clients);
 +              INIT_LIST_HEAD(&rtd->dpcm[stream].fe_clients);
 +      }
        dev_set_drvdata(dev, rtd);
        INIT_DELAYED_WORK(&rtd->delayed_work, close_delayed_work);
  
                goto free_rtd;
  
        /*
 +       * for rtd->cpu_dais
 +       */
 +      rtd->cpu_dais = devm_kcalloc(dev, dai_link->num_cpus,
 +                                   sizeof(struct snd_soc_dai *),
 +                                   GFP_KERNEL);
 +      if (!rtd->cpu_dais)
 +              goto free_rtd;
 +      /*
         * rtd remaining settings
         */
        rtd->card = card;
@@@ -524,7 -514,6 +524,7 @@@ int snd_soc_suspend(struct device *dev
        struct snd_soc_card *card = dev_get_drvdata(dev);
        struct snd_soc_component *component;
        struct snd_soc_pcm_runtime *rtd;
 +      int playback = SNDRV_PCM_STREAM_PLAYBACK;
        int i;
  
        /* If the card is not initialized yet there is nothing to do */
                if (rtd->dai_link->ignore_suspend)
                        continue;
  
 -              for_each_rtd_codec_dai(rtd, i, dai) {
 -                      if (dai->playback_active)
 -                              snd_soc_dai_digital_mute(dai, 1,
 -                                              SNDRV_PCM_STREAM_PLAYBACK);
 +              for_each_rtd_codec_dais(rtd, i, dai) {
 +                      if (dai->stream_active[playback])
 +                              snd_soc_dai_digital_mute(dai, 1, playback);
                }
        }
  
        snd_soc_flush_all_delayed_work(card);
  
        for_each_card_rtds(card, rtd) {
 +              int stream;
  
                if (rtd->dai_link->ignore_suspend)
                        continue;
  
 -              snd_soc_dapm_stream_event(rtd,
 -                                        SNDRV_PCM_STREAM_PLAYBACK,
 -                                        SND_SOC_DAPM_STREAM_SUSPEND);
 -
 -              snd_soc_dapm_stream_event(rtd,
 -                                        SNDRV_PCM_STREAM_CAPTURE,
 -                                        SND_SOC_DAPM_STREAM_SUSPEND);
 +              for_each_pcm_streams(stream)
 +                      snd_soc_dapm_stream_event(rtd, stream,
 +                                                SND_SOC_DAPM_STREAM_SUSPEND);
        }
  
        /* Recheck all endpoints too, their state is affected by suspend */
@@@ -671,27 -664,30 +671,27 @@@ static void soc_resume_deferred(struct 
        }
  
        for_each_card_rtds(card, rtd) {
 +              int stream;
  
                if (rtd->dai_link->ignore_suspend)
                        continue;
  
 -              snd_soc_dapm_stream_event(rtd,
 -                                        SNDRV_PCM_STREAM_PLAYBACK,
 -                                        SND_SOC_DAPM_STREAM_RESUME);
 -
 -              snd_soc_dapm_stream_event(rtd,
 -                                        SNDRV_PCM_STREAM_CAPTURE,
 -                                        SND_SOC_DAPM_STREAM_RESUME);
 +              for_each_pcm_streams(stream)
 +                      snd_soc_dapm_stream_event(rtd, stream,
 +                                                SND_SOC_DAPM_STREAM_RESUME);
        }
  
        /* unmute any active DACs */
        for_each_card_rtds(card, rtd) {
                struct snd_soc_dai *dai;
 +              int playback = SNDRV_PCM_STREAM_PLAYBACK;
  
                if (rtd->dai_link->ignore_suspend)
                        continue;
  
 -              for_each_rtd_codec_dai(rtd, i, dai) {
 -                      if (dai->playback_active)
 -                              snd_soc_dai_digital_mute(dai, 0,
 -                                              SNDRV_PCM_STREAM_PLAYBACK);
 +              for_each_rtd_codec_dais(rtd, i, dai) {
 +                      if (dai->stream_active[playback])
 +                              snd_soc_dai_digital_mute(dai, 0, playback);
                }
        }
  
@@@ -841,7 -837,7 +841,7 @@@ static int soc_dai_link_sanity_check(st
                                     struct snd_soc_dai_link *link)
  {
        int i;
 -      struct snd_soc_dai_link_component *codec, *platform;
 +      struct snd_soc_dai_link_component *cpu, *codec, *platform;
  
        for_each_link_codecs(link, i, codec) {
                /*
                        return -EPROBE_DEFER;
        }
  
 -      /* FIXME */
 -      if (link->num_cpus > 1) {
 -              dev_err(card->dev,
 -                      "ASoC: multi cpu is not yet supported %s\n",
 -                      link->name);
 -              return -EINVAL;
 -      }
 -
 -      /*
 -       * CPU device may be specified by either name or OF node, but
 -       * can be left unspecified, and will be matched based on DAI
 -       * name alone..
 -       */
 -      if (link->cpus->name && link->cpus->of_node) {
 -              dev_err(card->dev,
 -                      "ASoC: Neither/both cpu name/of_node are set for %s\n",
 -                      link->name);
 -              return -EINVAL;
 -      }
 +      for_each_link_cpus(link, i, cpu) {
 +              /*
 +               * CPU device may be specified by either name or OF node, but
 +               * can be left unspecified, and will be matched based on DAI
 +               * name alone..
 +               */
 +              if (cpu->name && cpu->of_node) {
 +                      dev_err(card->dev,
 +                              "ASoC: Neither/both cpu name/of_node are set for %s\n",
 +                              link->name);
 +                      return -EINVAL;
 +              }
  
 -      /*
 -       * Defer card registration if cpu dai component is not added to
 -       * component list.
 -       */
 -      if ((link->cpus->of_node || link->cpus->name) &&
 -          !soc_find_component(link->cpus))
 -              return -EPROBE_DEFER;
 +              /*
 +               * Defer card registration if cpu dai component is not added to
 +               * component list.
 +               */
 +              if ((cpu->of_node || cpu->name) &&
 +                  !soc_find_component(cpu))
 +                      return -EPROBE_DEFER;
  
 -      /*
 -       * At least one of CPU DAI name or CPU device name/node must be
 -       * specified
 -       */
 -      if (!link->cpus->dai_name &&
 -          !(link->cpus->name || link->cpus->of_node)) {
 -              dev_err(card->dev,
 -                      "ASoC: Neither cpu_dai_name nor cpu_name/of_node are set for %s\n",
 -                      link->name);
 -              return -EINVAL;
 +              /*
 +               * At least one of CPU DAI name or CPU device name/node must be
 +               * specified
 +               */
 +              if (!cpu->dai_name &&
 +                  !(cpu->name || cpu->of_node)) {
 +                      dev_err(card->dev,
 +                              "ASoC: Neither cpu_dai_name nor cpu_name/of_node are set for %s\n",
 +                              link->name);
 +                      return -EINVAL;
 +              }
        }
  
        return 0;
@@@ -964,7 -966,7 +964,7 @@@ int snd_soc_add_pcm_runtime(struct snd_
                            struct snd_soc_dai_link *dai_link)
  {
        struct snd_soc_pcm_runtime *rtd;
 -      struct snd_soc_dai_link_component *codec, *platform;
 +      struct snd_soc_dai_link_component *codec, *platform, *cpu;
        struct snd_soc_component *component;
        int i, ret;
  
        if (!rtd)
                return -ENOMEM;
  
 -      /* FIXME: we need multi CPU support in the future */
 -      rtd->cpu_dai = snd_soc_find_dai(dai_link->cpus);
 -      if (!rtd->cpu_dai) {
 -              dev_info(card->dev, "ASoC: CPU DAI %s not registered\n",
 -                       dai_link->cpus->dai_name);
 -              goto _err_defer;
 +      rtd->num_cpus = dai_link->num_cpus;
 +      for_each_link_cpus(dai_link, i, cpu) {
 +              rtd->cpu_dais[i] = snd_soc_find_dai(cpu);
 +              if (!rtd->cpu_dais[i]) {
 +                      dev_info(card->dev, "ASoC: CPU DAI %s not registered\n",
 +                               cpu->dai_name);
 +                      goto _err_defer;
 +              }
 +              snd_soc_rtd_add_component(rtd, rtd->cpu_dais[i]->component);
        }
 -      snd_soc_rtd_add_component(rtd, rtd->cpu_dai->component);
 +
 +      /* Single cpu links expect cpu and cpu_dai in runtime data */
 +      rtd->cpu_dai = rtd->cpu_dais[0];
  
        /* Find CODEC from registered CODECs */
        rtd->num_codecs = dai_link->num_codecs;
@@@ -1121,8 -1118,7 +1121,8 @@@ static int soc_init_pcm_runtime(struct 
                        dai_link->stream_name, ret);
                return ret;
        }
 -      ret = soc_dai_pcm_new(&cpu_dai, 1, rtd);
 +      ret = soc_dai_pcm_new(rtd->cpu_dais,
 +                            rtd->num_cpus, rtd);
        if (ret < 0)
                return ret;
        ret = soc_dai_pcm_new(rtd->codec_dais,
@@@ -1260,8 -1256,18 +1260,18 @@@ static int soc_probe_component(struct s
        ret = snd_soc_dapm_add_routes(dapm,
                                      component->driver->dapm_routes,
                                      component->driver->num_dapm_routes);
-       if (ret < 0)
-               goto err_probe;
+       if (ret < 0) {
+               if (card->disable_route_checks) {
+                       dev_info(card->dev,
+                                "%s: disable_route_checks set, ignoring errors on add_routes\n",
+                                __func__);
+               } else {
+                       dev_err(card->dev,
+                               "%s: snd_soc_dapm_add_routes failed: %d\n",
+                               __func__, ret);
+                       goto err_probe;
+               }
+       }
  
        /* see for_each_card_components */
        list_add(&component->card_list, &card->component_dev_list);
@@@ -1314,25 -1320,23 +1324,25 @@@ static void soc_remove_link_dais(struc
  {
        int i;
        struct snd_soc_dai *codec_dai;
 +      struct snd_soc_dai *cpu_dai;
        struct snd_soc_pcm_runtime *rtd;
        int order;
  
        for_each_comp_order(order) {
                for_each_card_rtds(card, rtd) {
                        /* remove the CODEC DAI */
 -                      for_each_rtd_codec_dai(rtd, i, codec_dai)
 +                      for_each_rtd_codec_dais(rtd, i, codec_dai)
                                soc_remove_dai(codec_dai, order);
  
 -                      soc_remove_dai(rtd->cpu_dai, order);
 +                      for_each_rtd_cpu_dais(rtd, i, cpu_dai)
 +                              soc_remove_dai(cpu_dai, order);
                }
        }
  }
  
  static int soc_probe_link_dais(struct snd_soc_card *card)
  {
 -      struct snd_soc_dai *codec_dai;
 +      struct snd_soc_dai *codec_dai, *cpu_dai;
        struct snd_soc_pcm_runtime *rtd;
        int i, order, ret;
  
                                "ASoC: probe %s dai link %d late %d\n",
                                card->name, rtd->num, order);
  
 -                      ret = soc_probe_dai(rtd->cpu_dai, order);
 -                      if (ret)
 -                              return ret;
 +                      /* probe the CPU DAI */
 +                      for_each_rtd_cpu_dais(rtd, i, cpu_dai) {
 +                              ret = soc_probe_dai(cpu_dai, order);
 +                              if (ret)
 +                                      return ret;
 +                      }
  
                        /* probe the CODEC DAI */
 -                      for_each_rtd_codec_dai(rtd, i, codec_dai) {
 +                      for_each_rtd_codec_dais(rtd, i, codec_dai) {
                                ret = soc_probe_dai(codec_dai, order);
                                if (ret)
                                        return ret;
@@@ -1480,13 -1481,12 +1490,13 @@@ static void soc_remove_aux_devices(stru
  int snd_soc_runtime_set_dai_fmt(struct snd_soc_pcm_runtime *rtd,
        unsigned int dai_fmt)
  {
 -      struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
 +      struct snd_soc_dai *cpu_dai;
        struct snd_soc_dai *codec_dai;
 +      unsigned int inv_dai_fmt;
        unsigned int i;
        int ret;
  
 -      for_each_rtd_codec_dai(rtd, i, codec_dai) {
 +      for_each_rtd_codec_dais(rtd, i, codec_dai) {
                ret = snd_soc_dai_set_fmt(codec_dai, dai_fmt);
                if (ret != 0 && ret != -ENOTSUPP) {
                        dev_warn(codec_dai->dev,
         * Flip the polarity for the "CPU" end of a CODEC<->CODEC link
         * the component which has non_legacy_dai_naming is Codec
         */
 -      if (cpu_dai->component->driver->non_legacy_dai_naming) {
 -              unsigned int inv_dai_fmt;
 -
 -              inv_dai_fmt = dai_fmt & ~SND_SOC_DAIFMT_MASTER_MASK;
 -              switch (dai_fmt & SND_SOC_DAIFMT_MASTER_MASK) {
 -              case SND_SOC_DAIFMT_CBM_CFM:
 -                      inv_dai_fmt |= SND_SOC_DAIFMT_CBS_CFS;
 -                      break;
 -              case SND_SOC_DAIFMT_CBM_CFS:
 -                      inv_dai_fmt |= SND_SOC_DAIFMT_CBS_CFM;
 -                      break;
 -              case SND_SOC_DAIFMT_CBS_CFM:
 -                      inv_dai_fmt |= SND_SOC_DAIFMT_CBM_CFS;
 -                      break;
 -              case SND_SOC_DAIFMT_CBS_CFS:
 -                      inv_dai_fmt |= SND_SOC_DAIFMT_CBM_CFM;
 -                      break;
 -              }
 -
 -              dai_fmt = inv_dai_fmt;
 +      inv_dai_fmt = dai_fmt & ~SND_SOC_DAIFMT_MASTER_MASK;
 +      switch (dai_fmt & SND_SOC_DAIFMT_MASTER_MASK) {
 +      case SND_SOC_DAIFMT_CBM_CFM:
 +              inv_dai_fmt |= SND_SOC_DAIFMT_CBS_CFS;
 +              break;
 +      case SND_SOC_DAIFMT_CBM_CFS:
 +              inv_dai_fmt |= SND_SOC_DAIFMT_CBS_CFM;
 +              break;
 +      case SND_SOC_DAIFMT_CBS_CFM:
 +              inv_dai_fmt |= SND_SOC_DAIFMT_CBM_CFS;
 +              break;
 +      case SND_SOC_DAIFMT_CBS_CFS:
 +              inv_dai_fmt |= SND_SOC_DAIFMT_CBM_CFM;
 +              break;
        }
 +      for_each_rtd_cpu_dais(rtd, i, cpu_dai) {
 +              unsigned int fmt = dai_fmt;
  
 -      ret = snd_soc_dai_set_fmt(cpu_dai, dai_fmt);
 -      if (ret != 0 && ret != -ENOTSUPP) {
 -              dev_warn(cpu_dai->dev,
 -                       "ASoC: Failed to set DAI format: %d\n", ret);
 -              return ret;
 +              if (cpu_dai->component->driver->non_legacy_dai_naming)
 +                      fmt = inv_dai_fmt;
 +
 +              ret = snd_soc_dai_set_fmt(cpu_dai, fmt);
 +              if (ret != 0 && ret != -ENOTSUPP) {
 +                      dev_warn(cpu_dai->dev,
 +                               "ASoC: Failed to set DAI format: %d\n", ret);
 +                      return ret;
 +              }
        }
  
        return 0;
@@@ -1948,8 -1948,18 +1958,18 @@@ static int snd_soc_bind_card(struct snd
  
        ret = snd_soc_dapm_add_routes(&card->dapm, card->dapm_routes,
                                      card->num_dapm_routes);
-       if (ret < 0)
-               goto probe_end;
+       if (ret < 0) {
+               if (card->disable_route_checks) {
+                       dev_info(card->dev,
+                                "%s: disable_route_checks set, ignoring errors on add_routes\n",
+                                __func__);
+               } else {
+                       dev_err(card->dev,
+                                "%s: snd_soc_dapm_add_routes failed: %d\n",
+                                __func__, ret);
+                       goto probe_end;
+               }
+       }
  
        ret = snd_soc_dapm_add_routes(&card->dapm, card->of_dapm_routes,
                                      card->num_of_dapm_routes);
@@@ -3112,14 -3122,6 +3132,14 @@@ int snd_soc_get_dai_name(struct of_phan
                        *dai_name = dai->driver->name;
                        if (!*dai_name)
                                *dai_name = pos->name;
 +              } else if (ret) {
 +                      /*
 +                       * if another error than ENOTSUPP is returned go on and
 +                       * check if another component is provided with the same
 +                       * node. This may happen if a device provides several
 +                       * components
 +                       */
 +                      continue;
                }
  
                break;
diff --combined sound/soc/soc-topology.c
@@@ -251,7 -251,7 +251,7 @@@ static int soc_tplg_vendor_load_(struc
  {
        int ret = 0;
  
-       if (tplg->comp && tplg->ops && tplg->ops->vendor_load)
+       if (tplg->ops && tplg->ops->vendor_load)
                ret = tplg->ops->vendor_load(tplg->comp, tplg->index, hdr);
        else {
                dev_err(tplg->dev, "ASoC: no vendor load callback for ID %d\n",
@@@ -283,7 -283,7 +283,7 @@@ static int soc_tplg_vendor_load(struct 
  static int soc_tplg_widget_load(struct soc_tplg *tplg,
        struct snd_soc_dapm_widget *w, struct snd_soc_tplg_dapm_widget *tplg_w)
  {
-       if (tplg->comp && tplg->ops && tplg->ops->widget_load)
+       if (tplg->ops && tplg->ops->widget_load)
                return tplg->ops->widget_load(tplg->comp, tplg->index, w,
                        tplg_w);
  
  static int soc_tplg_widget_ready(struct soc_tplg *tplg,
        struct snd_soc_dapm_widget *w, struct snd_soc_tplg_dapm_widget *tplg_w)
  {
-       if (tplg->comp && tplg->ops && tplg->ops->widget_ready)
+       if (tplg->ops && tplg->ops->widget_ready)
                return tplg->ops->widget_ready(tplg->comp, tplg->index, w,
                        tplg_w);
  
@@@ -307,7 -307,7 +307,7 @@@ static int soc_tplg_dai_load(struct soc
        struct snd_soc_dai_driver *dai_drv,
        struct snd_soc_tplg_pcm *pcm, struct snd_soc_dai *dai)
  {
-       if (tplg->comp && tplg->ops && tplg->ops->dai_load)
+       if (tplg->ops && tplg->ops->dai_load)
                return tplg->ops->dai_load(tplg->comp, tplg->index, dai_drv,
                        pcm, dai);
  
  static int soc_tplg_dai_link_load(struct soc_tplg *tplg,
        struct snd_soc_dai_link *link, struct snd_soc_tplg_link_config *cfg)
  {
-       if (tplg->comp && tplg->ops && tplg->ops->link_load)
+       if (tplg->ops && tplg->ops->link_load)
                return tplg->ops->link_load(tplg->comp, tplg->index, link, cfg);
  
        return 0;
  /* tell the component driver that all firmware has been loaded in this request */
  static void soc_tplg_complete(struct soc_tplg *tplg)
  {
-       if (tplg->comp && tplg->ops && tplg->ops->complete)
+       if (tplg->ops && tplg->ops->complete)
                tplg->ops->complete(tplg->comp);
  }
  
@@@ -684,7 -684,7 +684,7 @@@ EXPORT_SYMBOL_GPL(snd_soc_tplg_widget_b
  static int soc_tplg_init_kcontrol(struct soc_tplg *tplg,
        struct snd_kcontrol_new *k, struct snd_soc_tplg_ctl_hdr *hdr)
  {
-       if (tplg->comp && tplg->ops && tplg->ops->control_load)
+       if (tplg->ops && tplg->ops->control_load)
                return tplg->ops->control_load(tplg->comp, tplg->index, k,
                        hdr);
  
@@@ -1174,7 -1174,7 +1174,7 @@@ static int soc_tplg_kcontrol_elems_load
  static int soc_tplg_add_route(struct soc_tplg *tplg,
        struct snd_soc_dapm_route *route)
  {
-       if (tplg->comp && tplg->ops && tplg->ops->dapm_route_load)
+       if (tplg->ops && tplg->ops->dapm_route_load)
                return tplg->ops->dapm_route_load(tplg->comp, tplg->index,
                        route);
  
@@@ -1909,10 -1909,6 +1909,10 @@@ static int soc_tplg_fe_link_create(stru
        link->num_codecs = 1;
        link->num_platforms = 1;
  
 +      link->dobj.index = tplg->index;
 +      link->dobj.ops = tplg->ops;
 +      link->dobj.type = SND_SOC_DOBJ_DAI_LINK;
 +
        if (strlen(pcm->pcm_name)) {
                link->name = kstrdup(pcm->pcm_name, GFP_KERNEL);
                link->stream_name = kstrdup(pcm->pcm_name, GFP_KERNEL);
                goto err;
        }
  
 -      link->dobj.index = tplg->index;
 -      link->dobj.ops = tplg->ops;
 -      link->dobj.type = SND_SOC_DOBJ_DAI_LINK;
        list_add(&link->dobj.list, &tplg->comp->dobj_list);
  
        return 0;
@@@ -2564,7 -2563,7 +2564,7 @@@ static int soc_tplg_manifest_load(struc
        }
  
        /* pass control to component driver for optional further init */
-       if (tplg->comp && tplg->ops && tplg->ops->manifest)
+       if (tplg->ops && tplg->ops->manifest)
                ret = tplg->ops->manifest(tplg->comp, tplg->index, _manifest);
  
        if (!abi_match) /* free the duplicated one */
@@@ -2736,6 -2735,10 +2736,10 @@@ int snd_soc_tplg_component_load(struct 
        struct soc_tplg tplg;
        int ret;
  
+       /* component needs to exist to keep and reference data while parsing */
+       if (!comp)
+               return -EINVAL;
        /* setup parsing context */
        memset(&tplg, 0, sizeof(tplg));
        tplg.fw = fw;
@@@ -2774,7 -2777,7 +2778,7 @@@ void snd_soc_tplg_widget_remove_all(str
  {
        struct snd_soc_dapm_widget *w, *next_w;
  
 -      list_for_each_entry_safe(w, next_w, &dapm->card->widgets, list) {
 +      for_each_card_widgets_safe(dapm->card, w, next_w) {
  
                /* make sure we are a widget with correct context */
                if (w->dobj.type != SND_SOC_DOBJ_WIDGET || w->dapm != dapm)
@@@ -547,6 -547,8 +547,8 @@@ int hda_dsp_stream_hw_free(struct snd_s
                                        SOF_HDA_REG_PP_PPCTL, mask, 0);
        spin_unlock_irq(&bus->reg_lock);
  
+       stream->substream = NULL;
        return 0;
  }
  
@@@ -571,22 -573,6 +573,22 @@@ bool hda_dsp_check_stream_irq(struct sn
        return ret;
  }
  
 +static void
 +hda_dsp_set_bytes_transferred(struct hdac_stream *hstream, u64 buffer_size)
 +{
 +      u64 prev_pos, pos, num_bytes;
 +
 +      div64_u64_rem(hstream->curr_pos, buffer_size, &prev_pos);
 +      pos = snd_hdac_stream_get_pos_posbuf(hstream);
 +
 +      if (pos < prev_pos)
 +              num_bytes = (buffer_size - prev_pos) +  pos;
 +      else
 +              num_bytes = pos - prev_pos;
 +
 +      hstream->curr_pos += num_bytes;
 +}
 +
  static bool hda_dsp_stream_check(struct hdac_bus *bus, u32 status)
  {
        struct sof_intel_hda_dev *sof_hda = bus_to_sof_hda(bus);
                        snd_hdac_stream_writeb(s, SD_STS, sd_status);
  
                        active = true;
 -                      if (!s->substream ||
 +                      if ((!s->substream && !s->cstream) ||
                            !s->running ||
                            (sd_status & SOF_HDA_CL_DMA_SD_INT_COMPLETE) == 0)
                                continue;
  
                        /* Inform ALSA only in case not do that with IPC */
 -                      if (sof_hda->no_ipc_position)
 +                      if (s->substream && sof_hda->no_ipc_position) {
                                snd_sof_pcm_period_elapsed(s->substream);
 +                      } else if (s->cstream) {
 +                              hda_dsp_set_bytes_transferred(s,
 +                                      s->cstream->runtime->buffer_size);
 +                              snd_compr_fragment_elapsed(s->cstream);
 +                      }
                }
        }