linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHv3 0/4] ASoC: Convert to use regmap framework's endianness method.
@ 2014-08-25  3:30 Xiubo Li
  2014-08-25  3:30 ` [PATCHv3 1/4] ASoC: fsl-asrc: " Xiubo Li
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Xiubo Li @ 2014-08-25  3:30 UTC (permalink / raw)
  To: broonie, nicoleotsuka, timur, lgirdwood, perex, tiwai, alsa-devel
  Cc: galak, mark.rutland, robh+dt, pawel.moll, linux-kernel, Xiubo Li

Changes in V3:
- Delete 'ASoC: fsl-sai: rename big_endian_data to is_msb_first.' patch.


Changes in V2:
- Modified the regmap config to const type.
- Added ASRC patch.
- Followed Rutland's advice.




Xiubo Li (4):
  ASoC: fsl-asrc: Convert to use regmap framework's endianness method.
  ASoC: fsl-esai: Convert to use regmap framework's endianness method.
  ASoC: fsl-spdif: Convert to use regmap framework's endianness method.
  ASoC: fsl-sai: Convert to use regmap framework's endianness method.

 Documentation/devicetree/bindings/sound/fsl-sai.txt | 7 +++----
 sound/soc/fsl/fsl_asrc.c                            | 6 +-----
 sound/soc/fsl/fsl_esai.c                            | 5 +----
 sound/soc/fsl/fsl_sai.c                             | 6 +-----
 sound/soc/fsl/fsl_sai.h                             | 1 -
 sound/soc/fsl/fsl_spdif.c                           | 5 +----
 6 files changed, 7 insertions(+), 23 deletions(-)

-- 
1.8.5


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

* [PATCHv3 1/4] ASoC: fsl-asrc: Convert to use regmap framework's endianness method.
  2014-08-25  3:30 [PATCHv3 0/4] ASoC: Convert to use regmap framework's endianness method Xiubo Li
@ 2014-08-25  3:30 ` Xiubo Li
  2014-08-25  4:11   ` Nicolin Chen
  2014-08-25  3:31 ` [PATCHv3 2/4] ASoC: fsl-esai: " Xiubo Li
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 7+ messages in thread
From: Xiubo Li @ 2014-08-25  3:30 UTC (permalink / raw)
  To: broonie, nicoleotsuka, timur, lgirdwood, perex, tiwai, alsa-devel
  Cc: galak, mark.rutland, robh+dt, pawel.moll, linux-kernel, Xiubo Li

Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
---
 sound/soc/fsl/fsl_asrc.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/sound/soc/fsl/fsl_asrc.c b/sound/soc/fsl/fsl_asrc.c
index 8221104..3b14531 100644
--- a/sound/soc/fsl/fsl_asrc.c
+++ b/sound/soc/fsl/fsl_asrc.c
@@ -684,7 +684,7 @@ static bool fsl_asrc_writeable_reg(struct device *dev, unsigned int reg)
 	}
 }
 
