--- /dev/null
+From b4b051b168fabf0f394cedba057560dc4fe62669 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 27 May 2021 18:34:09 +0200
+Subject: ASoC: fsl-asoc-card: Set .owner attribute when registering card.
+
+From: Nicolas Cavallari <nicolas.cavallari@green-communications.fr>
+
+[ Upstream commit a8437f05384cb472518ec21bf4fffbe8f0a47378 ]
+
+Otherwise, when compiled as module, a WARN_ON is triggered:
+
+WARNING: CPU: 0 PID: 5 at sound/core/init.c:208 snd_card_new+0x310/0x39c [snd]
+[...]
+CPU: 0 PID: 5 Comm: kworker/0:0 Not tainted 5.10.39 #1
+Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
+Workqueue: events deferred_probe_work_func
+[<c0111988>] (unwind_backtrace) from [<c010c8ac>] (show_stack+0x10/0x14)
+[<c010c8ac>] (show_stack) from [<c092784c>] (dump_stack+0xdc/0x104)
+[<c092784c>] (dump_stack) from [<c0129710>] (__warn+0xd8/0x114)
+[<c0129710>] (__warn) from [<c0922a48>] (warn_slowpath_fmt+0x5c/0xc4)
+[<c0922a48>] (warn_slowpath_fmt) from [<bf0496f8>] (snd_card_new+0x310/0x39c [snd])
+[<bf0496f8>] (snd_card_new [snd]) from [<bf1d7df8>] (snd_soc_bind_card+0x334/0x9c4 [snd_soc_core])
+[<bf1d7df8>] (snd_soc_bind_card [snd_soc_core]) from [<bf1e9cd8>] (devm_snd_soc_register_card+0x30/0x6c [snd_soc_core])
+[<bf1e9cd8>] (devm_snd_soc_register_card [snd_soc_core]) from [<bf22d964>] (fsl_asoc_card_probe+0x550/0xcc8 [snd_soc_fsl_asoc_card])
+[<bf22d964>] (fsl_asoc_card_probe [snd_soc_fsl_asoc_card]) from [<c060c930>] (platform_drv_probe+0x48/0x98)
+[...]
+
+Signed-off-by: Nicolas Cavallari <nicolas.cavallari@green-communications.fr>
+Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com>
+Link: https://lore.kernel.org/r/20210527163409.22049-1-nicolas.cavallari@green-communications.fr
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ sound/soc/fsl/fsl-asoc-card.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/sound/soc/fsl/fsl-asoc-card.c b/sound/soc/fsl/fsl-asoc-card.c
+index a2dd3b6b7fec..7cd14d6b9436 100644
+--- a/sound/soc/fsl/fsl-asoc-card.c
++++ b/sound/soc/fsl/fsl-asoc-card.c
+@@ -720,6 +720,7 @@ static int fsl_asoc_card_probe(struct platform_device *pdev)
+ /* Initialize sound card */
+ priv->pdev = pdev;
+ priv->card.dev = &pdev->dev;
++ priv->card.owner = THIS_MODULE;
+ ret = snd_soc_of_parse_card_name(&priv->card, "model");
+ if (ret) {
+ snprintf(priv->name, sizeof(priv->name), "%s-audio",
+--
+2.30.2
+
--- /dev/null
+From 778019b4c9eaf5f7a73ce42e19613d035e8062aa Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 4 Jun 2021 23:45:45 +0800
+Subject: ASoC: qcom: lpass-cpu: Fix pop noise during audio capture begin
+
+From: Srinivasa Rao Mandadapu <srivasam@codeaurora.org>
+
+[ Upstream commit c8a4556d98510ca05bad8d02265a4918b03a8c0b ]
+
+This patch fixes PoP noise of around 15ms observed during audio
+capture begin.
+Enables BCLK and LRCLK in snd_soc_dai_ops prepare call for
+introducing some delay before capture start.
+
+(am from https://patchwork.kernel.org/patch/12276369/)
+(also found at https://lore.kernel.org/r/20210524142114.18676-1-srivasam@codeaurora.org)
+
+Co-developed-by: Judy Hsiao <judyhsiao@chromium.org>
+Signed-off-by: Judy Hsiao <judyhsiao@chromium.org>
+Signed-off-by: Srinivasa Rao Mandadapu <srivasam@codeaurora.org>
+Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
+Link: https://lore.kernel.org/r/20210604154545.1198337-1-judyhsiao@chromium.org
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ sound/soc/qcom/lpass-cpu.c | 79 ++++++++++++++++++++++++++++++++++++++
+ sound/soc/qcom/lpass.h | 4 ++
+ 2 files changed, 83 insertions(+)
+
+diff --git a/sound/soc/qcom/lpass-cpu.c b/sound/soc/qcom/lpass-cpu.c
+index 7a30a12519a7..e620a62ef534 100644
+--- a/sound/soc/qcom/lpass-cpu.c
++++ b/sound/soc/qcom/lpass-cpu.c
+@@ -93,8 +93,30 @@ static void lpass_cpu_daiops_shutdown(struct snd_pcm_substream *substream,
+ struct snd_soc_dai *dai)
+ {
+ struct lpass_data *drvdata = snd_soc_dai_get_drvdata(dai);
++ struct lpaif_i2sctl *i2sctl = drvdata->i2sctl;
++ unsigned int id = dai->driver->id;
+
+ clk_disable_unprepare(drvdata->mi2s_osr_clk[dai->driver->id]);
++ /*
++ * Ensure LRCLK is disabled even in device node validation.
++ * Will not impact if disabled in lpass_cpu_daiops_trigger()
++ * suspend.
++ */
++ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
++ regmap_fields_write(i2sctl->spken, id, LPAIF_I2SCTL_SPKEN_DISABLE);
++ else
++ regmap_fields_write(i2sctl->micen, id, LPAIF_I2SCTL_MICEN_DISABLE);
++
++ /*
++ * BCLK may not be enabled if lpass_cpu_daiops_prepare is called before
++ * lpass_cpu_daiops_shutdown. It's paired with the clk_enable in
++ * lpass_cpu_daiops_prepare.
++ */
++ if (drvdata->mi2s_was_prepared[dai->driver->id]) {
++ drvdata->mi2s_was_prepared[dai->driver->id] = false;
++ clk_disable(drvdata->mi2s_bit_clk[dai->driver->id]);
++ }
++
+ clk_unprepare(drvdata->mi2s_bit_clk[dai->driver->id]);
+ }
+
+@@ -275,6 +297,18 @@ static int lpass_cpu_daiops_trigger(struct snd_pcm_substream *substream,
+ case SNDRV_PCM_TRIGGER_START:
+ case SNDRV_PCM_TRIGGER_RESUME:
+ case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
++ /*
++ * Ensure lpass BCLK/LRCLK is enabled during
++ * device resume as lpass_cpu_daiops_prepare() is not called
++ * after the device resumes. We don't check mi2s_was_prepared before
++ * enable/disable BCLK in trigger events because:
++ * 1. These trigger events are paired, so the BCLK
++ * enable_count is balanced.
++ * 2. the BCLK can be shared (ex: headset and headset mic),
++ * we need to increase the enable_count so that we don't
++ * turn off the shared BCLK while other devices are using
++ * it.
++ */
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
+ ret = regmap_fields_write(i2sctl->spken, id,
+ LPAIF_I2SCTL_SPKEN_ENABLE);
+@@ -296,6 +330,10 @@ static int lpass_cpu_daiops_trigger(struct snd_pcm_substream *substream,
+ case SNDRV_PCM_TRIGGER_STOP:
+ case SNDRV_PCM_TRIGGER_SUSPEND:
+ case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
++ /*
++ * To ensure lpass BCLK/LRCLK is disabled during
++ * device suspend.
++ */
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
+ ret = regmap_fields_write(i2sctl->spken, id,
+ LPAIF_I2SCTL_SPKEN_DISABLE);
+@@ -315,12 +353,53 @@ static int lpass_cpu_daiops_trigger(struct snd_pcm_substream *substream,
+ return ret;
+ }
+
++static int lpass_cpu_daiops_prepare(struct snd_pcm_substream *substream,
++ struct snd_soc_dai *dai)
++{
++ struct lpass_data *drvdata = snd_soc_dai_get_drvdata(dai);
++ struct lpaif_i2sctl *i2sctl = drvdata->i2sctl;
++ unsigned int id = dai->driver->id;
++ int ret;
++
++ /*
++ * Ensure lpass BCLK/LRCLK is enabled bit before playback/capture
++ * data flow starts. This allows other codec to have some delay before
++ * the data flow.
++ * (ex: to drop start up pop noise before capture starts).
++ */
++ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
++ ret = regmap_fields_write(i2sctl->spken, id, LPAIF_I2SCTL_SPKEN_ENABLE);
++ else
++ ret = regmap_fields_write(i2sctl->micen, id, LPAIF_I2SCTL_MICEN_ENABLE);
++
++ if (ret) {
++ dev_err(dai->dev, "error writing to i2sctl reg: %d\n", ret);
++ return ret;
++ }
++
++ /*
++ * Check mi2s_was_prepared before enabling BCLK as lpass_cpu_daiops_prepare can
++ * be called multiple times. It's paired with the clk_disable in
++ * lpass_cpu_daiops_shutdown.
++ */
++ if (!drvdata->mi2s_was_prepared[dai->driver->id]) {
++ ret = clk_enable(drvdata->mi2s_bit_clk[id]);
++ if (ret) {
++ dev_err(dai->dev, "error in enabling mi2s bit clk: %d\n", ret);
++ return ret;
++ }
++ drvdata->mi2s_was_prepared[dai->driver->id] = true;
++ }
++ return 0;
++}
++
+ const struct snd_soc_dai_ops asoc_qcom_lpass_cpu_dai_ops = {
+ .set_sysclk = lpass_cpu_daiops_set_sysclk,
+ .startup = lpass_cpu_daiops_startup,
+ .shutdown = lpass_cpu_daiops_shutdown,
+ .hw_params = lpass_cpu_daiops_hw_params,
+ .trigger = lpass_cpu_daiops_trigger,
++ .prepare = lpass_cpu_daiops_prepare,
+ };
+ EXPORT_SYMBOL_GPL(asoc_qcom_lpass_cpu_dai_ops);
+
+diff --git a/sound/soc/qcom/lpass.h b/sound/soc/qcom/lpass.h
+index 1d926dd5f590..0484ad39b3dc 100644
+--- a/sound/soc/qcom/lpass.h
++++ b/sound/soc/qcom/lpass.h
+@@ -67,6 +67,10 @@ struct lpass_data {
+ /* MI2S SD lines to use for playback/capture */
+ unsigned int mi2s_playback_sd_mode[LPASS_MAX_MI2S_PORTS];
+ unsigned int mi2s_capture_sd_mode[LPASS_MAX_MI2S_PORTS];
++
++ /* The state of MI2S prepare dai_ops was called */
++ bool mi2s_was_prepared[LPASS_MAX_MI2S_PORTS];
++
+ int hdmi_port_enable;
+
+ /* low-power audio interface (LPAIF) registers */
+--
+2.30.2
+
--- /dev/null
+From 8c96f80dfd06fb1fa3a45dd7e7fb42f573632f54 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 27 May 2021 01:06:51 +0000
+Subject: ASoC: rt5659: Fix the lost powers for the HDA header
+
+From: Jack Yu <jack.yu@realtek.com>
+
+[ Upstream commit 6308c44ed6eeadf65c0a7ba68d609773ed860fbb ]
+
+The power of "LDO2", "MICBIAS1" and "Mic Det Power" were powered off after
+the DAPM widgets were added, and these powers were set by the JD settings
+"RT5659_JD_HDA_HEADER" in the probe function. In the codec probe function,
+these powers were ignored to prevent them controlled by DAPM.
+
+Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
+Signed-off-by: Jack Yu <jack.yu@realtek.com>
+Message-Id: <15fced51977b458798ca4eebf03dafb9@realtek.com>
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ sound/soc/codecs/rt5659.c | 26 +++++++++++++++++++++-----
+ 1 file changed, 21 insertions(+), 5 deletions(-)
+
+diff --git a/sound/soc/codecs/rt5659.c b/sound/soc/codecs/rt5659.c
+index 91a4ef7f620c..a9b079d56fd6 100644
+--- a/sound/soc/codecs/rt5659.c
++++ b/sound/soc/codecs/rt5659.c
+@@ -2433,13 +2433,18 @@ static int set_dmic_power(struct snd_soc_dapm_widget *w,
+ return 0;
+ }
+
+-static const struct snd_soc_dapm_widget rt5659_dapm_widgets[] = {
++static const struct snd_soc_dapm_widget rt5659_particular_dapm_widgets[] = {
+ SND_SOC_DAPM_SUPPLY("LDO2", RT5659_PWR_ANLG_3, RT5659_PWR_LDO2_BIT, 0,
+ NULL, 0),
+- SND_SOC_DAPM_SUPPLY("PLL", RT5659_PWR_ANLG_3, RT5659_PWR_PLL_BIT, 0,
+- NULL, 0),
++ SND_SOC_DAPM_SUPPLY("MICBIAS1", RT5659_PWR_ANLG_2, RT5659_PWR_MB1_BIT,
++ 0, NULL, 0),
+ SND_SOC_DAPM_SUPPLY("Mic Det Power", RT5659_PWR_VOL,
+ RT5659_PWR_MIC_DET_BIT, 0, NULL, 0),
++};
++
++static const struct snd_soc_dapm_widget rt5659_dapm_widgets[] = {
++ SND_SOC_DAPM_SUPPLY("PLL", RT5659_PWR_ANLG_3, RT5659_PWR_PLL_BIT, 0,
++ NULL, 0),
+ SND_SOC_DAPM_SUPPLY("Mono Vref", RT5659_PWR_ANLG_1,
+ RT5659_PWR_VREF3_BIT, 0, NULL, 0),
+
+@@ -2464,8 +2469,6 @@ static const struct snd_soc_dapm_widget rt5659_dapm_widgets[] = {
+ RT5659_ADC_MONO_R_ASRC_SFT, 0, NULL, 0),
+
+ /* Input Side */
+- SND_SOC_DAPM_SUPPLY("MICBIAS1", RT5659_PWR_ANLG_2, RT5659_PWR_MB1_BIT,
+- 0, NULL, 0),
+ SND_SOC_DAPM_SUPPLY("MICBIAS2", RT5659_PWR_ANLG_2, RT5659_PWR_MB2_BIT,
+ 0, NULL, 0),
+ SND_SOC_DAPM_SUPPLY("MICBIAS3", RT5659_PWR_ANLG_2, RT5659_PWR_MB3_BIT,
+@@ -3660,10 +3663,23 @@ static int rt5659_set_bias_level(struct snd_soc_component *component,
+
+ static int rt5659_probe(struct snd_soc_component *component)
+ {
++ struct snd_soc_dapm_context *dapm =
++ snd_soc_component_get_dapm(component);
+ struct rt5659_priv *rt5659 = snd_soc_component_get_drvdata(component);
+
+ rt5659->component = component;
+
++ switch (rt5659->pdata.jd_src) {
++ case RT5659_JD_HDA_HEADER:
++ break;
++
++ default:
++ snd_soc_dapm_new_controls(dapm,
++ rt5659_particular_dapm_widgets,
++ ARRAY_SIZE(rt5659_particular_dapm_widgets));
++ break;
++ }
++
+ return 0;
+ }
+
+--
+2.30.2
+
--- /dev/null
+From a5acebed1cfb43d69f4acdfae3359f8e9109521b Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 4 Jun 2021 14:31:50 +0800
+Subject: ASoC: rt5682: Fix the fast discharge for headset unplugging in
+ soundwire mode
+
+From: Oder Chiou <oder_chiou@realtek.com>
+
+[ Upstream commit 49783c6f4a4f49836b5a109ae0daf2f90b0d7713 ]
+
+Based on ("5a15cd7fce20b1fd4aece6a0240e2b58cd6a225d"), the setting also
+should be set in soundwire mode.
+
+Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
+Link: https://lore.kernel.org/r/20210604063150.29925-1-oder_chiou@realtek.com
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ sound/soc/codecs/rt5682-sdw.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/sound/soc/codecs/rt5682-sdw.c b/sound/soc/codecs/rt5682-sdw.c
+index 58fb13132602..aa6c325faeab 100644
+--- a/sound/soc/codecs/rt5682-sdw.c
++++ b/sound/soc/codecs/rt5682-sdw.c
+@@ -455,7 +455,8 @@ static int rt5682_io_init(struct device *dev, struct sdw_slave *slave)
+
+ 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_write(rt5682->regmap, RT5682_CBJ_CTRL_1, 0xd142);
++ regmap_update_bits(rt5682->regmap, RT5682_CBJ_CTRL_5, 0x0700, 0x0600);
+ 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,
+--
+2.30.2
+
--- /dev/null
+From 6f1a44d0cdb1f39da256d93737b8e2160140dfc0 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Sun, 30 May 2021 22:34:46 +0200
+Subject: ASoC: tas2562: Fix TDM_CFG0_SAMPRATE values
+
+From: Richard Weinberger <richard@nod.at>
+
+[ Upstream commit 8bef925e37bdc9b6554b85eda16ced9a8e3c135f ]
+
+TAS2562_TDM_CFG0_SAMPRATE_MASK starts at bit 1, not 0.
+So all values need to be left shifted by 1.
+
+Signed-off-by: Richard Weinberger <richard@nod.at>
+Link: https://lore.kernel.org/r/20210530203446.19022-1-richard@nod.at
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ sound/soc/codecs/tas2562.h | 14 +++++++-------
+ 1 file changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/sound/soc/codecs/tas2562.h b/sound/soc/codecs/tas2562.h
+index 81866aeb3fbf..55b2a1f52ca3 100644
+--- a/sound/soc/codecs/tas2562.h
++++ b/sound/soc/codecs/tas2562.h
+@@ -57,13 +57,13 @@
+ #define TAS2562_TDM_CFG0_RAMPRATE_MASK BIT(5)
+ #define TAS2562_TDM_CFG0_RAMPRATE_44_1 BIT(5)
+ #define TAS2562_TDM_CFG0_SAMPRATE_MASK GENMASK(3, 1)
+-#define TAS2562_TDM_CFG0_SAMPRATE_7305_8KHZ 0x0
+-#define TAS2562_TDM_CFG0_SAMPRATE_14_7_16KHZ 0x1
+-#define TAS2562_TDM_CFG0_SAMPRATE_22_05_24KHZ 0x2
+-#define TAS2562_TDM_CFG0_SAMPRATE_29_4_32KHZ 0x3
+-#define TAS2562_TDM_CFG0_SAMPRATE_44_1_48KHZ 0x4
+-#define TAS2562_TDM_CFG0_SAMPRATE_88_2_96KHZ 0x5
+-#define TAS2562_TDM_CFG0_SAMPRATE_176_4_192KHZ 0x6
++#define TAS2562_TDM_CFG0_SAMPRATE_7305_8KHZ (0x0 << 1)
++#define TAS2562_TDM_CFG0_SAMPRATE_14_7_16KHZ (0x1 << 1)
++#define TAS2562_TDM_CFG0_SAMPRATE_22_05_24KHZ (0x2 << 1)
++#define TAS2562_TDM_CFG0_SAMPRATE_29_4_32KHZ (0x3 << 1)
++#define TAS2562_TDM_CFG0_SAMPRATE_44_1_48KHZ (0x4 << 1)
++#define TAS2562_TDM_CFG0_SAMPRATE_88_2_96KHZ (0x5 << 1)
++#define TAS2562_TDM_CFG0_SAMPRATE_176_4_192KHZ (0x6 << 1)
+
+ #define TAS2562_TDM_CFG2_RIGHT_JUSTIFY BIT(6)
+
+--
+2.30.2
+
--- /dev/null
+From d8f5ef60785f8f12d8a075a4a1db376204533bea Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 7 Jun 2021 10:58:36 +0200
+Subject: drm/sun4i: dw-hdmi: Make HDMI PHY into a platform device
+
+From: Saravana Kannan <saravanak@google.com>
+
+[ Upstream commit 9bf3797796f570b34438235a6a537df85832bdad ]
+
+On sunxi boards that use HDMI output, HDMI device probe keeps being
+avoided indefinitely with these repeated messages in dmesg:
+
+ platform 1ee0000.hdmi: probe deferral - supplier 1ef0000.hdmi-phy
+ not ready
+
+There's a fwnode_link being created with fw_devlink=on between hdmi
+and hdmi-phy nodes, because both nodes have 'compatible' property set.
+
+Fw_devlink code assumes that nodes that have compatible property
+set will also have a device associated with them by some driver
+eventually. This is not the case with the current sun8i-hdmi
+driver.
+
+This commit makes sun8i-hdmi-phy into a proper platform device
+and fixes the display pipeline probe on sunxi boards that use HDMI.
+
+More context: https://lkml.org/lkml/2021/5/16/203
+
+Signed-off-by: Saravana Kannan <saravanak@google.com>
+Signed-off-by: Ondrej Jirman <megous@megous.com>
+Tested-by: Andre Przywara <andre.przywara@arm.com>
+Signed-off-by: Maxime Ripard <maxime@cerno.tech>
+Link: https://patchwork.freedesktop.org/patch/msgid/20210607085836.2827429-1-megous@megous.com
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c | 31 ++++++++++++++++---
+ drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h | 5 ++--
+ drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c | 41 ++++++++++++++++++++++----
+ 3 files changed, 66 insertions(+), 11 deletions(-)
+
+diff --git a/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c b/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c
+index bbdfd5e26ec8..f75fb157f2ff 100644
+--- a/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c
++++ b/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c
+@@ -209,7 +209,7 @@ static int sun8i_dw_hdmi_bind(struct device *dev, struct device *master,
+ goto err_disable_clk_tmds;
+ }
+
+- ret = sun8i_hdmi_phy_probe(hdmi, phy_node);
++ ret = sun8i_hdmi_phy_get(hdmi, phy_node);
+ of_node_put(phy_node);
+ if (ret) {
+ dev_err(dev, "Couldn't get the HDMI PHY\n");
+@@ -242,7 +242,6 @@ static int sun8i_dw_hdmi_bind(struct device *dev, struct device *master,
+
+ cleanup_encoder:
+ drm_encoder_cleanup(encoder);
+- sun8i_hdmi_phy_remove(hdmi);
+ err_disable_clk_tmds:
+ clk_disable_unprepare(hdmi->clk_tmds);
+ err_assert_ctrl_reset:
+@@ -263,7 +262,6 @@ static void sun8i_dw_hdmi_unbind(struct device *dev, struct device *master,
+ struct sun8i_dw_hdmi *hdmi = dev_get_drvdata(dev);
+
+ dw_hdmi_unbind(hdmi->hdmi);
+- sun8i_hdmi_phy_remove(hdmi);
+ clk_disable_unprepare(hdmi->clk_tmds);
+ reset_control_assert(hdmi->rst_ctrl);
+ gpiod_set_value(hdmi->ddc_en, 0);
+@@ -320,7 +318,32 @@ static struct platform_driver sun8i_dw_hdmi_pltfm_driver = {
+ .of_match_table = sun8i_dw_hdmi_dt_ids,
+ },
+ };
+-module_platform_driver(sun8i_dw_hdmi_pltfm_driver);
++
++static int __init sun8i_dw_hdmi_init(void)
++{
++ int ret;
++
++ ret = platform_driver_register(&sun8i_dw_hdmi_pltfm_driver);
++ if (ret)
++ return ret;
++
++ ret = platform_driver_register(&sun8i_hdmi_phy_driver);
++ if (ret) {
++ platform_driver_unregister(&sun8i_dw_hdmi_pltfm_driver);
++ return ret;
++ }
++
++ return ret;
++}
++
++static void __exit sun8i_dw_hdmi_exit(void)
++{
++ platform_driver_unregister(&sun8i_dw_hdmi_pltfm_driver);
++ platform_driver_unregister(&sun8i_hdmi_phy_driver);
++}
++
++module_init(sun8i_dw_hdmi_init);
++module_exit(sun8i_dw_hdmi_exit);
+
+ MODULE_AUTHOR("Jernej Skrabec <jernej.skrabec@siol.net>");
+ MODULE_DESCRIPTION("Allwinner DW HDMI bridge");
+diff --git a/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h b/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h
+index d4b55af0592f..74f6ed0e2570 100644
+--- a/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h
++++ b/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h
+@@ -195,14 +195,15 @@ struct sun8i_dw_hdmi {
+ struct gpio_desc *ddc_en;
+ };
+
++extern struct platform_driver sun8i_hdmi_phy_driver;
++
+ static inline struct sun8i_dw_hdmi *
+ encoder_to_sun8i_dw_hdmi(struct drm_encoder *encoder)
+ {
+ return container_of(encoder, struct sun8i_dw_hdmi, encoder);
+ }
+
+-int sun8i_hdmi_phy_probe(struct sun8i_dw_hdmi *hdmi, struct device_node *node);
+-void sun8i_hdmi_phy_remove(struct sun8i_dw_hdmi *hdmi);
++int sun8i_hdmi_phy_get(struct sun8i_dw_hdmi *hdmi, struct device_node *node);
+
+ void sun8i_hdmi_phy_init(struct sun8i_hdmi_phy *phy);
+ void sun8i_hdmi_phy_set_ops(struct sun8i_hdmi_phy *phy,
+diff --git a/drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c b/drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c
+index 9994edf67509..c9239708d398 100644
+--- a/drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c
++++ b/drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c
+@@ -5,6 +5,7 @@
+
+ #include <linux/delay.h>
+ #include <linux/of_address.h>
++#include <linux/of_platform.h>
+
+ #include "sun8i_dw_hdmi.h"
+
+@@ -597,10 +598,30 @@ static const struct of_device_id sun8i_hdmi_phy_of_table[] = {
+ { /* sentinel */ }
+ };
+
+-int sun8i_hdmi_phy_probe(struct sun8i_dw_hdmi *hdmi, struct device_node *node)
++int sun8i_hdmi_phy_get(struct sun8i_dw_hdmi *hdmi, struct device_node *node)
++{
++ struct platform_device *pdev = of_find_device_by_node(node);
++ struct sun8i_hdmi_phy *phy;
++
++ if (!pdev)
++ return -EPROBE_DEFER;
++
++ phy = platform_get_drvdata(pdev);
++ if (!phy)
++ return -EPROBE_DEFER;
++
++ hdmi->phy = phy;
++
++ put_device(&pdev->dev);
++
++ return 0;
++}
++
++static int sun8i_hdmi_phy_probe(struct platform_device *pdev)
+ {
+ const struct of_device_id *match;
+- struct device *dev = hdmi->dev;
++ struct device *dev = &pdev->dev;
++ struct device_node *node = dev->of_node;
+ struct sun8i_hdmi_phy *phy;
+ struct resource res;
+ void __iomem *regs;
+@@ -704,7 +725,7 @@ int sun8i_hdmi_phy_probe(struct sun8i_dw_hdmi *hdmi, struct device_node *node)
+ clk_prepare_enable(phy->clk_phy);
+ }
+
+- hdmi->phy = phy;
++ platform_set_drvdata(pdev, phy);
+
+ return 0;
+
+@@ -728,9 +749,9 @@ err_put_clk_bus:
+ return ret;
+ }
+
+-void sun8i_hdmi_phy_remove(struct sun8i_dw_hdmi *hdmi)
++static int sun8i_hdmi_phy_remove(struct platform_device *pdev)
+ {
+- struct sun8i_hdmi_phy *phy = hdmi->phy;
++ struct sun8i_hdmi_phy *phy = platform_get_drvdata(pdev);
+
+ clk_disable_unprepare(phy->clk_mod);
+ clk_disable_unprepare(phy->clk_bus);
+@@ -744,4 +765,14 @@ void sun8i_hdmi_phy_remove(struct sun8i_dw_hdmi *hdmi)
+ clk_put(phy->clk_pll1);
+ clk_put(phy->clk_mod);
+ clk_put(phy->clk_bus);
++ return 0;
+ }
++
++struct platform_driver sun8i_hdmi_phy_driver = {
++ .probe = sun8i_hdmi_phy_probe,
++ .remove = sun8i_hdmi_phy_remove,
++ .driver = {
++ .name = "sun8i-hdmi-phy",
++ .of_match_table = sun8i_hdmi_phy_of_table,
++ },
++};
+--
+2.30.2
+
--- /dev/null
+From 3979d9c0c913b65b791f398fd773ad5900520806 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 4 Jun 2021 11:09:59 +0800
+Subject: hwmon: (scpi-hwmon) shows the negative temperature properly
+
+From: Riwen Lu <luriwen@kylinos.cn>
+
+[ Upstream commit 78d13552346289bad4a9bf8eabb5eec5e5a321a5 ]
+
+The scpi hwmon shows the sub-zero temperature in an unsigned integer,
+which would confuse the users when the machine works in low temperature
+environment. This shows the sub-zero temperature in an signed value and
+users can get it properly from sensors.
+
+Signed-off-by: Riwen Lu <luriwen@kylinos.cn>
+Tested-by: Xin Chen <chenxin@kylinos.cn>
+Link: https://lore.kernel.org/r/20210604030959.736379-1-luriwen@kylinos.cn
+Signed-off-by: Guenter Roeck <linux@roeck-us.net>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/hwmon/scpi-hwmon.c | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/drivers/hwmon/scpi-hwmon.c b/drivers/hwmon/scpi-hwmon.c
+index 25aac40f2764..919877970ae3 100644
+--- a/drivers/hwmon/scpi-hwmon.c
++++ b/drivers/hwmon/scpi-hwmon.c
+@@ -99,6 +99,15 @@ scpi_show_sensor(struct device *dev, struct device_attribute *attr, char *buf)
+
+ scpi_scale_reading(&value, sensor);
+
++ /*
++ * Temperature sensor values are treated as signed values based on
++ * observation even though that is not explicitly specified, and
++ * because an unsigned u64 temperature does not really make practical
++ * sense especially when the temperature is below zero degrees Celsius.
++ */
++ if (sensor->info.class == TEMPERATURE)
++ return sprintf(buf, "%lld\n", (s64)value);
++
+ return sprintf(buf, "%llu\n", value);
+ }
+
+--
+2.30.2
+
--- /dev/null
+From 054cb933daeaaed3c66ac8cf4e7e960c7b7e8ce0 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 11 Jun 2021 09:54:42 +0800
+Subject: mm: relocate 'write_protect_seq' in struct mm_struct
+
+From: Feng Tang <feng.tang@intel.com>
+
+[ Upstream commit 2e3025434a6ba090c85871a1d4080ff784109e1f ]
+
+0day robot reported a 9.2% regression for will-it-scale mmap1 test
+case[1], caused by commit 57efa1fe5957 ("mm/gup: prevent gup_fast from
+racing with COW during fork").
+
+Further debug shows the regression is due to that commit changes the
+offset of hot fields 'mmap_lock' inside structure 'mm_struct', thus some
+cache alignment changes.
+
+From the perf data, the contention for 'mmap_lock' is very severe and
+takes around 95% cpu cycles, and it is a rw_semaphore
+
+ struct rw_semaphore {
+ atomic_long_t count; /* 8 bytes */
+ atomic_long_t owner; /* 8 bytes */
+ struct optimistic_spin_queue osq; /* spinner MCS lock */
+ ...
+
+Before commit 57efa1fe5957 adds the 'write_protect_seq', it happens to
+have a very optimal cache alignment layout, as Linus explained:
+
+ "and before the addition of the 'write_protect_seq' field, the
+ mmap_sem was at offset 120 in 'struct mm_struct'.
+
+ Which meant that count and owner were in two different cachelines,
+ and then when you have contention and spend time in
+ rwsem_down_write_slowpath(), this is probably *exactly* the kind
+ of layout you want.
+
+ Because first the rwsem_write_trylock() will do a cmpxchg on the
+ first cacheline (for the optimistic fast-path), and then in the
+ case of contention, rwsem_down_write_slowpath() will just access
+ the second cacheline.
+
+ Which is probably just optimal for a load that spends a lot of
+ time contended - new waiters touch that first cacheline, and then
+ they queue themselves up on the second cacheline."
+
+After the commit, the rw_semaphore is at offset 128, which means the
+'count' and 'owner' fields are now in the same cacheline, and causes
+more cache bouncing.
+
+Currently there are 3 "#ifdef CONFIG_XXX" before 'mmap_lock' which will
+affect its offset:
+
+ CONFIG_MMU
+ CONFIG_MEMBARRIER
+ CONFIG_HAVE_ARCH_COMPAT_MMAP_BASES
+
+The layout above is on 64 bits system with 0day's default kernel config
+(similar to RHEL-8.3's config), in which all these 3 options are 'y'.
+And the layout can vary with different kernel configs.
+
+Relayouting a structure is usually a double-edged sword, as sometimes it
+can helps one case, but hurt other cases. For this case, one solution
+is, as the newly added 'write_protect_seq' is a 4 bytes long seqcount_t
+(when CONFIG_DEBUG_LOCK_ALLOC=n), placing it into an existing 4 bytes
+hole in 'mm_struct' will not change other fields' alignment, while
+restoring the regression.
+
+Link: https://lore.kernel.org/lkml/20210525031636.GB7744@xsang-OptiPlex-9020/ [1]
+Reported-by: kernel test robot <oliver.sang@intel.com>
+Signed-off-by: Feng Tang <feng.tang@intel.com>
+Reviewed-by: John Hubbard <jhubbard@nvidia.com>
+Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
+Cc: Peter Xu <peterx@redhat.com>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ include/linux/mm_types.h | 27 ++++++++++++++++++++-------
+ 1 file changed, 20 insertions(+), 7 deletions(-)
+
+diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
+index a4fff7d7abe5..4eb38918da8f 100644
+--- a/include/linux/mm_types.h
++++ b/include/linux/mm_types.h
+@@ -448,13 +448,6 @@ struct mm_struct {
+ */
+ atomic_t has_pinned;
+
+- /**
+- * @write_protect_seq: Locked when any thread is write
+- * protecting pages mapped by this mm to enforce a later COW,
+- * for instance during page table copying for fork().
+- */
+- seqcount_t write_protect_seq;
+-
+ #ifdef CONFIG_MMU
+ atomic_long_t pgtables_bytes; /* PTE page table pages */
+ #endif
+@@ -463,6 +456,18 @@ struct mm_struct {
+ spinlock_t page_table_lock; /* Protects page tables and some
+ * counters
+ */
++ /*
++ * With some kernel config, the current mmap_lock's offset
++ * inside 'mm_struct' is at 0x120, which is very optimal, as
++ * its two hot fields 'count' and 'owner' sit in 2 different
++ * cachelines, and when mmap_lock is highly contended, both
++ * of the 2 fields will be accessed frequently, current layout
++ * will help to reduce cache bouncing.
++ *
++ * So please be careful with adding new fields before
++ * mmap_lock, which can easily push the 2 fields into one
++ * cacheline.
++ */
+ struct rw_semaphore mmap_lock;
+
+ struct list_head mmlist; /* List of maybe swapped mm's. These
+@@ -483,7 +488,15 @@ struct mm_struct {
+ unsigned long stack_vm; /* VM_STACK */
+ unsigned long def_flags;
+
++ /**
++ * @write_protect_seq: Locked when any thread is write
++ * protecting pages mapped by this mm to enforce a later COW,
++ * for instance during page table copying for fork().
++ */
++ seqcount_t write_protect_seq;
++
+ spinlock_t arg_lock; /* protect the below fields */
++
+ unsigned long start_code, end_code, start_data, end_data;
+ unsigned long start_brk, brk, start_stack;
+ unsigned long arg_start, arg_end, env_start, env_end;
+--
+2.30.2
+
--- /dev/null
+From d83b54d4047463dd899ebf38c4fbeeedec066000 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 19 May 2021 18:37:39 +0800
+Subject: phy: phy-mtk-tphy: Fix some resource leaks in mtk_phy_init()
+
+From: Tiezhu Yang <yangtiezhu@loongson.cn>
+
+[ Upstream commit aaac9a1bd370338ce372669eb9a6059d16b929aa ]
+
+Use clk_disable_unprepare() in the error path of mtk_phy_init() to fix
+some resource leaks.
+
+Reported-by: kernel test robot <lkp@intel.com>
+Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
+Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
+Reviewed-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
+Link: https://lore.kernel.org/r/1621420659-15858-1-git-send-email-yangtiezhu@loongson.cn
+Signed-off-by: Vinod Koul <vkoul@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/phy/mediatek/phy-mtk-tphy.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/drivers/phy/mediatek/phy-mtk-tphy.c b/drivers/phy/mediatek/phy-mtk-tphy.c
+index cdbcc49f7115..731c483a04de 100644
+--- a/drivers/phy/mediatek/phy-mtk-tphy.c
++++ b/drivers/phy/mediatek/phy-mtk-tphy.c
+@@ -949,6 +949,8 @@ static int mtk_phy_init(struct phy *phy)
+ break;
+ default:
+ dev_err(tphy->dev, "incompatible PHY type\n");
++ clk_disable_unprepare(instance->ref_clk);
++ clk_disable_unprepare(instance->da_ref_clk);
+ return -EINVAL;
+ }
+
+--
+2.30.2
+
--- /dev/null
+From a90d3612aec1ec28b950f12b1254fd68de3469d6 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 4 Jun 2021 07:53:37 +0200
+Subject: pinctrl: ralink: rt2880: avoid to error in calls is pin is already
+ enabled
+
+From: Sergio Paracuellos <sergio.paracuellos@gmail.com>
+
+[ Upstream commit eb367d875f94a228c17c8538e3f2efcf2eb07ead ]
+
+In 'rt2880_pmx_group_enable' driver is printing an error and returning
+-EBUSY if a pin has been already enabled. This begets anoying messages
+in the caller when this happens like the following:
+
+rt2880-pinmux pinctrl: pcie is already enabled
+mt7621-pci 1e140000.pcie: Error applying setting, reverse things back
+
+To avoid this just print the already enabled message in the pinctrl
+driver and return 0 instead to not confuse the user with a real
+bad problem.
+
+Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
+Link: https://lore.kernel.org/r/20210604055337.20407-1-sergio.paracuellos@gmail.com
+Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c b/drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c
+index caaf9e34f1ee..09b0b8a16e99 100644
+--- a/drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c
++++ b/drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c
+@@ -127,7 +127,7 @@ static int rt2880_pmx_group_enable(struct pinctrl_dev *pctrldev,
+ if (p->groups[group].enabled) {
+ dev_err(p->dev, "%s is already enabled\n",
+ p->groups[group].name);
+- return -EBUSY;
++ return 0;
+ }
+
+ p->groups[group].enabled = 1;
+--
+2.30.2
+
--- /dev/null
+From 586c4fede6d82d858ede18e21ec367b03e552056 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 25 May 2021 17:09:52 +0200
+Subject: platform/x86: thinkpad_acpi: Add X1 Carbon Gen 9 second fan support
+
+From: Til Jasper Ullrich <tju@tju.me>
+
+[ Upstream commit c0e0436cb4f6627146acdae8c77828f18db01151 ]
+
+The X1 Carbon Gen 9 uses two fans instead of one like the previous
+generation. This adds support for the second fan. It has been tested
+on my X1 Carbon Gen 9 (20XXS00100) and works fine.
+
+Signed-off-by: Til Jasper Ullrich <tju@tju.me>
+Link: https://lore.kernel.org/r/20210525150950.14805-1-tju@tju.me
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/platform/x86/thinkpad_acpi.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
+index 1c25af28a723..5c2f2e337b57 100644
+--- a/drivers/platform/x86/thinkpad_acpi.c
++++ b/drivers/platform/x86/thinkpad_acpi.c
+@@ -8806,6 +8806,7 @@ static const struct tpacpi_quirk fan_quirk_table[] __initconst = {
+ TPACPI_Q_LNV3('N', '2', 'O', TPACPI_FAN_2CTL), /* P1 / X1 Extreme (2nd gen) */
+ TPACPI_Q_LNV3('N', '2', 'V', TPACPI_FAN_2CTL), /* P1 / X1 Extreme (3nd gen) */
+ TPACPI_Q_LNV3('N', '3', '0', TPACPI_FAN_2CTL), /* P15 (1st gen) / P15v (1st gen) */
++ TPACPI_Q_LNV3('N', '3', '2', TPACPI_FAN_2CTL), /* X1 Carbon (9th gen) */
+ };
+
+ static int __init fan_init(struct ibm_init_struct *iibm)
+--
+2.30.2
+
--- /dev/null
+From 9734b8c1c694a1128ff6c7b2a3a6b2fcdeb2cef1 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 4 Jun 2021 16:43:02 +0800
+Subject: radeon: use memcpy_to/fromio for UVD fw upload
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Chen Li <chenli@uniontech.com>
+
+[ Upstream commit ab8363d3875a83f4901eb1cc00ce8afd24de6c85 ]
+
+I met a gpu addr bug recently and the kernel log
+tells me the pc is memcpy/memset and link register is
+radeon_uvd_resume.
+
+As we know, in some architectures, optimized memcpy/memset
+may not work well on device memory. Trival memcpy_toio/memset_io
+can fix this problem.
+
+BTW, amdgpu has already done it in:
+commit ba0b2275a678 ("drm/amdgpu: use memcpy_to/fromio for UVD fw upload"),
+that's why it has no this issue on the same gpu and platform.
+
+Signed-off-by: Chen Li <chenli@uniontech.com>
+Reviewed-by: Christian König <christian.koenig@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/gpu/drm/radeon/radeon_uvd.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/gpu/drm/radeon/radeon_uvd.c b/drivers/gpu/drm/radeon/radeon_uvd.c
+index 57fb3eb3a4b4..1f4e3396d097 100644
+--- a/drivers/gpu/drm/radeon/radeon_uvd.c
++++ b/drivers/gpu/drm/radeon/radeon_uvd.c
+@@ -286,7 +286,7 @@ int radeon_uvd_resume(struct radeon_device *rdev)
+ if (rdev->uvd.vcpu_bo == NULL)
+ return -EINVAL;
+
+- memcpy(rdev->uvd.cpu_addr, rdev->uvd_fw->data, rdev->uvd_fw->size);
++ memcpy_toio((void __iomem *)rdev->uvd.cpu_addr, rdev->uvd_fw->data, rdev->uvd_fw->size);
+
+ size = radeon_bo_size(rdev->uvd.vcpu_bo);
+ size -= rdev->uvd_fw->size;
+@@ -294,7 +294,7 @@ int radeon_uvd_resume(struct radeon_device *rdev)
+ ptr = rdev->uvd.cpu_addr;
+ ptr += rdev->uvd_fw->size;
+
+- memset(ptr, 0, size);
++ memset_io((void __iomem *)ptr, 0, size);
+
+ return 0;
+ }
+--
+2.30.2
+
--- /dev/null
+From 094acc24baf211e55eb90e1a76b4b447573a9925 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Sun, 23 May 2021 15:10:44 +0800
+Subject: regulator: bd70528: Fix off-by-one for buck123 .n_voltages setting
+
+From: Axel Lin <axel.lin@ingics.com>
+
+[ Upstream commit 0514582a1a5b4ac1a3fd64792826d392d7ae9ddc ]
+
+The valid selectors for bd70528 bucks are 0 ~ 0xf, so the .n_voltages
+should be 16 (0x10). Use 0x10 to make it consistent with BD70528_LDO_VOLTS.
+Also remove redundant defines for BD70528_BUCK_VOLTS.
+
+Signed-off-by: Axel Lin <axel.lin@ingics.com>
+Acked-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
+Link: https://lore.kernel.org/r/20210523071045.2168904-1-axel.lin@ingics.com
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ include/linux/mfd/rohm-bd70528.h | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/include/linux/mfd/rohm-bd70528.h b/include/linux/mfd/rohm-bd70528.h
+index a57af878fd0c..4a5966475a35 100644
+--- a/include/linux/mfd/rohm-bd70528.h
++++ b/include/linux/mfd/rohm-bd70528.h
+@@ -26,9 +26,7 @@ struct bd70528_data {
+ struct mutex rtc_timer_lock;
+ };
+
+-#define BD70528_BUCK_VOLTS 17
+-#define BD70528_BUCK_VOLTS 17
+-#define BD70528_BUCK_VOLTS 17
++#define BD70528_BUCK_VOLTS 0x10
+ #define BD70528_LDO_VOLTS 0x20
+
+ #define BD70528_REG_BUCK1_EN 0x0F
+--
+2.30.2
+
--- /dev/null
+From ec8a692bf708ac7ab263f392d10d4681f7f85db3 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 12 May 2021 15:58:24 +0800
+Subject: regulator: cros-ec: Fix error code in dev_err message
+
+From: Axel Lin <axel.lin@ingics.com>
+
+[ Upstream commit 3d681804efcb6e5d8089a433402e19179347d7ae ]
+
+Show proper error code instead of 0.
+
+Signed-off-by: Axel Lin <axel.lin@ingics.com>
+Link: https://lore.kernel.org/r/20210512075824.620580-1-axel.lin@ingics.com
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/regulator/cros-ec-regulator.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/regulator/cros-ec-regulator.c b/drivers/regulator/cros-ec-regulator.c
+index eb3fc1db4edc..c4754f3cf233 100644
+--- a/drivers/regulator/cros-ec-regulator.c
++++ b/drivers/regulator/cros-ec-regulator.c
+@@ -225,8 +225,9 @@ static int cros_ec_regulator_probe(struct platform_device *pdev)
+
+ drvdata->dev = devm_regulator_register(dev, &drvdata->desc, &cfg);
+ if (IS_ERR(drvdata->dev)) {
++ ret = PTR_ERR(drvdata->dev);
+ dev_err(&pdev->dev, "Failed to register regulator: %d\n", ret);
+- return PTR_ERR(drvdata->dev);
++ return ret;
+ }
+
+ platform_set_drvdata(pdev, drvdata);
+--
+2.30.2
+
--- /dev/null
+From 31d92c774ea4d2deb3f132fc3e5140bc32f14ad6 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 24 May 2021 01:42:43 +0300
+Subject: regulator: max77620: Silence deferred probe error
+
+From: Dmitry Osipenko <digetx@gmail.com>
+
+[ Upstream commit 62499a94ce5b9a41047dbadaad885347b1176079 ]
+
+One of previous changes to regulator core causes PMIC regulators to
+re-probe until supply regulator is registered. Silence noisy error
+message about the deferred probe.
+
+Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
+Link: https://lore.kernel.org/r/20210523224243.13219-3-digetx@gmail.com
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/regulator/max77620-regulator.c | 10 ++++------
+ 1 file changed, 4 insertions(+), 6 deletions(-)
+
+diff --git a/drivers/regulator/max77620-regulator.c b/drivers/regulator/max77620-regulator.c
+index 5c439c850d09..3cf8f085170a 100644
+--- a/drivers/regulator/max77620-regulator.c
++++ b/drivers/regulator/max77620-regulator.c
+@@ -846,12 +846,10 @@ static int max77620_regulator_probe(struct platform_device *pdev)
+ return ret;
+
+ rdev = devm_regulator_register(dev, rdesc, &config);
+- if (IS_ERR(rdev)) {
+- ret = PTR_ERR(rdev);
+- dev_err(dev, "Regulator registration %s failed: %d\n",
+- rdesc->name, ret);
+- return ret;
+- }
++ if (IS_ERR(rdev))
++ return dev_err_probe(dev, PTR_ERR(rdev),
++ "Regulator registration %s failed\n",
++ rdesc->name);
+ }
+
+ return 0;
+--
+2.30.2
+
--- /dev/null
+From b841507a2de817d3097dde0eb193adfd76a7d1c1 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 3 Jun 2021 17:49:44 +0800
+Subject: regulator: rt4801: Fix NULL pointer dereference if priv->enable_gpios
+ is NULL
+
+From: Axel Lin <axel.lin@ingics.com>
+
+[ Upstream commit cb2381cbecb81a8893b2d1e1af29bc2e5531df27 ]
+
+devm_gpiod_get_array_optional may return NULL if no GPIO was assigned.
+
+Signed-off-by: Axel Lin <axel.lin@ingics.com>
+Link: https://lore.kernel.org/r/20210603094944.1114156-1-axel.lin@ingics.com
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/regulator/rt4801-regulator.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/regulator/rt4801-regulator.c b/drivers/regulator/rt4801-regulator.c
+index 2055a9cb13ba..7a87788d3f09 100644
+--- a/drivers/regulator/rt4801-regulator.c
++++ b/drivers/regulator/rt4801-regulator.c
+@@ -66,7 +66,7 @@ static int rt4801_enable(struct regulator_dev *rdev)
+ struct gpio_descs *gpios = priv->enable_gpios;
+ int id = rdev_get_id(rdev), ret;
+
+- if (gpios->ndescs <= id) {
++ if (!gpios || gpios->ndescs <= id) {
+ dev_warn(&rdev->dev, "no dedicated gpio can control\n");
+ goto bypass_gpio;
+ }
+@@ -88,7 +88,7 @@ static int rt4801_disable(struct regulator_dev *rdev)
+ struct gpio_descs *gpios = priv->enable_gpios;
+ int id = rdev_get_id(rdev);
+
+- if (gpios->ndescs <= id) {
++ if (!gpios || gpios->ndescs <= id) {
+ dev_warn(&rdev->dev, "no dedicated gpio can control\n");
+ goto bypass_gpio;
+ }
+--
+2.30.2
+
--- /dev/null
+From 9f13307966885d3acdb10e5d1fb9f4674f189292 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 1 Jun 2021 18:09:15 +0800
+Subject: regulator: rtmv20: Fix to make regcache value first reading back from
+ HW
+
+From: ChiYuan Huang <cy_huang@richtek.com>
+
+[ Upstream commit 46639a5e684edd0b80ae9dff220f193feb356277 ]
+
+- Fix to make regcache value first reading back from HW.
+
+Signed-off-by: ChiYuan Huang <cy_huang@richtek.com>
+Link: https://lore.kernel.org/r/1622542155-6373-1-git-send-email-u0084500@gmail.com
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/regulator/rtmv20-regulator.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/drivers/regulator/rtmv20-regulator.c b/drivers/regulator/rtmv20-regulator.c
+index 5adc552dffd5..4bca64de0f67 100644
+--- a/drivers/regulator/rtmv20-regulator.c
++++ b/drivers/regulator/rtmv20-regulator.c
+@@ -27,6 +27,7 @@
+ #define RTMV20_REG_LDIRQ 0x30
+ #define RTMV20_REG_LDSTAT 0x40
+ #define RTMV20_REG_LDMASK 0x50
++#define RTMV20_MAX_REGS (RTMV20_REG_LDMASK + 1)
+
+ #define RTMV20_VID_MASK GENMASK(7, 4)
+ #define RICHTEK_VID 0x80
+@@ -313,6 +314,7 @@ static const struct regmap_config rtmv20_regmap_config = {
+ .val_bits = 8,
+ .cache_type = REGCACHE_RBTREE,
+ .max_register = RTMV20_REG_LDMASK,
++ .num_reg_defaults_raw = RTMV20_MAX_REGS,
+
+ .writeable_reg = rtmv20_is_accessible_reg,
+ .readable_reg = rtmv20_is_accessible_reg,
+--
+2.30.2
+
--- /dev/null
+From 5254b732c93500b68466f497b38c0867a5e09f77 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 1 Jun 2021 10:58:32 +0200
+Subject: sched/pelt: Ensure that *_sum is always synced with *_avg
+
+From: Vincent Guittot <vincent.guittot@linaro.org>
+
+[ Upstream commit fcf6631f3736985ec89bdd76392d3c7bfb60119f ]
+
+Rounding in PELT calculation happening when entities are attached/detached
+of a cfs_rq can result into situations where util/runnable_avg is not null
+but util/runnable_sum is. This is normally not possible so we need to
+ensure that util/runnable_sum stays synced with util/runnable_avg.
+
+detach_entity_load_avg() is the last place where we don't sync
+util/runnable_sum with util/runnbale_avg when moving some sched_entities
+
+Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
+Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
+Link: https://lkml.kernel.org/r/20210601085832.12626-1-vincent.guittot@linaro.org
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ kernel/sched/fair.c | 10 ++++++++--
+ 1 file changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
+index ff8a172a69ca..d6e1c90de570 100644
+--- a/kernel/sched/fair.c
++++ b/kernel/sched/fair.c
+@@ -3767,11 +3767,17 @@ static void attach_entity_load_avg(struct cfs_rq *cfs_rq, struct sched_entity *s
+ */
+ static void detach_entity_load_avg(struct cfs_rq *cfs_rq, struct sched_entity *se)
+ {
++ /*
++ * cfs_rq->avg.period_contrib can be used for both cfs_rq and se.
++ * See ___update_load_avg() for details.
++ */
++ u32 divider = get_pelt_divider(&cfs_rq->avg);
++
+ dequeue_load_avg(cfs_rq, se);
+ sub_positive(&cfs_rq->avg.util_avg, se->avg.util_avg);
+- sub_positive(&cfs_rq->avg.util_sum, se->avg.util_sum);
++ cfs_rq->avg.util_sum = cfs_rq->avg.util_avg * divider;
+ sub_positive(&cfs_rq->avg.runnable_avg, se->avg.runnable_avg);
+- sub_positive(&cfs_rq->avg.runnable_sum, se->avg.runnable_sum);
++ cfs_rq->avg.runnable_sum = cfs_rq->avg.runnable_avg * divider;
+
+ add_tg_cfs_propagate(cfs_rq, -se->avg.load_sum);
+
+--
+2.30.2
+
bnxt_en-call-bnxt_ethtool_free-in-bnxt_init_one-erro.patch
icmp-don-t-send-out-icmp-messages-with-a-source-addr.patch
net-ethernet-fix-potential-use-after-free-in-ec_bhf_.patch
+regulator-cros-ec-fix-error-code-in-dev_err-message.patch
+regulator-max77620-silence-deferred-probe-error.patch
+regulator-bd70528-fix-off-by-one-for-buck123-.n_volt.patch
+platform-x86-thinkpad_acpi-add-x1-carbon-gen-9-secon.patch
+asoc-rt5659-fix-the-lost-powers-for-the-hda-header.patch
+phy-phy-mtk-tphy-fix-some-resource-leaks-in-mtk_phy_.patch
+asoc-fsl-asoc-card-set-.owner-attribute-when-registe.patch
+regulator-rtmv20-fix-to-make-regcache-value-first-re.patch
+spi-spi-zynq-qspi-fix-some-wrong-goto-jumps-missing-.patch
+sched-pelt-ensure-that-_sum-is-always-synced-with-_a.patch
+asoc-tas2562-fix-tdm_cfg0_samprate-values.patch
+spi-stm32-qspi-always-wait-busy-bit-to-be-cleared-in.patch
+regulator-rt4801-fix-null-pointer-dereference-if-pri.patch
+asoc-rt5682-fix-the-fast-discharge-for-headset-unplu.patch
+pinctrl-ralink-rt2880-avoid-to-error-in-calls-is-pin.patch
+drm-sun4i-dw-hdmi-make-hdmi-phy-into-a-platform-devi.patch
+asoc-qcom-lpass-cpu-fix-pop-noise-during-audio-captu.patch
+radeon-use-memcpy_to-fromio-for-uvd-fw-upload.patch
+hwmon-scpi-hwmon-shows-the-negative-temperature-prop.patch
+mm-relocate-write_protect_seq-in-struct-mm_struct.patch
--- /dev/null
+From 622e85cbc531aa6164c856e6df2855965c866d19 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 27 May 2021 18:20:57 +0800
+Subject: spi: spi-zynq-qspi: Fix some wrong goto jumps & missing error code
+
+From: zpershuai <zpershuai@gmail.com>
+
+[ Upstream commit f131767eefc47de2f8afb7950cdea78397997d66 ]
+
+In zynq_qspi_probe function, when enable the device clock is done,
+the return of all the functions should goto the clk_dis_all label.
+
+If num_cs is not right then this should return a negative error
+code but currently it returns success.
+
+Signed-off-by: zpershuai <zpershuai@gmail.com>
+Link: https://lore.kernel.org/r/1622110857-21812-1-git-send-email-zpershuai@gmail.com
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/spi/spi-zynq-qspi.c | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/spi/spi-zynq-qspi.c b/drivers/spi/spi-zynq-qspi.c
+index 2765289028fa..68193db8b2e3 100644
+--- a/drivers/spi/spi-zynq-qspi.c
++++ b/drivers/spi/spi-zynq-qspi.c
+@@ -678,14 +678,14 @@ static int zynq_qspi_probe(struct platform_device *pdev)
+ xqspi->irq = platform_get_irq(pdev, 0);
+ if (xqspi->irq <= 0) {
+ ret = -ENXIO;
+- goto remove_master;
++ goto clk_dis_all;
+ }
+ ret = devm_request_irq(&pdev->dev, xqspi->irq, zynq_qspi_irq,
+ 0, pdev->name, xqspi);
+ if (ret != 0) {
+ ret = -ENXIO;
+ dev_err(&pdev->dev, "request_irq failed\n");
+- goto remove_master;
++ goto clk_dis_all;
+ }
+
+ ret = of_property_read_u32(np, "num-cs",
+@@ -693,8 +693,9 @@ static int zynq_qspi_probe(struct platform_device *pdev)
+ if (ret < 0) {
+ ctlr->num_chipselect = 1;
+ } else if (num_cs > ZYNQ_QSPI_MAX_NUM_CS) {
++ ret = -EINVAL;
+ dev_err(&pdev->dev, "only 2 chip selects are available\n");
+- goto remove_master;
++ goto clk_dis_all;
+ } else {
+ ctlr->num_chipselect = num_cs;
+ }
+--
+2.30.2
+
--- /dev/null
+From 45e40bbd8047e3218676fefbe878c683ccd9850d Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 3 Jun 2021 09:34:21 +0200
+Subject: spi: stm32-qspi: Always wait BUSY bit to be cleared in
+ stm32_qspi_wait_cmd()
+
+From: Patrice Chotard <patrice.chotard@foss.st.com>
+
+[ Upstream commit d38fa9a155b2829b7e2cfcf8a4171b6dd3672808 ]
+
+In U-boot side, an issue has been encountered when QSPI source clock is
+running at low frequency (24 MHz for example), waiting for TCF bit to be
+set didn't ensure that all data has been send out the FIFO, we should also
+wait that BUSY bit is cleared.
+
+To prevent similar issue in kernel driver, we implement similar behavior
+by always waiting BUSY bit to be cleared.
+
+Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
+Link: https://lore.kernel.org/r/20210603073421.8441-1-patrice.chotard@foss.st.com
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/spi/spi-stm32-qspi.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/spi/spi-stm32-qspi.c b/drivers/spi/spi-stm32-qspi.c
+index 2786470a5201..4f24f6392212 100644
+--- a/drivers/spi/spi-stm32-qspi.c
++++ b/drivers/spi/spi-stm32-qspi.c
+@@ -293,7 +293,7 @@ static int stm32_qspi_wait_cmd(struct stm32_qspi *qspi,
+ int err = 0;
+
+ if (!op->data.nbytes)
+- return stm32_qspi_wait_nobusy(qspi);
++ goto wait_nobusy;
+
+ if (readl_relaxed(qspi->io_base + QSPI_SR) & SR_TCF)
+ goto out;
+@@ -314,6 +314,9 @@ static int stm32_qspi_wait_cmd(struct stm32_qspi *qspi,
+ out:
+ /* clear flags */
+ writel_relaxed(FCR_CTCF | FCR_CTEF, qspi->io_base + QSPI_FCR);
++wait_nobusy:
++ if (!err)
++ err = stm32_qspi_wait_nobusy(qspi);
+
+ return err;
+ }
+--
+2.30.2
+