diff --git a/arch/riscv/boot/dts/thead/Makefile b/arch/riscv/boot/dts/thead/Makefile
index 1326a77fd1e9..843ca68be69a 100644
--- a/arch/riscv/boot/dts/thead/Makefile
+++ b/arch/riscv/boot/dts/thead/Makefile
@@ -1,11 +1,4 @@
 # SPDX-License-Identifier: GPL-2.0
-dtb-$(CONFIG_SOC_THEAD) += light-fm-emu.dtb light_mpw.dtb
-dtb-$(CONFIG_SOC_THEAD) += light-fm-emu-npu-fce.dtb
-dtb-$(CONFIG_SOC_THEAD) += light-fm-emu-gpu.dtb
-dtb-$(CONFIG_SOC_THEAD) += light-fm-emu-dsp.dtb
-dtb-$(CONFIG_SOC_THEAD) += light-fm-emu-audio.dtb light-a-val-audio-hdmi.dtb
-dtb-$(CONFIG_SOC_THEAD) += light-fm-emu-hdmi.dtb
-dtb-$(CONFIG_SOC_THEAD) += light-fm-emu-dsi0-hdmi.dtb
 dtb-$(CONFIG_SOC_THEAD) += light-a-val.dtb light-a-val-sv.dtb
 dtb-$(CONFIG_SOC_THEAD) += light-a-val-ddr2G.dtb light-a-val-ddr1G.dtb
 dtb-$(CONFIG_SOC_THEAD) += light-a-val-npu-fce.dtb
@@ -18,20 +11,6 @@ dtb-$(CONFIG_SOC_THEAD) += light-a-val-gpio-keys.dtb
 dtb-$(CONFIG_SOC_THEAD) += light-a-val-sec.dtb
 dtb-$(CONFIG_SOC_THEAD) += light-a-val-miniapp-hdmi.dtb
 dtb-$(CONFIG_SOC_THEAD) += light-a-product.dtb
-dtb-$(CONFIG_SOC_THEAD) += light-b-product.dtb
-dtb-$(CONFIG_SOC_THEAD) += light-b-product-ddr1G.dtb
-dtb-$(CONFIG_SOC_THEAD) += light-b-product-miniapp-hdmi.dtb
 dtb-$(CONFIG_SOC_THEAD) += light-a-val-full.dtb
-dtb-$(CONFIG_SOC_THEAD) += light-ant-ref.dtb
-dtb-$(CONFIG_SOC_THEAD) += light-ant-discrete.dtb
 dtb-$(CONFIG_SOC_THEAD) += light-beagle.dtb
 dtb-$(CONFIG_SOC_THEAD) += light-lpi4a.dtb light-lpi4a-ddr2G.dtb
-dtb-$(CONFIG_SOC_THEAD) += light-a-ref.dtb light-a-ref-dsi0.dtb light-a-ref-dsi0-hdmi.dtb
-dtb-$(CONFIG_SOC_THEAD) += light-b-ref.dtb
-dtb-$(CONFIG_SOC_THEAD) += light-a-val-crash.dtb light-b-product-crash.dtb light-ant-ref-crash.dtb light-ant-discrete-crash.dtb
-dtb-$(CONFIG_SOC_THEAD) += light-b-power.dtb
-
-dtb-$(CONFIG_SOC_THEAD) += light-a-val-android.dtb
-
-dtb-$(CONFIG_SOC_THEAD) += fire-emu.dtb fire-emu-crash.dtb
-dtb-$(CONFIG_SOC_THEAD) += fire-emu-soc-base.dtb fire-emu-soc-c910x4.dtb fire-emu-gpu-dpu-dsi0.dtb fire-emu-vi-dsp-vo.dtb fire-emu-vi-vp-vo.dtb
diff --git a/drivers/bluetooth/hci_h4.c b/drivers/bluetooth/hci_h4.c
index 2d2d06465835..6fd23fe1ed32 100644
--- a/drivers/bluetooth/hci_h4.c
+++ b/drivers/bluetooth/hci_h4.c
@@ -321,12 +321,12 @@ int __init h4_init(void)
 	return err;
 }
 
-#if 0
 int __exit h4_deinit(void)
 {
 	return hci_uart_unregister_proto(&h4p);
 }
 
+#if 0
 struct sk_buff *h4_recv_buf(struct hci_dev *hdev, struct sk_buff *skb,
 			    const unsigned char *buffer, int count,
 			    const struct h4_recv_pkt *pkts, int pkts_count)
diff --git a/drivers/bluetooth/hci_ldisc.c b/drivers/bluetooth/hci_ldisc.c
index ce06cfaebd92..e6b7ee07c2dc 100644
--- a/drivers/bluetooth/hci_ldisc.c
+++ b/drivers/bluetooth/hci_ldisc.c
@@ -1259,7 +1259,6 @@ static unsigned int hci_uart_tty_poll(struct tty_struct *tty,
 
 static struct tty_ldisc_ops hci_uart_ldisc = {
 	.owner          = THIS_MODULE,
-	.magic          = TTY_LDISC_MAGIC,
 	.name           = "n_hci",
 	.open           = hci_uart_tty_open,
 	.close          = hci_uart_tty_close,
diff --git a/drivers/cpufreq/light-mpw-cpufreq.c b/drivers/cpufreq/light-mpw-cpufreq.c
index b6b4ac8651fd..63d8a375dd7b 100644
--- a/drivers/cpufreq/light-mpw-cpufreq.c
+++ b/drivers/cpufreq/light-mpw-cpufreq.c
@@ -11,6 +11,7 @@
 #include <linux/module.h>
 #include <linux/of.h>
 #include <linux/of_address.h>
+#include <linux/panic_notifier.h>
 #include <linux/pm_opp.h>
 #include <linux/platform_device.h>
 #include <linux/reboot.h>
diff --git a/drivers/gpu-viv/hal/os/linux/kernel/allocator/default/gc_hal_kernel_allocator_dmabuf.c b/drivers/gpu-viv/hal/os/linux/kernel/allocator/default/gc_hal_kernel_allocator_dmabuf.c
index 67cd083dcf3c..bd93da4911e6 100644
--- a/drivers/gpu-viv/hal/os/linux/kernel/allocator/default/gc_hal_kernel_allocator_dmabuf.c
+++ b/drivers/gpu-viv/hal/os/linux/kernel/allocator/default/gc_hal_kernel_allocator_dmabuf.c
@@ -65,6 +65,7 @@
 #include <linux/dma-mapping.h>
 
 #include <linux/dma-buf.h>
+#include <linux/dma-resv.h>
 #include <linux/platform_device.h>
 
 #define _GC_OBJ_ZONE gcvZONE_OS
@@ -117,7 +118,7 @@ static int dma_buf_info_show(struct seq_file* m, void* data)
     list_for_each_entry(buf_desc, &priv->buf_list, list) {
         struct dma_buf *buf_obj = buf_desc->dmabuf;
 
-        ret = mutex_lock_interruptible(&buf_obj->lock);
+        ret = dma_resv_lock_interruptible(buf_obj->resv, NULL);
 
         if (ret) {
             seq_puts(m,
@@ -147,7 +148,7 @@ static int dma_buf_info_show(struct seq_file* m, void* data)
         size += buf_obj->size;
         npages += buf_desc->npages;
 
-        mutex_unlock(&buf_obj->lock);
+        dma_resv_unlock(buf_obj->resv);
     }
 
     seq_printf(m, "\nTotal %d objects, %d pages, %zu bytes\n", count, npages, size);
diff --git a/drivers/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_debug.h b/drivers/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_debug.h
index a41838026076..8bb1caf80413 100644
--- a/drivers/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_debug.h
+++ b/drivers/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_debug.h
@@ -59,7 +59,6 @@
 #include <gc_hal_kernel_linux.h>
 #include <linux/spinlock.h>
 #include <linux/time.h>
-#include <stdarg.h>
 
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0)
 #include <linux/nmi.h>
diff --git a/drivers/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_debugfs.h b/drivers/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_debugfs.h
index dc0257fff5d2..ceb33926a843 100644
--- a/drivers/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_debugfs.h
+++ b/drivers/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_debugfs.h
@@ -53,7 +53,6 @@
 *****************************************************************************/
 
 
-#include <stdarg.h>
 
 #ifndef __gc_hal_kernel_debugfs_h_
 #define __gc_hal_kernel_debugfs_h_
diff --git a/drivers/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_driver.c b/drivers/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_driver.c
index 5eab55ae1051..ed055bcc6878 100644
--- a/drivers/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_driver.c
+++ b/drivers/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_driver.c
@@ -72,6 +72,8 @@ MODULE_LICENSE("Dual MIT/GPL");
 MODULE_IMPORT_NS(VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver);
 #endif
 
+MODULE_IMPORT_NS(DMA_BUF);
+
 static struct class* gpuClass = NULL;
 
 static gcsPLATFORM *platform = NULL;
diff --git a/drivers/gpu/drm/panel/panel-himax8394.c b/drivers/gpu/drm/panel/panel-himax8394.c
index dfaec2b351f2..b8464231074d 100644
--- a/drivers/gpu/drm/panel/panel-himax8394.c
+++ b/drivers/gpu/drm/panel/panel-himax8394.c
@@ -384,7 +384,7 @@ static int hx8394_panel_probe(struct mipi_dsi_device *dsi)
 	return err;
 }
 
-static int hx8394_panel_remove(struct mipi_dsi_device *dsi)
+static void hx8394_panel_remove(struct mipi_dsi_device *dsi)
 {
 	struct panel_info *pinfo = mipi_dsi_get_drvdata(dsi);
 	int err;
@@ -403,7 +403,7 @@ static int hx8394_panel_remove(struct mipi_dsi_device *dsi)
 
 	drm_panel_remove(&pinfo->base);
 
-	return 0;
+	return;
 }
 
 static void hx8394_panel_shutdown(struct mipi_dsi_device *dsi)
diff --git a/drivers/gpu/drm/panel/panel-ili9881d.c b/drivers/gpu/drm/panel/panel-ili9881d.c
index ccfae0538764..2705a5153391 100644
--- a/drivers/gpu/drm/panel/panel-ili9881d.c
+++ b/drivers/gpu/drm/panel/panel-ili9881d.c
@@ -762,7 +762,7 @@ static int i2c_md_probe(struct i2c_client *i2c, const struct i2c_device_id *id)
 	return 0;
 }
 
-static int i2c_md_remove(struct i2c_client *i2c)
+static void i2c_md_remove(struct i2c_client *i2c)
 {
 	struct i2c_mipi_dsi *md = i2c_get_clientdata(i2c);
 
@@ -777,7 +777,7 @@ static int i2c_md_remove(struct i2c_client *i2c)
 	mipi_dsi_detach(md->dsi);
 	drm_panel_remove(&md->panel);
 
-	return 0;
+	return;
 }
 
 static void i2c_md_shutdown(struct i2c_client *i2c)
@@ -879,14 +879,14 @@ static int ili9881d_dsi_probe(struct mipi_dsi_device *dsi)
 	return mipi_dsi_attach(dsi);
 }
 
