linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 0/4] Patches to update for rockchip spdif
@ 2021-08-24 10:15 Sugar Zhang
  2021-08-24 10:15 ` [PATCH v1 1/4] ASoC: rockchip: spdif: Mark SPDIF_SMPDR as volatile Sugar Zhang
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Sugar Zhang @ 2021-08-24 10:15 UTC (permalink / raw)
  To: broonie, heiko
  Cc: linux-rockchip, Sugar Zhang, Jaroslav Kysela, devicetree,
	alsa-devel, linux-kernel, Takashi Iwai, Liam Girdwood,
	Rob Herring, linux-arm-kernel

These patches fixup or update for rockchip spdif.


Sugar Zhang (4):
  ASoC: rockchip: spdif: Mark SPDIF_SMPDR as volatile
  ASoC: rockchip: spdif: Fix some coding style
  ASoC: rockchip: spdif: Add support for rk3568 spdif
  ASoC: dt-bindings: rockchip: Add compatible for rk3568 spdif

 .../devicetree/bindings/sound/rockchip-spdif.yaml  |  1 +
 sound/soc/rockchip/rockchip_spdif.c                | 38 ++++++++++++----------
 2 files changed, 22 insertions(+), 17 deletions(-)

-- 
2.7.4




^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v1 1/4] ASoC: rockchip: spdif: Mark SPDIF_SMPDR as volatile
  2021-08-24 10:15 [PATCH v1 0/4] Patches to update for rockchip spdif Sugar Zhang
@ 2021-08-24 10:15 ` Sugar Zhang
  2021-08-24 10:16 ` [PATCH v1 2/4] ASoC: rockchip: spdif: Fix some coding style Sugar Zhang
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Sugar Zhang @ 2021-08-24 10:15 UTC (permalink / raw)
  To: broonie, heiko
  Cc: linux-rockchip, Sugar Zhang, Liam Girdwood, Jaroslav Kysela,
	Takashi Iwai, alsa-devel, linux-arm-kernel, linux-kernel

This patch marks SPDIF_SMPDR as volatile to make it resaonable,
which also requires marking it as readable, even though it isn't.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
---

 sound/soc/rockchip/rockchip_spdif.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sound/soc/rockchip/rockchip_spdif.c b/sound/soc/rockchip/rockchip_spdif.c
index 73226a4..8baa473 100644
--- a/sound/soc/rockchip/rockchip_spdif.c
+++ b/sound/soc/rockchip/rockchip_spdif.c
@@ -247,6 +247,7 @@ static bool rk_spdif_rd_reg(struct device *dev, unsigned int reg)
 	case SPDIF_INTCR:
 	case SPDIF_INTSR:
 	case SPDIF_XFER:
+	case SPDIF_SMPDR:
 		return true;
 	default:
 		return false;
@@ -258,6 +259,7 @@ static bool rk_spdif_volatile_reg(struct device *dev, unsigned int reg)
 	switch (reg) {
 	case SPDIF_INTSR:
 	case SPDIF_SDBLR:
+	case SPDIF_SMPDR:
 		return true;
 	default:
 		return false;
-- 
2.7.4




^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v1 2/4] ASoC: rockchip: spdif: Fix some coding style
  2021-08-24 10:15 [PATCH v1 0/4] Patches to update for rockchip spdif Sugar Zhang
  2021-08-24 10:15 ` [PATCH v1 1/4] ASoC: rockchip: spdif: Mark SPDIF_SMPDR as volatile Sugar Zhang
@ 2021-08-24 10:16 ` Sugar Zhang
  2021-08-24 10:16 ` [PATCH v1 3/4] ASoC: rockchip: spdif: Add support for rk3568 spdif Sugar Zhang
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Sugar Zhang @ 2021-08-24 10:16 UTC (permalink / raw)
  To: broonie, heiko
  Cc: linux-rockchip, Sugar Zhang, Liam Girdwood, Jaroslav Kysela,
	Takashi Iwai, alsa-devel, linux-arm-kernel, linux-kernel