-static struct regmap_config fsl_asrc_regmap_config = {
+static const struct regmap_config fsl_asrc_regmap_config = {
 	.reg_bits = 32,
 	.reg_stride = 4,
 	.val_bits = 32,
@@ -802,10 +802,6 @@ static int fsl_asrc_probe(struct platform_device *pdev)
 
 	asrc_priv->paddr = res->start;
 
-	/* Register regmap and let it prepare core clock */
-	if (of_property_read_bool(np, "big-endian"))
-		fsl_asrc_regmap_config.val_format_endian = REGMAP_ENDIAN_BIG;
-
 	asrc_priv->regmap = devm_regmap_init_mmio_clk(&pdev->dev, "mem", regs,
 						      &fsl_asrc_regmap_config);
 	if (IS_ERR(asrc_priv->regmap)) {
-- 
1.8.5


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

* [PATCHv3 2/4] ASoC: fsl-esai: Convert to use regmap framework's endianness method.
  2014-08-25  3:30 [PATCHv3 0/4] ASoC: Convert to use regmap framework's endianness method Xiubo Li
  2014-08-25  3:30 ` [PATCHv3 1/4] ASoC: fsl-asrc: " Xiubo Li
@ 2014-08-25  3:31 ` Xiubo Li
  2014-08-25  3:31 ` [PATCHv3 3/4] ASoC: fsl-spdif: " Xiubo Li
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Xiubo Li @ 2014-08-25  3:31 UTC (permalink / raw)
  To: broonie, nicoleotsuka, timur, lgirdwood, perex, tiwai, alsa-devel
  Cc: galak, mark.rutland, robh+dt, pawel.moll, linux-kernel, Xiubo Li

Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
---
 sound/soc/fsl/fsl_esai.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/sound/soc/fsl/fsl_esai.c b/sound/soc/fsl/fsl_esai.c
index b2f6b3e..8bcdfda 100644
--- a/sound/soc/fsl/fsl_esai.c
+++ b/sound/soc/fsl/fsl_esai.c
@@ -710,7 +710,7 @@ static bool fsl_esai_writeable_reg(struct device *dev, unsigned int reg)
 	}
 }
 
-static struct regmap_config fsl_esai_regmap_config = {
+static const struct regmap_config fsl_esai_regmap_config = {
 	.reg_bits = 32,
 	.reg_stride = 4,
 	.val_bits = 32,
@@ -736,9 +736,6 @@ static int fsl_esai_probe(struct platform_device *pdev)
 	esai_priv->pdev = pdev;
 	strcpy(esai_priv->name, np->name);
 
-	if (of_property_read_bool(np, "big-endian"))
-		fsl_esai_regmap_config.val_format_endian = REGMAP_ENDIAN_BIG;
-
 	/* Get the addresses and IRQ */
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	regs = devm_ioremap_resource(&pdev->dev, res);
-- 
1.8.5


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

* [PATCHv3 3/4] ASoC: fsl-spdif: Convert to use regmap framework's endianness method.
  2014-08-25  3:30 [PATCHv3 0/4] ASoC: Convert to use regmap framework's endianness method Xiubo Li
  2014-08-25  3:30 ` [PATCHv3 1/4] ASoC: fsl-asrc: " Xiubo Li
  2014-08-25  3:31 ` [PATCHv3 2/4] ASoC: fsl-esai: " Xiubo Li
@ 2014-08-25  3:31 ` Xiubo Li
  2014-08-25  3:31 ` [PATCHv3 4/4] ASoC: fsl-sai: " Xiubo Li
  2014-08-27 18:19 ` [PATCHv3 0/4] ASoC: " Mark Brown
  4 siblings, 0 replies; 7+ messages in thread
From: Xiubo Li @ 2014-08-25  3:31 UTC (permalink / raw)
  To: broonie, nicoleotsuka, timur, lgirdwood, perex, tiwai, alsa-devel
  Cc: galak, mark.rutland, robh+dt, pawel.moll, linux-kernel, Xiubo Li

Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
---
 sound/soc/fsl/fsl_spdif.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/sound/soc/fsl/fsl_spdif.c b/sound/soc/fsl/fsl_spdif.c
index 70acfe4..ae4e408 100644
--- a/sound/soc/fsl/fsl_spdif.c
+++ b/sound/soc/fsl/fsl_spdif.c
@@ -1040,7 +1040,7 @@ static bool fsl_spdif_writeable_reg(struct device *dev, unsigned int reg)
 	}
 }
 
-static struct regmap_config fsl_spdif_regmap_config = {
+static const struct regmap_config fsl_spdif_regmap_config = {
 	.reg_bits = 32,
 	.reg_stride = 4,
 	.val_bits = 32,
@@ -1184,9 +1184,6 @@ static int fsl_spdif_probe(struct platform_device *pdev)
 	memcpy(&spdif_priv->cpu_dai_drv, &fsl_spdif_dai, sizeof(fsl_spdif_dai));
 	spdif_priv->cpu_dai_drv.name = spdif_priv->name;
 
-	if (of_property_read_bool(np, "big-endian"))
-		fsl_spdif_regmap_config.val_format_endian = REGMAP_ENDIAN_BIG;
-
 	/* Get the addresses and IRQ */
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	regs = devm_ioremap_resource(&pdev->dev, res);
-- 
1.8.5


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

* [PATCHv3 4/4] ASoC: fsl-sai: Convert to use regmap framework's endianness method.
  2014-08-25  3:30 [PATCHv3 0/4] ASoC: Convert to use regmap framework's endianness method Xiubo Li
                   ` (2 preceding siblings ...)
  2014-08-25  3:31 ` [PATCHv3 3/4] ASoC: fsl-spdif: " Xiubo Li
@ 2014-08-25  3:31 ` Xiubo Li
  2014-08-27 18:19 ` [PATCHv3 0/4] ASoC: " Mark Brown
  4 siblings, 0 replies; 7+ messages in thread
From: Xiubo Li @ 2014-08-25  3:31 UTC (permalink / raw)
  To: broonie, nicoleotsuka, timur, lgirdwood, perex, tiwai, alsa-devel
  Cc: galak, mark.rutland, robh+dt, pawel.moll, linux-kernel, Xiubo Li

Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
---
 Documentation/devicetree/bindings/sound/fsl-sai.txt | 7 +++----
 sound/soc/fsl/fsl_sai.c                             | 6 +-----
 sound/soc/fsl/fsl_sai.h                             | 1 -
 3 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/Documentation/devicetree/bindings/sound/fsl-sai.txt b/Documentation/devicetree/bindings/sound/fsl-sai.txt
index dc9f9c3..06a405e 100644
--- a/Documentation/devicetree/bindings/sound/fsl-sai.txt
+++ b/Documentation/devicetree/bindings/sound/fsl-sai.txt
@@ -18,9 +18,8 @@ Required properties:
 - pinctrl-names: Must contain a "default" entry.
 - pinctrl-NNN: One property must exist for each entry in pinctrl-names.
   See ../pinctrl/pinctrl-bindings.txt for details of the property values.
-- big-endian-regs: If this property is absent, the little endian mode will
-  be in use as default, or the big endian mode will be in use for all the
-  device registers.
+- big-endian: Boolean property, required if all the FTM_PWM registers
+  are big-endian rather than little-endian.
 - big-endian-data: If this property is absent, the little endian mode will
   be in use as default, or the big endian mode will be in use for all the
   fifo data.
@@ -53,6 +52,6 @@ sai2: sai@40031000 {
 	      dma-names = "tx", "rx";
 	      dmas = <&edma0 0 VF610_EDMA_MUXID0_SAI2_TX>,
 		   <&edma0 0 VF610_EDMA_MUXID0_SAI2_RX>;
-	      big-endian-regs;
+	      big-endian;
 	      big-endian-data;
 };
diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c
index 60fe7c7..a6eb784 100644
--- a/sound/soc/fsl/fsl_sai.c
+++ b/sound/soc/fsl/fsl_sai.c
@@ -544,7 +544,7 @@ static bool fsl_sai_writeable_reg(struct device *dev, unsigned int reg)
 	}
 }
 
-static struct regmap_config fsl_sai_regmap_config = {
+static const struct regmap_config fsl_sai_regmap_config = {
 	.reg_bits = 32,
 	.reg_stride = 4,
 	.val_bits = 32,
@@ -573,10 +573,6 @@ static int fsl_sai_probe(struct platform_device *pdev)
 	if (of_device_is_compatible(pdev->dev.of_node, "fsl,imx6sx-sai"))
 		sai->sai_on_imx = true;
 
-	sai->big_endian_regs = of_property_read_bool(np, "big-endian-regs");
-	if (sai->big_endian_regs)
-		fsl_sai_regmap_config.val_format_endian = REGMAP_ENDIAN_BIG;
-
 	sai->big_endian_data = of_property_read_bool(np, "big-endian-data");
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
diff --git a/sound/soc/fsl/fsl_sai.h b/sound/soc/fsl/fsl_sai.h
index b3d8864..2cded44 100644
--- a/sound/soc/fsl/fsl_sai.h
+++ b/sound/soc/fsl/fsl_sai.h
@@ -132,7 +132,6 @@ struct fsl_sai {
 	struct clk *bus_clk;
 	struct clk *mclk_clk[FSL_SAI_MCLK_MAX];
 
-	bool big_endian_regs;
 	bool big_endian_data;
 	bool is_dsp_mode;
 	bool sai_on_imx;
-- 
1.8.5


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

* Re: [PATCHv3 1/4] ASoC: fsl-asrc: Convert to use regmap framework's endianness method.
  2014-08-25  3:30 ` [PATCHv3 1/4] ASoC: fsl-asrc: " Xiubo Li
@ 2014-08-25  4:11   ` Nicolin Chen
  0 siblings, 0 replies; 7+ messages in thread
From: Nicolin Chen @ 2014-08-25  4:11 UTC (permalink / raw)
  To: Xiubo Li
  Cc: broonie, timur, lgirdwood, perex, tiwai, alsa-devel, galak,
	mark.rutland, robh+dt, pawel.moll, linux-kernel

On Mon, Aug 25, 2014 at 11:30:59AM +0800, Xiubo Li wrote:
> Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
> ---
>  sound/soc/fsl/fsl_asrc.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/sound/soc/fsl/fsl_asrc.c b/sound/soc/fsl/fsl_asrc.c
> index 8221104..3b14531 100644
> --- a/sound/soc/fsl/fsl_asrc.c
> +++ b/sound/soc/fsl/fsl_asrc.c
> @@ -802,10 +802,6 @@ static int fsl_asrc_probe(struct platform_device *pdev)
>  
>  	asrc_priv->paddr = res->start;
>  
> -	/* Register regmap and let it prepare core clock */

Oops, I didn't notice this change. This should be needless.

Otherwise, the whole change within sound/soc/fsl by this series looks fine.

Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>

> -	if (of_property_read_bool(np, "big-endian"))
> -		fsl_asrc_regmap_config.val_format_endian = REGMAP_ENDIAN_BIG;
> -
 

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

* Re: [PATCHv3 0/4] ASoC: Convert to use regmap framework's endianness method.
  2014-08-25  3:30 [PATCHv3 0/4] ASoC: Convert to use regmap framework's endianness method Xiubo Li
                   ` (3 preceding siblings ...)
  2014-08-25  3:31 ` [PATCHv3 4/4] ASoC: fsl-sai: " Xiubo Li
@ 2014-08-27 18:19 ` Mark Brown
  4 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2014-08-27 18:19 UTC (permalink / raw)
  To: Xiubo Li
  Cc: nicoleotsuka, timur, lgirdwood, perex, tiwai, alsa-devel, galak,
	mark.rutland, robh+dt, pawel.moll, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 172 bytes --]

On Mon, Aug 25, 2014 at 11:30:58AM +0800, Xiubo Li wrote:
> Changes in V3:
> - Delete 'ASoC: fsl-sai: rename big_endian_data to is_msb_first.' patch.

Applied all, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

end of thread, other threads:[~2014-08-27 18:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-25  3:30 [PATCHv3 0/4] ASoC: Convert to use regmap framework's endianness method Xiubo Li
2014-08-25  3:30 ` [PATCHv3 1/4] ASoC: fsl-asrc: " Xiubo Li
2014-08-25  4:11   ` Nicolin Chen
2014-08-25  3:31 ` [PATCHv3 2/4] ASoC: fsl-esai: " Xiubo Li
2014-08-25  3:31 ` [PATCHv3 3/4] ASoC: fsl-spdif: " Xiubo Li
2014-08-25  3:31 ` [PATCHv3 4/4] ASoC: fsl-sai: " Xiubo Li
2014-08-27 18:19 ` [PATCHv3 0/4] ASoC: " 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).