-static int ili9881d_dsi_remove(struct mipi_dsi_device *dsi)
+static void ili9881d_dsi_remove(struct mipi_dsi_device *dsi)
 {
 	struct i2c_mipi_dsi *ctx = mipi_dsi_get_drvdata(dsi);
 
 	mipi_dsi_detach(dsi);
 	drm_panel_remove(&ctx->panel);
 
-	return 0;
+	return;
 }
 
 static const struct of_device_id ili9881d_of_match[] = {
diff --git a/drivers/gpu/drm/verisilicon/dw_mipi_dsi.c b/drivers/gpu/drm/verisilicon/dw_mipi_dsi.c
index 735ee0c49844..7b5f8c6cc0fd 100644
--- a/drivers/gpu/drm/verisilicon/dw_mipi_dsi.c
+++ b/drivers/gpu/drm/verisilicon/dw_mipi_dsi.c
@@ -31,6 +31,8 @@
 #include <drm/drmP.h>
 #endif
 
+#include <uapi/linux/media-bus-format.h>
+
 #include "dw_mipi_dsi.h"
 
 #define DSI_VERSION         0x00
diff --git a/drivers/gpu/drm/verisilicon/vs_crtc.c b/drivers/gpu/drm/verisilicon/vs_crtc.c
index 6db5805fa2d6..fffbcb3c8b6d 100644
--- a/drivers/gpu/drm/verisilicon/vs_crtc.c
+++ b/drivers/gpu/drm/verisilicon/vs_crtc.c
@@ -11,6 +11,8 @@
 #include <drm/drm_crtc.h>
 #include <drm/vs_drm.h>
 
+#include <uapi/linux/media-bus-format.h>
+
 #include "vs_crtc.h"
 
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 5, 0)
@@ -210,7 +212,6 @@ static const struct drm_crtc_funcs vs_crtc_funcs = {
     .atomic_destroy_state   = vs_crtc_atomic_destroy_state,
     .atomic_set_property    = vs_crtc_atomic_set_property,
     .atomic_get_property    = vs_crtc_atomic_get_property,
-    .gamma_set      = drm_atomic_helper_legacy_gamma_set,
     .late_register      = vs_crtc_late_register,
     .enable_vblank      = vs_crtc_enable_vblank,
     .disable_vblank     = vs_crtc_disable_vblank,
@@ -260,7 +261,7 @@ static bool vs_crtc_mode_fixup(struct drm_crtc *crtc,
 }
 
 static void vs_crtc_atomic_enable(struct drm_crtc *crtc,
-                  struct drm_crtc_state *old_state)
+                  struct drm_atomic_state *old_state)
 {
     struct vs_crtc *vs_crtc = to_vs_crtc(crtc);
     struct vs_crtc_state *vs_crtc_state = to_vs_crtc_state(crtc->state);
@@ -275,7 +276,7 @@ static void vs_crtc_atomic_enable(struct drm_crtc *crtc,
 }
 
 static void vs_crtc_atomic_disable(struct drm_crtc *crtc,
-                   struct drm_crtc_state *old_state)
+                   struct drm_atomic_state *old_state)
 {
     struct vs_crtc *vs_crtc = to_vs_crtc(crtc);
 
@@ -295,7 +296,7 @@ static void vs_crtc_atomic_disable(struct drm_crtc *crtc,
 }
 
 static void vs_crtc_atomic_begin(struct drm_crtc *crtc,
-                 struct drm_crtc_state *old_crtc_state)
+                 struct drm_atomic_state *old_crtc_state)
 {
     struct vs_crtc *vs_crtc = to_vs_crtc(crtc);
     struct device *dev = vs_crtc->dev;
@@ -315,7 +316,7 @@ static void vs_crtc_atomic_begin(struct drm_crtc *crtc,
 }
 
 static void vs_crtc_atomic_flush(struct drm_crtc *crtc,
-                 struct drm_crtc_state *old_crtc_state)
+                 struct drm_atomic_state *old_crtc_state)
 {
     struct vs_crtc *vs_crtc = to_vs_crtc(crtc);
     struct drm_pending_vblank_event *event = crtc->state->event;
diff --git a/drivers/gpu/drm/verisilicon/vs_dc.c b/drivers/gpu/drm/verisilicon/vs_dc.c
index 2f2b7a3c52ee..ecb042b73e5e 100644
--- a/drivers/gpu/drm/verisilicon/vs_dc.c
+++ b/drivers/gpu/drm/verisilicon/vs_dc.c
@@ -16,6 +16,7 @@
 #include <drm/drm_atomic.h>
 #include <drm/drm_atomic_helper.h>
 #include <drm/vs_drm.h>
+#include <drm/drm_blend.h>
 
 #include "vs_type.h"
 #include "vs_dc_hw.h"
diff --git a/drivers/gpu/drm/verisilicon/vs_dc_hw.c b/drivers/gpu/drm/verisilicon/vs_dc_hw.c
index d73dc90517cc..25ac87bcf5ff 100644
--- a/drivers/gpu/drm/verisilicon/vs_dc_hw.c
+++ b/drivers/gpu/drm/verisilicon/vs_dc_hw.c
@@ -9,6 +9,8 @@
 #include <linux/media-bus-format.h>
 
 #include <drm/vs_drm.h>
+#include <drm/drm_blend.h>
+#include <drm/drm_atomic_helper.h>
 
 #include "vs_type.h"
 #include "vs_dc_hw.h"
@@ -581,8 +583,8 @@ static const struct vs_plane_info dc_hw_planes[][PLANE_NUM] = {
         .color_encoding = BIT(DRM_COLOR_YCBCR_BT709) |
                           BIT(DRM_COLOR_YCBCR_BT2020),
         .degamma_size   = DEGAMMA_SIZE,
-        .min_scale   = DRM_PLANE_HELPER_NO_SCALING,
-        .max_scale   = DRM_PLANE_HELPER_NO_SCALING,
+        .min_scale   = DRM_PLANE_NO_SCALING,
+        .max_scale   = DRM_PLANE_NO_SCALING,
         .zpos        = 2,
         .watermark   = true,
         .color_mgmt  = true,
@@ -669,8 +671,8 @@ static const struct vs_plane_info dc_hw_planes[][PLANE_NUM] = {
         .color_encoding = BIT(DRM_COLOR_YCBCR_BT709) |
                           BIT(DRM_COLOR_YCBCR_BT2020),
         .degamma_size   = DEGAMMA_SIZE,
-        .min_scale   = DRM_PLANE_HELPER_NO_SCALING,
-        .max_scale   = DRM_PLANE_HELPER_NO_SCALING,
+        .min_scale   = DRM_PLANE_NO_SCALING,
+        .max_scale   = DRM_PLANE_NO_SCALING,
         .zpos        = 5,
         .watermark   = true,
         .color_mgmt  = true,
@@ -690,8 +692,8 @@ static const struct vs_plane_info dc_hw_planes[][PLANE_NUM] = {
         .max_height  = 64,
         .rotation    = 0,
         .degamma_size = 0,
-        .min_scale   = DRM_PLANE_HELPER_NO_SCALING,
-        .max_scale   = DRM_PLANE_HELPER_NO_SCALING,
+        .min_scale   = DRM_PLANE_NO_SCALING,
+        .max_scale   = DRM_PLANE_NO_SCALING,
         .zpos        = 255,
         .watermark   = false,
         .color_mgmt  = false,
@@ -711,8 +713,8 @@ static const struct vs_plane_info dc_hw_planes[][PLANE_NUM] = {
         .max_height  = 64,
         .rotation    = 0,
         .degamma_size = 0,
-        .min_scale   = DRM_PLANE_HELPER_NO_SCALING,
-        .max_scale   = DRM_PLANE_HELPER_NO_SCALING,
+        .min_scale   = DRM_PLANE_NO_SCALING,
+        .max_scale   = DRM_PLANE_NO_SCALING,
         .zpos        = 255,
         .watermark   = false,
         .color_mgmt  = false,
@@ -859,8 +861,8 @@ static const struct vs_plane_info dc_hw_planes[][PLANE_NUM] = {
         .max_height  = 64,
         .rotation    = 0,
         .degamma_size = 0,
-        .min_scale   = DRM_PLANE_HELPER_NO_SCALING,
-        .max_scale   = DRM_PLANE_HELPER_NO_SCALING,
+        .min_scale   = DRM_PLANE_NO_SCALING,
+        .max_scale   = DRM_PLANE_NO_SCALING,
         .zpos        = 255,
         .watermark   = false,
         .color_mgmt  = false,
@@ -880,8 +882,8 @@ static const struct vs_plane_info dc_hw_planes[][PLANE_NUM] = {
         .max_height  = 64,
         .rotation    = 0,
         .degamma_size = 0,
-        .min_scale   = DRM_PLANE_HELPER_NO_SCALING,
-        .max_scale   = DRM_PLANE_HELPER_NO_SCALING,
+        .min_scale   = DRM_PLANE_NO_SCALING,
+        .max_scale   = DRM_PLANE_NO_SCALING,
         .zpos        = 255,
         .watermark   = false,
         .color_mgmt  = false,
@@ -971,8 +973,8 @@ static const struct vs_plane_info dc_hw_planes[][PLANE_NUM] = {
         .color_encoding = BIT(DRM_COLOR_YCBCR_BT709) |
                           BIT(DRM_COLOR_YCBCR_BT2020),
         .degamma_size   = DEGAMMA_SIZE,
-        .min_scale   = DRM_PLANE_HELPER_NO_SCALING,
-        .max_scale   = DRM_PLANE_HELPER_NO_SCALING,
+        .min_scale   = DRM_PLANE_NO_SCALING,
+        .max_scale   = DRM_PLANE_NO_SCALING,
         .zpos        = 2,
         .watermark   = true,
         .color_mgmt  = true,
@@ -1059,8 +1061,8 @@ static const struct vs_plane_info dc_hw_planes[][PLANE_NUM] = {
         .color_encoding = BIT(DRM_COLOR_YCBCR_BT709) |
                           BIT(DRM_COLOR_YCBCR_BT2020),
         .degamma_size   = DEGAMMA_SIZE,
-        .min_scale   = DRM_PLANE_HELPER_NO_SCALING,
-        .max_scale   = DRM_PLANE_HELPER_NO_SCALING,
+        .min_scale   = DRM_PLANE_NO_SCALING,
+        .max_scale   = DRM_PLANE_NO_SCALING,
         .zpos        = 5,
         .watermark   = true,
         .color_mgmt  = true,
@@ -1080,8 +1082,8 @@ static const struct vs_plane_info dc_hw_planes[][PLANE_NUM] = {
         .max_height  = 64,
         .rotation    = 0,
         .degamma_size = 0,
-        .min_scale   = DRM_PLANE_HELPER_NO_SCALING,
-        .max_scale   = DRM_PLANE_HELPER_NO_SCALING,
+        .min_scale   = DRM_PLANE_NO_SCALING,
+        .max_scale   = DRM_PLANE_NO_SCALING,
         .zpos        = 255,
         .watermark   = false,
         .color_mgmt  = false,
@@ -1101,8 +1103,8 @@ static const struct vs_plane_info dc_hw_planes[][PLANE_NUM] = {
         .max_height  = 64,
         .rotation    = 0,
         .degamma_size = 0,
-        .min_scale   = DRM_PLANE_HELPER_NO_SCALING,
-        .max_scale   = DRM_PLANE_HELPER_NO_SCALING,
+        .min_scale   = DRM_PLANE_NO_SCALING,
+        .max_scale   = DRM_PLANE_NO_SCALING,
         .zpos        = 255,
         .watermark   = false,
         .color_mgmt  = false,
@@ -1121,9 +1123,9 @@ static const struct vs_dc_info dc_info[] = {
         .layer_num      = 6,
         .max_bpc        = 10,
         .color_formats  = DRM_COLOR_FORMAT_RGB444 |
-                          DRM_COLOR_FORMAT_YCRCB444 |
-                          DRM_COLOR_FORMAT_YCRCB422 |
-                          DRM_COLOR_FORMAT_YCRCB420,
+                          DRM_COLOR_FORMAT_YCBCR444 |
+                          DRM_COLOR_FORMAT_YCBCR422 |
+                          DRM_COLOR_FORMAT_YCBCR420,
         .gamma_size     = GAMMA_EX_SIZE,
         .gamma_bits     = 12,
         .pitch_alignment    = 128,
@@ -1142,9 +1144,9 @@ static const struct vs_dc_info dc_info[] = {
         .layer_num      = 4,
         .max_bpc        = 10,
         .color_formats  = DRM_COLOR_FORMAT_RGB444 |
-                          DRM_COLOR_FORMAT_YCRCB444 |
-                          DRM_COLOR_FORMAT_YCRCB422 |
-                          DRM_COLOR_FORMAT_YCRCB420,
+                          DRM_COLOR_FORMAT_YCBCR444 |
+                          DRM_COLOR_FORMAT_YCBCR422 |
+                          DRM_COLOR_FORMAT_YCBCR420,
         .gamma_size     = GAMMA_EX_SIZE,
         .gamma_bits     = 12,
         .pitch_alignment    = 128,
@@ -1163,9 +1165,9 @@ static const struct vs_dc_info dc_info[] = {
         .layer_num      = 6,
         .max_bpc        = 10,
         .color_formats  = DRM_COLOR_FORMAT_RGB444 |
-                          DRM_COLOR_FORMAT_YCRCB444 |
-                          DRM_COLOR_FORMAT_YCRCB422 |
-                          DRM_COLOR_FORMAT_YCRCB420,
+                          DRM_COLOR_FORMAT_YCBCR444 |
+                          DRM_COLOR_FORMAT_YCBCR422 |
+                          DRM_COLOR_FORMAT_YCBCR420,
         .gamma_size     = GAMMA_EX_SIZE,
         .gamma_bits     = 12,
         .pitch_alignment    = 128,
diff --git a/drivers/gpu/drm/verisilicon/vs_drv.c b/drivers/gpu/drm/verisilicon/vs_drv.c
index 7d5932661893..52037217b87e 100644
--- a/drivers/gpu/drm/verisilicon/vs_drv.c
+++ b/drivers/gpu/drm/verisilicon/vs_drv.c
@@ -10,6 +10,7 @@
 
 #include <drm/drm_of.h>
 #include <drm/drm_crtc.h>
+#include <drm/drm_fbdev_generic.h>
 #include <drm/drm_crtc_helper.h>
 #include <drm/drm_probe_helper.h>
 #include <drm/drm_fb_helper.h>
@@ -74,8 +75,6 @@ static int vs_debugfs_planes_show(struct seq_file *s, void *data)
                DRM_RECT_ARG(&plane_state->status.dest));
         seq_printf(s, "\tsrc-pos = " DRM_RECT_FP_FMT "\n",
                DRM_RECT_FP_ARG(&plane_state->status.src));
-        seq_printf(s, "\tformat = %s\n", state->fb ?
-               plane_state->status.format_name.str : "(null)");
         seq_printf(s, "\trotation = 0x%x\n", state->rotation);
         seq_printf(s, "\ttiling = %u\n",
                plane_state->status.tile_mode);
@@ -231,8 +230,6 @@ static int vs_drm_bind(struct device *dev)
 
     drm_mode_config_reset(drm_dev);
 
-    drm_dev->irq_enabled = true;
-
     drm_kms_helper_poll_init(drm_dev);
 
     ret = drm_dev_register(drm_dev, 0);
diff --git a/drivers/gpu/drm/verisilicon/vs_fb.c b/drivers/gpu/drm/verisilicon/vs_fb.c
index 3be674122932..1fc01efa3c12 100644
--- a/drivers/gpu/drm/verisilicon/vs_fb.c
+++ b/drivers/gpu/drm/verisilicon/vs_fb.c
@@ -17,6 +17,7 @@
 #include <drm/drm_fb_helper.h>
 #include <drm/drm_crtc_helper.h>
 #include <drm/drm_gem_framebuffer_helper.h>
+#include <drm/drm_framebuffer.h>
 
 #include "vs_fb.h"
 #include "vs_gem.h"
@@ -176,7 +177,7 @@ static struct drm_mode_config_helper_funcs vs_mode_config_helpers = {
 
 void vs_mode_config_init(struct drm_device *dev)
 {
-    dev->mode_config.allow_fb_modifiers = true;
+    dev->mode_config.fb_modifiers_not_supported = false;
 
     if (dev->mode_config.max_width == 0 ||
         dev->mode_config.max_height == 0) {
diff --git a/drivers/gpu/drm/verisilicon/vs_gem.c b/drivers/gpu/drm/verisilicon/vs_gem.c
index 310bd31bc9e2..d58dcb10ca12 100644
--- a/drivers/gpu/drm/verisilicon/vs_gem.c
+++ b/drivers/gpu/drm/verisilicon/vs_gem.c
@@ -4,6 +4,8 @@
  */
 
 #include <linux/dma-buf.h>
+#include <drm/drm_device.h>
+#include <drm/drm_prime.h>
 
 #include "vs_drv.h"
 #include "vs_gem.h"
@@ -164,8 +166,8 @@ static int vs_gem_alloc_buf(struct vs_gem_object *vs_obj)
             goto err_mem_free;
         }
 
-        if (drm_prime_sg_to_page_addr_arrays(&sgt, vs_obj->pages,
-                             NULL, nr_pages)) {
+        if (drm_prime_sg_to_page_array(&sgt, vs_obj->pages,
+                                       nr_pages)) {
             DRM_DEV_ERROR(dev->dev, "invalid sgtable.\n");
             ret = -EINVAL;
             goto err_sgt_free;
@@ -386,7 +388,7 @@ struct sg_table *vs_gem_prime_get_sg_table(struct drm_gem_object *obj)
 #endif
 }
 
-static void *vs_gem_prime_vmap(struct drm_gem_object *obj)
+static int vs_gem_prime_vmap(struct drm_gem_object *obj, struct iosys_map *map)
 {
     struct vs_gem_object *vs_obj = to_vs_gem_object(obj);
 
@@ -394,7 +396,7 @@ static void *vs_gem_prime_vmap(struct drm_gem_object *obj)
            page_address(vs_obj->cookie) : vs_obj->cookie;
 }
 
-static void vs_gem_prime_vunmap(struct drm_gem_object *obj, void *vaddr)
+static void vs_gem_prime_vunmap(struct drm_gem_object *obj, struct iosys_map *map)
 {
     /* Nothing to do */
 }
@@ -512,8 +514,7 @@ vs_gem_prime_import_sg_table(struct drm_device *dev,
         goto err;
     }
 
-    ret = drm_prime_sg_to_page_addr_arrays(sgt, vs_obj->pages, NULL,
-                           npages);
+    ret = drm_prime_sg_to_page_array(sgt, vs_obj->pages, npages);
     if (ret)
         goto err_free_page;
 
diff --git a/drivers/gpu/drm/verisilicon/vs_plane.c b/drivers/gpu/drm/verisilicon/vs_plane.c
index d589879468de..70e204f8cec0 100644
--- a/drivers/gpu/drm/verisilicon/vs_plane.c
+++ b/drivers/gpu/drm/verisilicon/vs_plane.c
@@ -5,10 +5,10 @@
 
 #include <drm/drm_atomic.h>
 #include <drm/drm_atomic_helper.h>
+#include <drm/drm_blend.h>
 #include <drm/drm_plane_helper.h>
-#include <drm/drm_fb_cma_helper.h>
-#include <drm/drm_gem_cma_helper.h>
 #include <drm/vs_drm.h>
+#include <drm/drm_framebuffer.h>
 
 #include "vs_type.h"
 #include "vs_crtc.h"
@@ -211,7 +211,7 @@ static unsigned char vs_get_plane_number(struct drm_framebuffer *fb)
     if (!fb)
         return 0;
 
-    info = drm_format_info(fb->format->format);
+    info = fb->format;
     if (!info || info->num_planes > MAX_NUM_PLANES)
         return 0;
 
@@ -219,21 +219,23 @@ static unsigned char vs_get_plane_number(struct drm_framebuffer *fb)
 }
 
 static int vs_plane_atomic_check(struct drm_plane *plane,
-                 struct drm_plane_state *state)
+                 struct drm_atomic_state *state)
 {
     struct vs_plane *vs_plane = to_vs_plane(plane);
-    struct drm_framebuffer *fb = state->fb;
-    struct drm_crtc *crtc = state->crtc;
+    struct drm_plane_state *new_plane_state = 
+        drm_atomic_get_new_plane_state(state, plane);
+    struct drm_framebuffer *fb = new_plane_state->fb;
+    struct drm_crtc *crtc = new_plane_state->crtc;
     struct vs_crtc *vs_crtc = to_vs_crtc(crtc);
 
     if (!crtc || !fb)
         return 0;
 
-    return vs_plane->funcs->check(vs_crtc->dev, vs_plane, state);
+    return vs_plane->funcs->check(vs_crtc->dev, vs_plane, new_plane_state);
 }
 
 static void vs_plane_atomic_update(struct drm_plane *plane,
-                   struct drm_plane_state *old_state)
+                   struct drm_atomic_state *old_state)
 {
     unsigned char i, num_planes;
     struct drm_framebuffer *fb;
@@ -241,7 +243,6 @@ static void vs_plane_atomic_update(struct drm_plane *plane,
     struct drm_plane_state *state = plane->state;
     struct vs_crtc *vs_crtc = to_vs_crtc(state->crtc);
     struct vs_plane_state *plane_state = to_vs_plane_state(state);
-    struct drm_format_name_buf *name = &plane_state->status.format_name;
 
     if (!state->fb || !state->crtc)
         return;
@@ -259,15 +260,16 @@ static void vs_plane_atomic_update(struct drm_plane *plane,
 
     plane_state->status.src = drm_plane_state_src(state);
     plane_state->status.dest = drm_plane_state_dest(state);
-    drm_get_format_name(fb->format->format, name);
 
     vs_plane->funcs->update(vs_crtc->dev, vs_plane);
 }
 
 static void vs_plane_atomic_disable(struct drm_plane *plane,
-                    struct drm_plane_state *old_state)
+                    struct drm_atomic_state *state)
 {
     struct vs_plane *vs_plane = to_vs_plane(plane);
+    struct drm_plane_state *old_state =
+        drm_atomic_get_old_plane_state(state, plane);
     struct vs_crtc *vs_crtc = to_vs_crtc(old_state->crtc);
 
     vs_plane->funcs->disable(vs_crtc->dev, vs_plane, old_state);
diff --git a/drivers/gpu/drm/verisilicon/vs_plane.h b/drivers/gpu/drm/verisilicon/vs_plane.h
index 6dcf2e483321..87ddd8f59309 100644
--- a/drivers/gpu/drm/verisilicon/vs_plane.h
+++ b/drivers/gpu/drm/verisilicon/vs_plane.h
@@ -28,7 +28,6 @@ struct vs_plane_status {
     u32 tile_mode;
     struct drm_rect src;
     struct drm_rect dest;
-    struct drm_format_name_buf format_name;
 };
 
 struct vs_plane_state {
diff --git a/drivers/gpu/drm/verisilicon/vs_simple_enc.c b/drivers/gpu/drm/verisilicon/vs_simple_enc.c
index c57f57447091..304e557f6779 100644
--- a/drivers/gpu/drm/verisilicon/vs_simple_enc.c
+++ b/drivers/gpu/drm/verisilicon/vs_simple_enc.c
@@ -17,6 +17,7 @@
 #include <drm/drm_of.h>
 #include <linux/regmap.h>
 #include <linux/mfd/syscon.h>
+#include <uapi/linux/media-bus-format.h>
 
 #include "vs_crtc.h"
 #include "vs_simple_enc.h"
diff --git a/drivers/iio/adc/light_adc.c b/drivers/iio/adc/light_adc.c
index 57800aadf2af..f6a751c829f8 100644
--- a/drivers/iio/adc/light_adc.c
+++ b/drivers/iio/adc/light_adc.c
@@ -20,6 +20,7 @@
 #include <linux/err.h>
 
 #include <linux/iio/iio.h>
+#include <linux/iio/iio-opaque.h>
 #include <linux/iio/buffer.h>
 #include <linux/iio/sysfs.h>
 
@@ -357,12 +358,13 @@ static int light_read_raw(struct iio_dev *indio_dev,
 			long mask)
 {
 	struct light_adc *info = iio_priv(indio_dev);
-	int tmp;
+    struct iio_dev_opaque *iio_dev_opaque = to_iio_dev_opaque(indio_dev);
+    int tmp;
 	long ret;
 
 	switch (mask) {
 	case IIO_CHAN_INFO_RAW:
-		mutex_lock(&indio_dev->mlock);
+		mutex_lock(&iio_dev_opaque->mlock);
 
 		if (info->adc_feature.conv_mode == LIGHT_ADC_MODE_SINGLE) {
 			uint single_retry = LIGHT_ADC_FIFO_DATA_SIZE;
@@ -435,7 +437,7 @@ static int light_read_raw(struct iio_dev *indio_dev,
 
 		}
 
-		mutex_unlock(&indio_dev->mlock);
+		mutex_unlock(&iio_dev_opaque->mlock);
 		return IIO_VAL_INT;
 
 	case IIO_CHAN_INFO_SCALE:
@@ -490,13 +492,14 @@ static int light_write_raw(struct iio_dev *indio_dev,
 			long mask)
 {
 	struct light_adc *info = iio_priv(indio_dev);
+    struct iio_dev_opaque *iio_dev_opaque = to_iio_dev_opaque(indio_dev);
 
 	if (mask != IIO_CHAN_INFO_SAMP_FREQ)
 		return -EINVAL;
 
-	mutex_lock(&indio_dev->mlock);
+	mutex_lock(&iio_dev_opaque->mlock);
 	light_adc_set_clk(info, val);
-	mutex_unlock(&indio_dev->mlock);
+	mutex_unlock(&iio_dev_opaque->mlock);
 
 	return 0;
 }
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-light.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-light.c
index dd488e56075c..841807380d90 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-light.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-light.c
@@ -599,7 +599,7 @@ static int thead_dwmac_probe(struct platform_device *pdev)
 		return ret;
 
 	if (pdev->dev.of_node) {
-		plat_dat = stmmac_probe_config_dt(pdev, &stmmac_res.mac);
+		plat_dat = stmmac_probe_config_dt(pdev, &stmmac_res.mac[0]);
 		if (IS_ERR(plat_dat)) {
 			dev_err(&pdev->dev, "dt configuration failed\n");
 			return PTR_ERR(plat_dat);
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-thead.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-thead.c
index 5f14951b611f..c6701745214d 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-thead.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-thead.c
@@ -524,7 +524,7 @@ static int thead_dwmac_probe(struct platform_device *pdev)
 		return ret;
 
 	if (pdev->dev.of_node) {
-		plat_dat = stmmac_probe_config_dt(pdev, &stmmac_res.mac);
+		plat_dat = stmmac_probe_config_dt(pdev, &(stmmac_res.mac[0]));
 		if (IS_ERR(plat_dat)) {
 			dev_err(&pdev->dev, "dt configuration failed\n");
 			return PTR_ERR(plat_dat);
diff --git a/drivers/net/wireless/rtl8723ds/core/rtw_br_ext.c b/drivers/net/wireless/rtl8723ds/core/rtw_br_ext.c
index 9a0effd8b7ea..9d168cefe051 100644
--- a/drivers/net/wireless/rtl8723ds/core/rtw_br_ext.c
+++ b/drivers/net/wireless/rtl8723ds/core/rtw_br_ext.c
@@ -17,7 +17,6 @@
 #ifdef __KERNEL__
 	#include <linux/if_arp.h>
 	#include <net/ip.h>
-	#include <net/ipx.h>
 	#include <linux/atalk.h>
 	#include <linux/udp.h>
 	#include <linux/if_pppox.h>
@@ -949,76 +948,9 @@ int nat25_db_handle(_adapter *priv, struct sk_buff *skb, int method)
 			}
 		}
 
-		/*   IPX  */
-		if (ipx != NULL) {
-			switch (method) {
-			case NAT25_CHECK:
-				if (!memcmp(skb->data + ETH_ALEN, ipx->ipx_source.node, ETH_ALEN)) {
-					RTW_INFO("NAT25: Check IPX skb_copy\n");
-					return 0;
-				}
-				return -1;
-
-			case NAT25_INSERT: {
-				RTW_INFO("NAT25: Insert IPX, Dest=%08x,%02x%02x%02x%02x%02x%02x,%04x Source=%08x,%02x%02x%02x%02x%02x%02x,%04x\n",
-					 ipx->ipx_dest.net,
-					 ipx->ipx_dest.node[0],
-					 ipx->ipx_dest.node[1],
-					 ipx->ipx_dest.node[2],
-					 ipx->ipx_dest.node[3],
-					 ipx->ipx_dest.node[4],
-					 ipx->ipx_dest.node[5],
-					 ipx->ipx_dest.sock,
-					 ipx->ipx_source.net,
-					 ipx->ipx_source.node[0],
-					 ipx->ipx_source.node[1],
-					 ipx->ipx_source.node[2],
-					 ipx->ipx_source.node[3],
-					 ipx->ipx_source.node[4],
-					 ipx->ipx_source.node[5],
-					 ipx->ipx_source.sock);
-
-				if (!memcmp(skb->data + ETH_ALEN, ipx->ipx_source.node, ETH_ALEN)) {
-					RTW_INFO("NAT25: Use IPX Net, and Socket as network addr\n");
-
-					__nat25_generate_ipx_network_addr_with_socket(networkAddr, &ipx->ipx_source.net, &ipx->ipx_source.sock);
-
-					/* change IPX source node addr to wlan STA address */
-					memcpy(ipx->ipx_source.node, GET_MY_HWADDR(priv), ETH_ALEN);
-				} else
-					__nat25_generate_ipx_network_addr_with_node(networkAddr, &ipx->ipx_source.net, ipx->ipx_source.node);
-
-				__nat25_db_network_insert(priv, skb->data + ETH_ALEN, networkAddr);
-
-				__nat25_db_print(priv);
-			}
-			return 0;
-
-			case NAT25_LOOKUP: {
-				if (!memcmp(GET_MY_HWADDR(priv), ipx->ipx_dest.node, ETH_ALEN)) {
-					RTW_INFO("NAT25: Lookup IPX, Modify Destination IPX Node addr\n");
-
-					__nat25_generate_ipx_network_addr_with_socket(networkAddr, &ipx->ipx_dest.net, &ipx->ipx_dest.sock);
-
-					__nat25_db_network_lookup_and_replace(priv, skb, networkAddr);
-
-					/* replace IPX destination node addr with Lookup destination MAC addr */
-					memcpy(ipx->ipx_dest.node, skb->data, ETH_ALEN);
-				} else {
-					__nat25_generate_ipx_network_addr_with_node(networkAddr, &ipx->ipx_dest.net, ipx->ipx_dest.node);
-
-					__nat25_db_network_lookup_and_replace(priv, skb, networkAddr);
-				}
-			}
-			return 0;
-
-			default:
-				return -1;
-			}
-		}
-
+        /* no more IPX since 5.15 */
 		/*   AARP  */
-		else if (ea != NULL) {
+		if (ea != NULL) {
 			/* Sanity check fields. */
 			if (ea->hw_len != ETH_ALEN || ea->pa_len != AARP_PA_ALEN) {
 				DEBUG_WARN("NAT25: Appletalk AARP Sanity check fail!\n");
diff --git a/drivers/net/wireless/rtl8723ds/os_dep/linux/ioctl_cfg80211.c b/drivers/net/wireless/rtl8723ds/os_dep/linux/ioctl_cfg80211.c
index f97606d8c0e7..567e20a1548d 100644
--- a/drivers/net/wireless/rtl8723ds/os_dep/linux/ioctl_cfg80211.c
+++ b/drivers/net/wireless/rtl8723ds/os_dep/linux/ioctl_cfg80211.c
@@ -464,7 +464,7 @@ u8 rtw_cfg80211_ch_switch_notify(_adapter *adapter, u8 ch, u8 bw, u8 offset,
 		 *  called by others with block-tx.
 		 */
 
-		cfg80211_ch_switch_started_notify(adapter->pnetdev, &chdef, 0, false);
+		cfg80211_ch_switch_started_notify(adapter->pnetdev, &chdef, 0, 0, false);
 #else
 		cfg80211_ch_switch_started_notify(adapter->pnetdev, &chdef, 0);
 #endif
@@ -475,7 +475,7 @@ u8 rtw_cfg80211_ch_switch_notify(_adapter *adapter, u8 ch, u8 bw, u8 offset,
 	if (!rtw_cfg80211_allow_ch_switch_notify(adapter))
 		goto exit;
 
-	cfg80211_ch_switch_notify(adapter->pnetdev, &chdef);
+	cfg80211_ch_switch_notify(adapter->pnetdev, &chdef, 0);
 
 #else
 	int freq = rtw_ch2freq(ch);
@@ -1139,7 +1139,7 @@ void rtw_cfg80211_indicate_connect(_adapter *padapter)
 		#endif
 
 		#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
-		roam_info.bssid = cur_network->network.MacAddress;
+		roam_info.links[0].bssid = cur_network->network.MacAddress;
 		roam_info.req_ie = pmlmepriv->assoc_req + sizeof(struct rtw_ieee80211_hdr_3addr) + 2;
 		roam_info.req_ie_len = pmlmepriv->assoc_req_len - sizeof(struct rtw_ieee80211_hdr_3addr) - 2;
 		roam_info.resp_ie = pmlmepriv->assoc_rsp + sizeof(struct rtw_ieee80211_hdr_3addr) + 6;
@@ -1899,7 +1899,7 @@ static int rtw_cfg80211_set_encryption(struct net_device *dev, struct ieee_param
 }
 
 static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev
-	, u8 key_index
+	, int link_id, u8 key_index
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE)
 	, bool pairwise
 #endif
@@ -2061,7 +2061,7 @@ static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev
 }
 
 static int cfg80211_rtw_get_key(struct wiphy *wiphy, struct net_device *ndev
-	, u8 keyid
+	, int link_id, u8 keyid
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE)
 	, bool pairwise
 #endif
@@ -2249,6 +2249,7 @@ static int cfg80211_rtw_get_key(struct wiphy *wiphy, struct net_device *ndev
 }
 
 static int cfg80211_rtw_del_key(struct wiphy *wiphy, struct net_device *ndev,
+        int link_id, 
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE)
 				u8 key_index, bool pairwise, const u8 *mac_addr)
 #else	/* (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) */
@@ -2269,7 +2270,7 @@ static int cfg80211_rtw_del_key(struct wiphy *wiphy, struct net_device *ndev,
 }
 
 static int cfg80211_rtw_set_default_key(struct wiphy *wiphy,
-	struct net_device *ndev, u8 key_index
+	struct net_device *ndev, int link_id, u8 key_index
 	#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 38)) || defined(COMPAT_KERNEL_RELEASE)
 	, bool unicast, bool multicast
 	#endif
@@ -2317,7 +2318,7 @@ static int cfg80211_rtw_set_default_key(struct wiphy *wiphy,
 
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30))
 int cfg80211_rtw_set_default_mgmt_key(struct wiphy *wiphy,
-	struct net_device *ndev, u8 key_index)
+	struct net_device *ndev, int link_id, u8 key_index)
 {
 #define SET_DEF_KEY_PARAM_FMT " key_index=%d"
 #define SET_DEF_KEY_PARAM_ARG , key_index
@@ -5377,7 +5378,8 @@ static int cfg80211_rtw_change_beacon(struct wiphy *wiphy, struct net_device *nd
 	return ret;
 }
 
-static int cfg80211_rtw_stop_ap(struct wiphy *wiphy, struct net_device *ndev)
+static int cfg80211_rtw_stop_ap(struct wiphy *wiphy, struct net_device *ndev,
+        unsigned int link_id)
 {
 	_adapter *adapter = (_adapter *)rtw_netdev_priv(ndev);
 
@@ -6753,7 +6755,7 @@ static int cfg80211_rtw_del_virtual_intf(struct wiphy *wiphy,
 
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0))
 static int cfg80211_rtw_get_channel(struct wiphy *wiphy,
-	struct wireless_dev *wdev,
+	struct wireless_dev *wdev, unsigned int link_id,
 	struct cfg80211_chan_def *chandef)
 {
 	_adapter *padapter = wiphy_to_adapter(wiphy);
@@ -10692,7 +10694,7 @@ void rtw_wdev_unregister(struct wireless_dev *wdev)
 	rtw_cfg80211_indicate_scan_done(adapter, _TRUE);
 
 	#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0)) || defined(COMPAT_KERNEL_RELEASE)
-	if (wdev->current_bss) {
+	if (wdev->links[0].client.current_bss) {
 		RTW_INFO(FUNC_ADPT_FMT" clear current_bss by cfg80211_disconnected\n", FUNC_ADPT_ARG(adapter));
 		rtw_cfg80211_indicate_disconnect(adapter, 0, 1);
 	}
diff --git a/drivers/net/wireless/rtl8723ds/os_dep/linux/os_intfs.c b/drivers/net/wireless/rtl8723ds/os_dep/linux/os_intfs.c
index fe006b57f102..897174cd8969 100644
--- a/drivers/net/wireless/rtl8723ds/os_dep/linux/os_intfs.c
+++ b/drivers/net/wireless/rtl8723ds/os_dep/linux/os_intfs.c
@@ -2147,7 +2147,7 @@ int rtw_os_ndev_register(_adapter *adapter, const char *name)
 	u8 rtnl_lock_needed = rtw_rtnl_lock_needed(dvobj);
 
 #ifdef CONFIG_RTW_NAPI
-	netif_napi_add(ndev, &adapter->napi, rtw_recv_napi_poll, RTL_NAPI_WEIGHT);
+	netif_napi_add(ndev, &adapter->napi, rtw_recv_napi_poll);
 #endif /* CONFIG_RTW_NAPI */
 
 #if defined(CONFIG_IOCTL_CFG80211)
diff --git a/drivers/net/wireless/rtl8723ds/os_dep/linux/recv_linux.c b/drivers/net/wireless/rtl8723ds/os_dep/linux/recv_linux.c
index 13cd7660ac7e..cb266a0de579 100644
--- a/drivers/net/wireless/rtl8723ds/os_dep/linux/recv_linux.c
+++ b/drivers/net/wireless/rtl8723ds/os_dep/linux/recv_linux.c
@@ -405,9 +405,14 @@ static int napi_recv(_adapter *padapter, int budget)
 			So, we should prevent cloned SKB go into napi_gro_receive.
 		*/
 		if (pregistrypriv->en_gro && !skb_cloned(pskb)) {
+            #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 12, 0))
+            rtw_napi_gro_receive(&padapter->napi, pskb);
+            rx_ok = _TRUE;
+            #else
 			if (rtw_napi_gro_receive(&padapter->napi, pskb) != GRO_DROP)
 				rx_ok = _TRUE;
-			goto next;
+            #endif
+            goto next;
 		}
 #endif /* CONFIG_RTW_GRO */
 
diff --git a/drivers/net/wireless/rtl8723ds/os_dep/linux/rtw_proc.c b/drivers/net/wireless/rtl8723ds/os_dep/linux/rtw_proc.c
index ff3b80d7aca3..dabe124381c2 100644
--- a/drivers/net/wireless/rtl8723ds/os_dep/linux/rtw_proc.c
+++ b/drivers/net/wireless/rtl8723ds/os_dep/linux/rtw_proc.c
@@ -286,7 +286,7 @@ const int drv_proc_hdls_num = sizeof(drv_proc_hdls) / sizeof(struct rtw_proc_hdl
 static int rtw_drv_proc_open(struct inode *inode, struct file *file)
 {
 	/* struct net_device *dev = proc_get_parent_data(inode); */
-	ssize_t index = (ssize_t)PDE_DATA(inode);
+	ssize_t index = (ssize_t)pde_data(inode);
 	const struct rtw_proc_hdl *hdl = drv_proc_hdls + index;
 	void *private = NULL;
 
@@ -312,7 +312,7 @@ static int rtw_drv_proc_open(struct inode *inode, struct file *file)
 
 static ssize_t rtw_drv_proc_write(struct file *file, const char __user *buffer, size_t count, loff_t *pos)
 {
-	ssize_t index = (ssize_t)PDE_DATA(file_inode(file));
+	ssize_t index = (ssize_t)pde_data(file_inode(file));
 	const struct rtw_proc_hdl *hdl = drv_proc_hdls + index;
 	ssize_t (*write)(struct file *, const char __user *, size_t, loff_t *, void *) = hdl->write;
 
@@ -5727,7 +5727,7 @@ const int adapter_proc_hdls_num = sizeof(adapter_proc_hdls) / sizeof(struct rtw_
 
 static int rtw_adapter_proc_open(struct inode *inode, struct file *file)
 {
-	ssize_t index = (ssize_t)PDE_DATA(inode);
+	ssize_t index = (ssize_t)pde_data(inode);
 	const struct rtw_proc_hdl *hdl = adapter_proc_hdls + index;
 	void *private = proc_get_parent_data(inode);
 
@@ -5753,7 +5753,7 @@ static int rtw_adapter_proc_open(struct inode *inode, struct file *file)
 
 static ssize_t rtw_adapter_proc_write(struct file *file, const char __user *buffer, size_t count, loff_t *pos)
 {
-	ssize_t index = (ssize_t)PDE_DATA(file_inode(file));
+	ssize_t index = (ssize_t)pde_data(file_inode(file));
 	const struct rtw_proc_hdl *hdl = adapter_proc_hdls + index;
 	ssize_t (*write)(struct file *, const char __user *, size_t, loff_t *, void *) = hdl->write;
 
@@ -5916,7 +5916,7 @@ const int odm_proc_hdls_num = sizeof(odm_proc_hdls) / sizeof(struct rtw_proc_hdl
 
 static int rtw_odm_proc_open(struct inode *inode, struct file *file)
 {
-	ssize_t index = (ssize_t)PDE_DATA(inode);
+	ssize_t index = (ssize_t)pde_data(inode);
 	const struct rtw_proc_hdl *hdl = odm_proc_hdls + index;
 	void *private = proc_get_parent_data(inode);
 
@@ -5942,7 +5942,7 @@ static int rtw_odm_proc_open(struct inode *inode, struct file *file)
 
 static ssize_t rtw_odm_proc_write(struct file *file, const char __user *buffer, size_t count, loff_t *pos)
 {
-	ssize_t index = (ssize_t)PDE_DATA(file_inode(file));
+	ssize_t index = (ssize_t)pde_data(file_inode(file));
 	const struct rtw_proc_hdl *hdl = odm_proc_hdls + index;
 	ssize_t (*write)(struct file *, const char __user *, size_t, loff_t *, void *) = hdl->write;
 
@@ -6081,7 +6081,7 @@ const int mcc_proc_hdls_num = sizeof(mcc_proc_hdls) / sizeof(struct rtw_proc_hdl
 
 static int rtw_mcc_proc_open(struct inode *inode, struct file *file)
 {
-	ssize_t index = (ssize_t)PDE_DATA(inode);
+	ssize_t index = (ssize_t)pde_data(inode);
 	const struct rtw_proc_hdl *hdl = mcc_proc_hdls + index;
 	void *private = proc_get_parent_data(inode);
 
@@ -6107,7 +6107,7 @@ static int rtw_mcc_proc_open(struct inode *inode, struct file *file)
 
 static ssize_t rtw_mcc_proc_write(struct file *file, const char __user *buffer, size_t count, loff_t *pos)
 {
-	ssize_t index = (ssize_t)PDE_DATA(file_inode(file));
+	ssize_t index = (ssize_t)pde_data(file_inode(file));
 	const struct rtw_proc_hdl *hdl = mcc_proc_hdls + index;
 	ssize_t (*write)(struct file *, const char __user *, size_t, loff_t *, void *) = hdl->write;
 
diff --git a/drivers/net/wireless/rtl8723ds/os_dep/osdep_service.c b/drivers/net/wireless/rtl8723ds/os_dep/osdep_service.c
index 160a152c4348..8a30ec2daa75 100644
--- a/drivers/net/wireless/rtl8723ds/os_dep/osdep_service.c
+++ b/drivers/net/wireless/rtl8723ds/os_dep/osdep_service.c
@@ -1309,7 +1309,11 @@ u32 _rtw_down_sema(_sema *sema)
 inline void thread_exit(_completion *comp)
 {
 #ifdef PLATFORM_LINUX
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 17, 0)
 	complete_and_exit(comp, 0);
+#else
+    kthread_complete_and_exit(comp, 0);
+#endif
 #endif
 
 #ifdef PLATFORM_FREEBSD
@@ -2910,7 +2914,9 @@ u64 rtw_division64(u64 x, u64 y)
 inline u32 rtw_random32(void)
 {
 #ifdef PLATFORM_LINUX
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0))
+    return get_random_u32();
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0))
 	return prandom_u32();
 #elif (LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 18))
 	u32 random_int;
diff --git a/drivers/pinctrl/thead/pinctrl-light.c b/drivers/pinctrl/thead/pinctrl-light.c
index 544727e10efc..7c62d035213c 100644
--- a/drivers/pinctrl/thead/pinctrl-light.c
+++ b/drivers/pinctrl/thead/pinctrl-light.c
@@ -13,6 +13,7 @@
 #include <linux/pinctrl/pinconf.h>
 #include <linux/pinctrl/pinctrl.h>
 #include <linux/pinctrl/pinmux.h>
+#include <linux/seq_file.h>
 #include <linux/slab.h>
 #include <dt-bindings/pinctrl/light-mpw-pinctrl.h>
 #include <dt-bindings/pinctrl/light-fm-right-pinctrl.h>
diff --git a/drivers/pwm/pwm-light.c b/drivers/pwm/pwm-light.c
index 3dd826b5c040..8e08d881d961 100644
--- a/drivers/pwm/pwm-light.c
+++ b/drivers/pwm/pwm-light.c
@@ -52,44 +52,25 @@ struct pwm_light_chip {
 
 #define to_pwm_light_chip(chip)		container_of(chip, struct pwm_light_chip, chip)
 
-static int pwm_light_clk_prepare_enable(struct pwm_chip *chip)
+static int pwm_light_set_polarity(struct pwm_light_chip *plc, struct pwm_device *pwm, enum pwm_polarity polarity)
 {
-	struct pwm_light_chip *plc = to_pwm_light_chip(chip);
-	int ret;
+	u32 value = readl(plc->mmio_base + LIGHT_PWM_CTRL(pwm->hwpwm));
 
-	ret = clk_prepare_enable(plc->pwm_pclk);
-	if (ret)
-		return ret;
+	if (polarity == PWM_POLARITY_INVERSED)
+		/* Duty cycle defines LOW period of PWM */
+		value |= PWM_FPOUT;
+	else
+		/* Duty cycle defines HIGH period of PWM */
+		value &= ~PWM_FPOUT;
 
-	ret = clk_prepare_enable(plc->pwm_cclk);
-	if (ret) {
-		clk_disable_unprepare(plc->pwm_pclk);
-		return ret;
-	}
+	writel(value, plc->mmio_base + LIGHT_PWM_CTRL(pwm->hwpwm));
 
 	return 0;
 }
 
-static void pwm_light_clk_disable_unprepare(struct pwm_chip *chip)
-{
-	struct pwm_light_chip *plc = to_pwm_light_chip(chip);
-
-	clk_disable_unprepare(plc->pwm_pclk);
-	clk_disable_unprepare(plc->pwm_cclk);
-}
-
-static int pwm_light_enable(struct pwm_chip *chip, struct pwm_device *pwm)
+static int pwm_light_enable(struct pwm_light_chip *plc,struct pwm_device *pwm)
 {
-	struct pwm_light_chip *plc = to_pwm_light_chip(chip);
 	u32 value;
-	int ret;
-
-	ret = pm_runtime_get_sync(chip->dev);
-	if (ret < 0) {
-		dev_err(chip->dev, "failed to clock on the pwm device(%d)\n", ret);
-		pm_runtime_put_noidle(chip->dev);
-		return ret;
-	}
 
 	value = readl(plc->mmio_base + LIGHT_PWM_CTRL(pwm->hwpwm));
 	value |= PWM_START;
@@ -98,45 +79,20 @@ static int pwm_light_enable(struct pwm_chip *chip, struct pwm_device *pwm)
 	return 0;
 }
 
-static void pwm_light_disable(struct pwm_chip *chip, struct pwm_device *pwm)
+static void pwm_light_disable(struct pwm_light_chip *plc, struct pwm_device *pwm)
 {
-	struct pwm_light_chip *plc = to_pwm_light_chip(chip);
 	u32 value;
-	int ret;
-
-	ret = pm_runtime_get_sync(chip->dev);
-	if (ret < 0) {
-		dev_err(chip->dev, "failed to clock on the pwm device(%d)\n", ret);
-		pm_runtime_put_noidle(chip->dev);
-		return;
-	}
 
 	value = readl(plc->mmio_base + LIGHT_PWM_CTRL(pwm->hwpwm));
 	value &= ~PWM_START;
 	writel(value, plc->mmio_base + LIGHT_PWM_CTRL(pwm->hwpwm));
-
-	pm_runtime_put_sync(chip->dev);
 }
 
-static int pwm_light_config(struct pwm_chip *chip, struct pwm_device *pwm, int duty_ns, int period_ns)
+static int pwm_light_config(struct pwm_light_chip *plc, struct pwm_device *pwm, int duty_ns, int period_ns)
 {
-	struct pwm_light_chip *plc = to_pwm_light_chip(chip);
 	unsigned long rate = clk_get_rate(plc->pwm_cclk);
 	unsigned long duty_cycle, period_cycle;
 	u32 pwm_cfg = PWM_INFACTOUT | PWM_FPOUT | PWM_CONTINUOUS_MODE | PWM_INT_EN;
-	int ret;
-
-	if (duty_ns > period_ns) {
-		dev_err(chip->dev, "invalid pwm configure\n");
-		return -EINVAL;
-	}
-
-	ret = pm_runtime_get_sync(chip->dev);
-	if (ret < 0) {
-		dev_err(chip->dev, "failed to clock on the pwm device(%d)\n", ret);
-		pm_runtime_put_noidle(chip->dev);
-		return ret;
-	}
 
 	writel(pwm_cfg, plc->mmio_base + LIGHT_PWM_CTRL(pwm->hwpwm));	//0x328
 
@@ -163,44 +119,86 @@ static int pwm_light_config(struct pwm_chip *chip, struct pwm_device *pwm, int d
 	pwm_cfg = readl(plc->mmio_base + LIGHT_PWM_CTRL(pwm->hwpwm));
 	writel(pwm_cfg | PWM_CFG_UPDATE, plc->mmio_base + LIGHT_PWM_CTRL(pwm->hwpwm));	//0x32c
 
-	pm_runtime_put_sync(chip->dev);
-
 	return 0;
 }
 
-static int pwm_light_set_polarity(struct pwm_chip *chip, struct pwm_device *pwm, enum pwm_polarity polarity)
+static int pwm_light_apply(struct pwm_chip *chip, struct pwm_device *pwm, const struct pwm_state *state)
 {
-	struct pwm_light_chip *plc = to_pwm_light_chip(chip);
-	u32 value = readl(plc->mmio_base + LIGHT_PWM_CTRL(pwm->hwpwm));
-	int ret;
+        int ret;
+        bool enabled = pwm->state.enabled;
+        u64 period = state->period;
+        u64 duty_cycle = state->duty_cycle;
+        struct pwm_light_chip *plc = to_pwm_light_chip(chip);
 
-	ret = pm_runtime_get_sync(chip->dev);
+    	ret = pm_runtime_get_sync(chip->dev);
 	if (ret < 0) {
 		dev_err(chip->dev, "failed to clock on the pwm device(%d)\n", ret);
 		pm_runtime_put_noidle(chip->dev);
 		return ret;
 	}
 
+        /* Set polarity */
+        if (state->polarity != pwm->state.polarity) {
+            if (enabled) {
+                pwm_light_disable(plc, pwm);
+                enabled = false;
+            }
+            ret = pwm_light_set_polarity(plc, pwm, state->polarity);
+            if (ret)
+                return ret;
+        }
+
+        /* Set period and duty cycle */
+	    if (duty_cycle > period) {
+		    dev_err(chip->dev, "invalid pwm configure\n");
+		        return -EINVAL;
+	    }
+
+        ret = pwm_light_config(plc, pwm, duty_cycle, period);
+        if (ret < 0)
+            return ret;
+
+        if (!state->enabled) {
+            if (enabled)
+                pwm_light_disable(plc, pwm);
+        }
+
+        if (!enabled)
+            return pwm_light_enable(plc, pwm);
 
-	if (polarity == PWM_POLARITY_INVERSED)
-		/* Duty cycle defines LOW period of PWM */
-		value |= PWM_FPOUT;
-	else
-		/* Duty cycle defines HIGH period of PWM */
-		value &= ~PWM_FPOUT;
+	pm_runtime_put_sync(chip->dev);
 
-	writel(value, plc->mmio_base + LIGHT_PWM_CTRL(pwm->hwpwm));
+        return 0;
+}
 
-	pm_runtime_put_sync(chip->dev);
+static int pwm_light_clk_prepare_enable(struct pwm_chip *chip)
+{
+	struct pwm_light_chip *plc = to_pwm_light_chip(chip);
+	int ret;
+
+	ret = clk_prepare_enable(plc->pwm_pclk);
+	if (ret)
+		return ret;
+
+	ret = clk_prepare_enable(plc->pwm_cclk);
+	if (ret) {
+		clk_disable_unprepare(plc->pwm_pclk);
+		return ret;
+	}
 
 	return 0;
 }
 
+static void pwm_light_clk_disable_unprepare(struct pwm_chip *chip)
+{
+	struct pwm_light_chip *plc = to_pwm_light_chip(chip);
+
+	clk_disable_unprepare(plc->pwm_pclk);
+	clk_disable_unprepare(plc->pwm_cclk);
+}
+
 static const struct pwm_ops pwm_light_ops = {
-	.enable = pwm_light_enable,
-	.disable = pwm_light_disable,
-	.config = pwm_light_config,
-	.set_polarity = pwm_light_set_polarity,
+    .apply = pwm_light_apply,
 	.owner = THIS_MODULE,
 };
 
@@ -290,7 +288,9 @@ static int pwm_light_remove(struct platform_device *pdev)
 
 	pm_runtime_disable(&pdev->dev);
 
-	return pwmchip_remove(&plc->chip);
+	pwmchip_remove(&plc->chip);
+
+    return 0;
 }
 
 static const struct of_device_id pwm_light_dt_ids[] = {
diff --git a/net/rfkill/rfkill-bt.c b/net/rfkill/rfkill-bt.c
index 55c4b03e6d98..d933d0dd97ac 100644
--- a/net/rfkill/rfkill-bt.c
+++ b/net/rfkill/rfkill-bt.c
@@ -33,6 +33,7 @@
 #include <linux/fs.h>
 #include <dt-bindings/gpio/gpio.h>
 #include <uapi/linux/rfkill.h>
+#include <linux/pinctrl/consumer.h>
 #ifdef CONFIG_OF
 #include <linux/of.h>
 #include <linux/of_device.h>
diff --git a/sound/soc/codecs/es7210.c b/sound/soc/codecs/es7210.c
index fde12fd535cd..5af63bfa4acd 100644
--- a/sound/soc/codecs/es7210.c
+++ b/sound/soc/codecs/es7210.c
@@ -770,7 +770,7 @@ static struct snd_soc_dai_driver es7210_dai0 = {
                 .formats = es7210_FORMATS,
         },
         .ops = &es7210_ops,
-        .symmetric_rates = 1,
+        .symmetric_rate = 1,
 };
 #endif
 #if ES7210_CHANNELS_MAX > 4
diff --git a/sound/soc/codecs/es8156.c b/sound/soc/codecs/es8156.c
index a128dde005aa..1ceb30214757 100644
--- a/sound/soc/codecs/es8156.c
+++ b/sound/soc/codecs/es8156.c
@@ -343,7 +343,7 @@ static struct snd_soc_dai_driver es8156_dai = {
 		.formats = es8156_FORMATS,
 	},
 	.ops = &es8156_ops,
-	.symmetric_rates = 1,
+	.symmetric_rate = 1,
 };
 
 
@@ -589,10 +589,10 @@ static int es8156_i2c_probe(struct i2c_client *i2c,
 	return ret;
 }
 
-static  int es8156_i2c_remove(struct i2c_client *client)
+static void  es8156_i2c_remove(struct i2c_client *client)
 {
 	snd_soc_unregister_component(&client->dev);
-	return 0;
+	return;
 }
 
 static void es8156_i2c_shutdown(struct i2c_client *client)
diff --git a/sound/soc/thead/Kconfig b/sound/soc/thead/Kconfig
index 73e8347ab3f4..9b7f6198a9c2 100644
--- a/sound/soc/thead/Kconfig
+++ b/sound/soc/thead/Kconfig
@@ -12,5 +12,6 @@ config SND_SOC_AW87519
 	tristate "SoC Audio for awinic AW87519 Smart K PA"
 	select SND_SOC_GENERIC_DMAENGINE_PCM
 	depends on I2C
+    depends on GPIOLIB
 	help
 	  This option enables support for AW87519 Smart K PA.
diff --git a/sound/soc/thead/aw87519_audio.c b/sound/soc/thead/aw87519_audio.c
index a50d54f4d59e..4f03c65391b9 100644
--- a/sound/soc/thead/aw87519_audio.c
+++ b/sound/soc/thead/aw87519_audio.c
@@ -35,6 +35,7 @@
 #include <linux/timer.h>
 #include <linux/workqueue.h>
 #include <linux/hrtimer.h>
+#include <linux/gpio/consumer.h>
 #include "aw87519_audio.h"
 
 /*******************************************************************************
@@ -249,7 +250,7 @@ static int aw87519_rcv_update(struct aw87519 *aw87519)
 {
 	pr_info("%s enter\n", __func__);
 	return request_firmware_nowait(THIS_MODULE,
-					FW_ACTION_HOTPLUG,
+					FW_ACTION_UEVENT,
 					aw87519_rcv_name,
 					&aw87519->i2c_client->dev,
 					GFP_KERNEL,
@@ -301,7 +302,7 @@ static int aw87519_cfg_update(struct aw87519 *aw87519)
 	pr_info("%s enter\n", __func__);
 
 	return request_firmware_nowait(THIS_MODULE,
-					FW_ACTION_HOTPLUG,
+					FW_ACTION_UEVENT,
 					aw87519_spk_name,
 					&aw87519->i2c_client->dev,
 					GFP_KERNEL,
@@ -426,7 +427,7 @@ static ssize_t aw87519_set_update(struct device *dev,
 		aw87519->spk_cfg_update_flag = 1;
 		aw87519->rcv_cfg_update_flag = 1;
 		ret_fir = request_firmware_nowait(THIS_MODULE,
-						FW_ACTION_HOTPLUG,
+						FW_ACTION_UEVENT,
 						aw87519_spk_name,
 						&aw87519->i2c_client->dev,
 						GFP_KERNEL,
@@ -662,14 +663,14 @@ static int aw87519_i2c_probe(struct i2c_client *client,
 	return ret;
 }
 
-static int aw87519_i2c_remove(struct i2c_client *client)
+static void aw87519_i2c_remove(struct i2c_client *client)
 {
 	struct aw87519 *aw87519 = i2c_get_clientdata(client);
 
-	if (gpio_is_valid(aw87519->reset_gpio))
-		devm_gpio_free(&client->dev, aw87519->reset_gpio);
-
-	return 0;
+//	if (gpio_is_valid(aw87519->reset_gpio))
+//		devm_gpio_free(&client->dev, aw87519->reset_gpio);
+    gpio_free(aw87519->reset_gpio);
+	return;
 }
 
 static const struct i2c_device_id aw87519_i2c_id[] = {