This patch fix some coding style.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
---

 sound/soc/rockchip/rockchip_spdif.c | 34 +++++++++++++++++-----------------
 1 file changed, 17 insertions(+), 17 deletions(-)

diff --git a/sound/soc/rockchip/rockchip_spdif.c b/sound/soc/rockchip/rockchip_spdif.c
index 8baa473..92b27b6 100644
--- a/sound/soc/rockchip/rockchip_spdif.c
+++ b/sound/soc/rockchip/rockchip_spdif.c
@@ -103,8 +103,8 @@ static int __maybe_unused rk_spdif_runtime_resume(struct device *dev)
 }
 
 static int rk_spdif_hw_params(struct snd_pcm_substream *substream,
-				  struct snd_pcm_hw_params *params,
-				  struct snd_soc_dai *dai)
+			      struct snd_pcm_hw_params *params,
+			      struct snd_soc_dai *dai)
 {
 	struct rk_spdif_dev *spdif = snd_soc_dai_get_drvdata(dai);
 	unsigned int val = SPDIF_CFGR_HALFWORD_ENABLE;
@@ -137,15 +137,15 @@ static int rk_spdif_hw_params(struct snd_pcm_substream *substream,
 	}
 
 	ret = regmap_update_bits(spdif->regmap, SPDIF_CFGR,
-		SPDIF_CFGR_CLK_DIV_MASK | SPDIF_CFGR_HALFWORD_ENABLE |
-		SDPIF_CFGR_VDW_MASK,
-		val);
+				 SPDIF_CFGR_CLK_DIV_MASK |
+				 SPDIF_CFGR_HALFWORD_ENABLE |
+				 SDPIF_CFGR_VDW_MASK, val);
 
 	return ret;
 }
 
 static int rk_spdif_trigger(struct snd_pcm_substream *substream,
-				int cmd, struct snd_soc_dai *dai)
+			    int cmd, struct snd_soc_dai *dai)
 {
 	struct rk_spdif_dev *spdif = snd_soc_dai_get_drvdata(dai);
 	int ret;
@@ -155,31 +155,31 @@ static int rk_spdif_trigger(struct snd_pcm_substream *substream,
 	case SNDRV_PCM_TRIGGER_RESUME:
 	case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
 		ret = regmap_update_bits(spdif->regmap, SPDIF_DMACR,
-				   SPDIF_DMACR_TDE_ENABLE |
-				   SPDIF_DMACR_TDL_MASK,
-				   SPDIF_DMACR_TDE_ENABLE |
-				   SPDIF_DMACR_TDL(16));
+					 SPDIF_DMACR_TDE_ENABLE |
+					 SPDIF_DMACR_TDL_MASK,
+					 SPDIF_DMACR_TDE_ENABLE |
+					 SPDIF_DMACR_TDL(16));
 
 		if (ret != 0)
 			return ret;
 
 		ret = regmap_update_bits(spdif->regmap, SPDIF_XFER,
-				   SPDIF_XFER_TXS_START,
-				   SPDIF_XFER_TXS_START);
+					 SPDIF_XFER_TXS_START,
+					 SPDIF_XFER_TXS_START);
 		break;
 	case SNDRV_PCM_TRIGGER_SUSPEND:
 	case SNDRV_PCM_TRIGGER_STOP:
 	case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
 		ret = regmap_update_bits(spdif->regmap, SPDIF_DMACR,
-				   SPDIF_DMACR_TDE_ENABLE,
-				   SPDIF_DMACR_TDE_DISABLE);
+					 SPDIF_DMACR_TDE_ENABLE,
+					 SPDIF_DMACR_TDE_DISABLE);
 
 		if (ret != 0)
 			return ret;
 
 		ret = regmap_update_bits(spdif->regmap, SPDIF_XFER,
-				   SPDIF_XFER_TXS_START,
-				   SPDIF_XFER_TXS_STOP);
+					 SPDIF_XFER_TXS_START,
+					 SPDIF_XFER_TXS_STOP);
 		break;
 	default:
 		ret = -EINVAL;
@@ -293,7 +293,7 @@ static int rk_spdif_probe(struct platform_device *pdev)
 		grf = syscon_regmap_lookup_by_phandle(np, "rockchip,grf");
 		if (IS_ERR(grf)) {
 			dev_err(&pdev->dev,
-				"rockchip_spdif missing 'rockchip,grf' \n");
+				"rockchip_spdif missing 'rockchip,grf'\n");
 			return PTR_ERR(grf);
 		}
 
-- 
2.7.4




^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v1 3/4] ASoC: rockchip: spdif: Add support for rk3568 spdif
  2021-08-24 10:15 [PATCH v1 0/4] Patches to update for rockchip spdif Sugar Zhang
  2021-08-24 10:15 ` [PATCH v1 1/4] ASoC: rockchip: spdif: Mark SPDIF_SMPDR as volatile Sugar Zhang
  2021-08-24 10:16 ` [PATCH v1 2/4] ASoC: rockchip: spdif: Fix some coding style Sugar Zhang
@ 2021-08-24 10:16 ` Sugar Zhang
  2021-08-24 10:16 ` [PATCH v1 4/4] ASoC: dt-bindings: rockchip: Add compatible " Sugar Zhang
  2021-08-26 14:15 ` [PATCH v1 0/4] Patches to update for rockchip spdif Mark Brown
  4 siblings, 0 replies; 7+ messages in thread
From: Sugar Zhang @ 2021-08-24 10:16 UTC (permalink / raw)
  To: broonie, heiko
  Cc: linux-rockchip, Sugar Zhang, Liam Girdwood, Jaroslav Kysela,
	Takashi Iwai, alsa-devel, linux-arm-kernel, linux-kernel

This patch adds support for rk3568 spdif which is the same
with rk3366.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
---

 sound/soc/rockchip/rockchip_spdif.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sound/soc/rockchip/rockchip_spdif.c b/sound/soc/rockchip/rockchip_spdif.c
index 92b27b6..d027ca4 100644
--- a/sound/soc/rockchip/rockchip_spdif.c
+++ b/sound/soc/rockchip/rockchip_spdif.c
@@ -58,6 +58,8 @@ static const struct of_device_id rk_spdif_match[] __maybe_unused = {
 	  .data = (void *)RK_SPDIF_RK3366 },
 	{ .compatible = "rockchip,rk3399-spdif",
 	  .data = (void *)RK_SPDIF_RK3366 },
+	{ .compatible = "rockchip,rk3568-spdif",
+	  .data = (void *)RK_SPDIF_RK3366 },
 	{},
 };
 MODULE_DEVICE_TABLE(of, rk_spdif_match);
-- 
2.7.4




^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v1 4/4] ASoC: dt-bindings: rockchip: Add compatible for rk3568 spdif
  2021-08-24 10:15 [PATCH v1 0/4] Patches to update for rockchip spdif Sugar Zhang
                   ` (2 preceding siblings ...)
  2021-08-24 10:16 ` [PATCH v1 3/4] ASoC: rockchip: spdif: Add support for rk3568 spdif Sugar Zhang
@ 2021-08-24 10:16 ` Sugar Zhang
  2021-08-24 18:03   ` Rob Herring
  2021-08-26 14:15 ` [PATCH v1 0/4] Patches to update for rockchip spdif Mark Brown
  4 siblings, 1 reply; 7+ messages in thread
From: Sugar Zhang @ 2021-08-24 10:16 UTC (permalink / raw)
  To: broonie, heiko
  Cc: linux-rockchip, Sugar Zhang, Liam Girdwood, Rob Herring,
	alsa-devel, devicetree, linux-arm-kernel, linux-kernel

This patch adds compatible string for rk3568 spdif.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
---

 Documentation/devicetree/bindings/sound/rockchip-spdif.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/sound/rockchip-spdif.yaml b/Documentation/devicetree/bindings/sound/rockchip-spdif.yaml
index 62a61b6..d0a24bf 100644
--- a/Documentation/devicetree/bindings/sound/rockchip-spdif.yaml
+++ b/Documentation/devicetree/bindings/sound/rockchip-spdif.yaml
@@ -23,6 +23,7 @@ properties:
       - const: rockchip,rk3366-spdif
       - const: rockchip,rk3368-spdif
       - const: rockchip,rk3399-spdif
+      - const: rockchip,rk3568-spdif
       - items:
           - enum:
               - rockchip,rk3188-spdif
-- 
2.7.4




^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH v1 4/4] ASoC: dt-bindings: rockchip: Add compatible for rk3568 spdif
  2021-08-24 10:16 ` [PATCH v1 4/4] ASoC: dt-bindings: rockchip: Add compatible " Sugar Zhang
@ 2021-08-24 18:03   ` Rob Herring
  0 siblings, 0 replies; 7+ messages in thread
From: Rob Herring @ 2021-08-24 18:03 UTC (permalink / raw)
  To: Sugar Zhang
  Cc: linux-kernel, alsa-devel, Rob Herring, broonie, Liam Girdwood,
	devicetree, linux-rockchip, heiko, linux-arm-kernel

On Tue, 24 Aug 2021 18:16:02 +0800, Sugar Zhang wrote:
> This patch adds compatible string for rk3568 spdif.
> 
> Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
> ---
> 
>  Documentation/devicetree/bindings/sound/rockchip-spdif.yaml | 1 +
>  1 file changed, 1 insertion(+)
> 

Acked-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v1 0/4] Patches to update for rockchip spdif
  2021-08-24 10:15 [PATCH v1 0/4] Patches to update for rockchip spdif Sugar Zhang
                   ` (3 preceding siblings ...)
  2021-08-24 10:16 ` [PATCH v1 4/4] ASoC: dt-bindings: rockchip: Add compatible " Sugar Zhang
@ 2021-08-26 14:15 ` Mark Brown
  4 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2021-08-26 14:15 UTC (permalink / raw)
  To: heiko, Sugar Zhang
  Cc: Mark Brown, devicetree, linux-arm-kernel, alsa-devel,
	Rob Herring, Liam Girdwood, Takashi Iwai, linux-rockchip,
	Jaroslav Kysela, linux-kernel

On Tue, 24 Aug 2021 18:15:58 +0800, Sugar Zhang wrote:
> These patches fixup or update for rockchip spdif.
> 
> 
> Sugar Zhang (4):
>   ASoC: rockchip: spdif: Mark SPDIF_SMPDR as volatile
>   ASoC: rockchip: spdif: Fix some coding style
>   ASoC: rockchip: spdif: Add support for rk3568 spdif
>   ASoC: dt-bindings: rockchip: Add compatible for rk3568 spdif
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/4] ASoC: rockchip: spdif: Mark SPDIF_SMPDR as volatile
      commit: 023a3f3a1c4f9be9cc1ae92579ba816120fb5807
[2/4] ASoC: rockchip: spdif: Fix some coding style
      commit: acc8b9d117912c2d5952868fba0d4fca49cde3c8
[3/4] ASoC: rockchip: spdif: Add support for rk3568 spdif
      commit: c5d4f09feb9f74e704d87a304f0c20001488fe10
[4/4] ASoC: dt-bindings: rockchip: Add compatible for rk3568 spdif
      commit: e79ef3c2cfe0b39878496eac87450698a2e84e3f

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-08-26 14:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-24 10:15 [PATCH v1 0/4] Patches to update for rockchip spdif Sugar Zhang
2021-08-24 10:15 ` [PATCH v1 1/4] ASoC: rockchip: spdif: Mark SPDIF_SMPDR as volatile Sugar Zhang
2021-08-24 10:16 ` [PATCH v1 2/4] ASoC: rockchip: spdif: Fix some coding style Sugar Zhang
2021-08-24 10:16 ` [PATCH v1 3/4] ASoC: rockchip: spdif: Add support for rk3568 spdif Sugar Zhang
2021-08-24 10:16 ` [PATCH v1 4/4] ASoC: dt-bindings: rockchip: Add compatible " Sugar Zhang
2021-08-24 18:03   ` Rob Herring
2021-08-26 14:15 ` [PATCH v1 0/4] Patches to update for rockchip spdif Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).