All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCHv2 0/5] Convert to use regmap framework's endianness method.
@ 2014-08-19  4:14 Xiubo Li
       [not found] ` <1408421693-9929-1-git-send-email-Li.Xiubo-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
  0 siblings, 1 reply; 21+ messages in thread
From: Xiubo Li @ 2014-08-19  4:14 UTC (permalink / raw)
  To: broonie-DgEjT+Ai2ygdnm+yROfE0A,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw, mark.rutland-5wv7dgnIgG8,
	nicoleotsuka-Re5JQEeQqe8AvxtiuMwx3w, timur-N01EOCouUvQ
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA, Xiubo Li

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


Xiubo Li (5):
  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.
  ASoC: fsl-sai: rename big_endian_data to is_msb_first.

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

-- 
1.8.5

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCHv2 1/5] ASoC: fsl-asrc: Convert to use regmap framework's endianness method.
       [not found] ` <1408421693-9929-1-git-send-email-Li.Xiubo-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
@ 2014-08-19  4:14   ` Xiubo Li
       [not found]     ` <1408421693-9929-2-git-send-email-Li.Xiubo-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
  2014-08-19  4:14   ` [PATCHv2 2/5] ASoC: fsl-esai: " Xiubo Li
                     ` (3 subsequent siblings)
  4 siblings, 1 reply; 21+ messages in thread
From: Xiubo Li @ 2014-08-19  4:14 UTC (permalink / raw)
  To: broonie-DgEjT+Ai2ygdnm+yROfE0A,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw, mark.rutland-5wv7dgnIgG8,
	nicoleotsuka-Re5JQEeQqe8AvxtiuMwx3w, timur-N01EOCouUvQ
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA, Xiubo Li

Signed-off-by: Xiubo Li <Li.Xiubo-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCHv2 2/5] ASoC: fsl-esai: Convert to use regmap framework's endianness method.
       [not found] ` <1408421693-9929-1-git-send-email-Li.Xiubo-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
  2014-08-19  4:14   ` [PATCHv2 1/5] ASoC: fsl-asrc: " Xiubo Li
@ 2014-08-19  4:14   ` Xiubo Li
  2014-08-19  4:14   ` [PATCHv2 3/5] ASoC: fsl-spdif: " Xiubo Li
                     ` (2 subsequent siblings)
  4 siblings, 0 replies; 21+ messages in thread
From: Xiubo Li @ 2014-08-19  4:14 UTC (permalink / raw)
  To: broonie-DgEjT+Ai2ygdnm+yROfE0A,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw, mark.rutland-5wv7dgnIgG8,
	nicoleotsuka-Re5JQEeQqe8AvxtiuMwx3w, timur-N01EOCouUvQ
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA, Xiubo Li

Signed-off-by: Xiubo Li <Li.Xiubo-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCHv2 3/5] ASoC: fsl-spdif: Convert to use regmap framework's endianness method.
       [not found] ` <1408421693-9929-1-git-send-email-Li.Xiubo-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
  2014-08-19  4:14   ` [PATCHv2 1/5] ASoC: fsl-asrc: " Xiubo Li
  2014-08-19  4:14   ` [PATCHv2 2/5] ASoC: fsl-esai: " Xiubo Li
@ 2014-08-19  4:14   ` Xiubo Li
  2014-08-19  4:14   ` [PATCHv2 4/5] ASoC: fsl-sai: " Xiubo Li
  2014-08-19  4:14   ` [PATCHv2 5/5] ASoC: fsl-sai: rename big_endian_data to is_msb_first Xiubo Li
  4 siblings, 0 replies; 21+ messages in thread
From: Xiubo Li @ 2014-08-19  4:14 UTC (permalink / raw)
  To: broonie-DgEjT+Ai2ygdnm+yROfE0A,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw, mark.rutland-5wv7dgnIgG8,
	nicoleotsuka-Re5JQEeQqe8AvxtiuMwx3w, timur-N01EOCouUvQ
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA, Xiubo Li

Signed-off-by: Xiubo Li <Li.Xiubo-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCHv2 4/5] ASoC: fsl-sai: Convert to use regmap framework's endianness method.
       [not found] ` <1408421693-9929-1-git-send-email-Li.Xiubo-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
                     ` (2 preceding siblings ...)
  2014-08-19  4:14   ` [PATCHv2 3/5] ASoC: fsl-spdif: " Xiubo Li
@ 2014-08-19  4:14   ` Xiubo Li
  2014-08-19  4:14   ` [PATCHv2 5/5] ASoC: fsl-sai: rename big_endian_data to is_msb_first Xiubo Li
  4 siblings, 0 replies; 21+ messages in thread
From: Xiubo Li @ 2014-08-19  4:14 UTC (permalink / raw)
  To: broonie-DgEjT+Ai2ygdnm+yROfE0A,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw, mark.rutland-5wv7dgnIgG8,
	nicoleotsuka-Re5JQEeQqe8AvxtiuMwx3w, timur-N01EOCouUvQ
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA, Xiubo Li

Signed-off-by: Xiubo Li <Li.Xiubo-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
---
 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..aed1f21 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 SAI device 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

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCHv2 5/5] ASoC: fsl-sai: rename big_endian_data to is_msb_first.
       [not found] ` <1408421693-9929-1-git-send-email-Li.Xiubo-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
                     ` (3 preceding siblings ...)
  2014-08-19  4:14   ` [PATCHv2 4/5] ASoC: fsl-sai: " Xiubo Li
@ 2014-08-19  4:14   ` Xiubo Li
       [not found]     ` <1408421693-9929-6-git-send-email-Li.Xiubo-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
  2014-08-25  3:18     ` Timur Tabi
  4 siblings, 2 replies; 21+ messages in thread
From: Xiubo Li @ 2014-08-19  4:14 UTC (permalink / raw)
  To: broonie-DgEjT+Ai2ygdnm+yROfE0A,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw, mark.rutland-5wv7dgnIgG8,
	nicoleotsuka-Re5JQEeQqe8AvxtiuMwx3w, timur-N01EOCouUvQ
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA, Xiubo Li

Signed-off-by: Xiubo Li <Li.Xiubo-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
---
 Documentation/devicetree/bindings/sound/fsl-sai.txt | 8 ++++----
 sound/soc/fsl/fsl_sai.c                             | 6 +++---
 sound/soc/fsl/fsl_sai.h                             | 2 +-
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/Documentation/devicetree/bindings/sound/fsl-sai.txt b/Documentation/devicetree/bindings/sound/fsl-sai.txt
index aed1f21..e25ef38 100644
--- a/Documentation/devicetree/bindings/sound/fsl-sai.txt
+++ b/Documentation/devicetree/bindings/sound/fsl-sai.txt
@@ -20,9 +20,9 @@ Required properties:
   See ../pinctrl/pinctrl-bindings.txt for details of the property values.
 - big-endian: Boolean property, required if all the SAI device 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.
+- msb-first: Configures whether the LSB or the MSB is transmitted first for
+  the fifo data. If this property is absent, the LSB is transmitted first as
+  default, or the MSB is transmitted first.
 - fsl,sai-synchronous-rx: This is a boolean property. If present, indicating
   that SAI will work in the synchronous mode (sync Tx with Rx) which means
   both the transimitter and receiver will send and receive data by following
@@ -53,5 +53,5 @@ sai2: sai@40031000 {
 	      dmas = <&edma0 0 VF610_EDMA_MUXID0_SAI2_TX>,
 		   <&edma0 0 VF610_EDMA_MUXID0_SAI2_RX>;
 	      big-endian;
-	      big-endian-data;
+	      msb-first;
 };
diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c
index a6eb784..4e48431 100644
--- a/sound/soc/fsl/fsl_sai.c
+++ b/sound/soc/fsl/fsl_sai.c
@@ -175,7 +175,7 @@ static int fsl_sai_set_dai_fmt_tr(struct snd_soc_dai *cpu_dai,
 	bool tx = fsl_dir == FSL_FMT_TRANSMITTER;
 	u32 val_cr2 = 0, val_cr4 = 0;
 
-	if (!sai->big_endian_data)
+	if (!sai->is_msb_first)
 		val_cr4 |= FSL_SAI_CR4_MF;
 
 	/* DAI mode */
@@ -304,7 +304,7 @@ static int fsl_sai_hw_params(struct snd_pcm_substream *substream,
 	val_cr5 |= FSL_SAI_CR5_WNW(word_width);
 	val_cr5 |= FSL_SAI_CR5_W0W(word_width);
 
-	if (sai->big_endian_data)
+	if (sai->is_msb_first)
 		val_cr5 |= FSL_SAI_CR5_FBT(0);
 	else
 		val_cr5 |= FSL_SAI_CR5_FBT(word_width - 1);
@@ -573,7 +573,7 @@ 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_data = of_property_read_bool(np, "big-endian-data");
+	sai->is_msb_first = of_property_read_bool(np, "msb-first");
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	base = devm_ioremap_resource(&pdev->dev, res);
diff --git a/sound/soc/fsl/fsl_sai.h b/sound/soc/fsl/fsl_sai.h
index 2cded44..7c76e8d 100644
--- a/sound/soc/fsl/fsl_sai.h
+++ b/sound/soc/fsl/fsl_sai.h
@@ -132,7 +132,7 @@ struct fsl_sai {
 	struct clk *bus_clk;
 	struct clk *mclk_clk[FSL_SAI_MCLK_MAX];
 
-	bool big_endian_data;
+	bool is_msb_first;
 	bool is_dsp_mode;
 	bool sai_on_imx;
 	bool synchronous[2];
-- 
1.8.5

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCHv2 1/5] ASoC: fsl-asrc: Convert to use regmap framework's endianness method.
       [not found]     ` <1408421693-9929-2-git-send-email-Li.Xiubo-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
@ 2014-08-25  1:23       ` Nicolin Chen
  2014-08-25  1:44         ` Li.Xiubo-KZfg59tc24xl57MIdRCFDg
  0 siblings, 1 reply; 21+ messages in thread
From: Nicolin Chen @ 2014-08-25  1:23 UTC (permalink / raw)
  To: Xiubo Li
  Cc: broonie-DgEjT+Ai2ygdnm+yROfE0A,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw, mark.rutland-5wv7dgnIgG8,
	timur-N01EOCouUvQ, devicetree-u79uwXL29TY76Z2rM5mHXA

On Tue, Aug 19, 2014 at 12:14:49PM +0800, Xiubo Li wrote:
> Signed-off-by: Xiubo Li <Li.Xiubo-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
> ---
>  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 */
> -	if (of_property_read_bool(np, "big-endian"))
> -		fsl_asrc_regmap_config.val_format_endian = REGMAP_ENDIAN_BIG;
> -

What about the binding document? Could we also update that one
since this 'big-endian' is useless?

Thanks
Nicolin

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* RE: [PATCHv2 1/5] ASoC: fsl-asrc: Convert to use regmap framework's endianness method.
  2014-08-25  1:23       ` Nicolin Chen
@ 2014-08-25  1:44         ` Li.Xiubo-KZfg59tc24xl57MIdRCFDg
       [not found]           ` <ece08117aedf49eabd6660078432ed87-swgC6WJTr6EbUgZD/0KOGpwN6zqB+hSMnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
  0 siblings, 1 reply; 21+ messages in thread
From: Li.Xiubo-KZfg59tc24xl57MIdRCFDg @ 2014-08-25  1:44 UTC (permalink / raw)
  To: Nicolin Chen
  Cc: broonie-DgEjT+Ai2ygdnm+yROfE0A,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw, mark.rutland-5wv7dgnIgG8,
	timur-N01EOCouUvQ, devicetree-u79uwXL29TY76Z2rM5mHXA

Hi,

> Subject: Re: [PATCHv2 1/5] ASoC: fsl-asrc: Convert to use regmap framework's
> endianness method.
> 
> On Tue, Aug 19, 2014 at 12:14:49PM +0800, Xiubo Li wrote:
> > Signed-off-by: Xiubo Li <Li.Xiubo-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
> > ---
> >  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 */
> > -	if (of_property_read_bool(np, "big-endian"))
> > -		fsl_asrc_regmap_config.val_format_endian = REGMAP_ENDIAN_BIG;
> > -
> 
> What about the binding document? Could we also update that one
> since this 'big-endian' is useless?
> 
> Thanks
> Nicolin

No, the 'big-endian' is very useful still, deleting this because we are using
The regmap framework's endianness method instead of its own here.

And the binding document, as we have discussed days ago, no need to update here.


Thanks,

BRs
Xiubo



--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCHv2 5/5] ASoC: fsl-sai: rename big_endian_data to is_msb_first.
       [not found]     ` <1408421693-9929-6-git-send-email-Li.Xiubo-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
@ 2014-08-25  1:50       ` Nicolin Chen
  2014-08-25  2:04         ` Li.Xiubo
  0 siblings, 1 reply; 21+ messages in thread
From: Nicolin Chen @ 2014-08-25  1:50 UTC (permalink / raw)
  To: Xiubo Li
  Cc: broonie-DgEjT+Ai2ygdnm+yROfE0A,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw, mark.rutland-5wv7dgnIgG8,
	timur-N01EOCouUvQ, devicetree-u79uwXL29TY76Z2rM5mHXA

On Tue, Aug 19, 2014 at 12:14:53PM +0800, Xiubo Li wrote:
> Signed-off-by: Xiubo Li <Li.Xiubo-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
> ---
>  Documentation/devicetree/bindings/sound/fsl-sai.txt | 8 ++++----
>  sound/soc/fsl/fsl_sai.c                             | 6 +++---
>  sound/soc/fsl/fsl_sai.h                             | 2 +-
>  3 files changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/sound/fsl-sai.txt b/Documentation/devicetree/bindings/sound/fsl-sai.txt
> index aed1f21..e25ef38 100644
> --- a/Documentation/devicetree/bindings/sound/fsl-sai.txt
> +++ b/Documentation/devicetree/bindings/sound/fsl-sai.txt
> @@ -20,9 +20,9 @@ Required properties:
>    See ../pinctrl/pinctrl-bindings.txt for details of the property values.
>  - big-endian: Boolean property, required if all the SAI device 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.
> +- msb-first: Configures whether the LSB or the MSB is transmitted first for
> +  the fifo data. If this property is absent, the LSB is transmitted first as
> +  default, or the MSB is transmitted first.
>  - fsl,sai-synchronous-rx: This is a boolean property. If present, indicating
>    that SAI will work in the synchronous mode (sync Tx with Rx) which means
>    both the transimitter and receiver will send and receive data by following
> @@ -53,5 +53,5 @@ sai2: sai@40031000 {
>  	      dmas = <&edma0 0 VF610_EDMA_MUXID0_SAI2_TX>,
>  		   <&edma0 0 VF610_EDMA_MUXID0_SAI2_RX>;
>  	      big-endian;
> -	      big-endian-data;
> +	      msb-first;
>  };
> diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c
> index a6eb784..4e48431 100644
> --- a/sound/soc/fsl/fsl_sai.c
> +++ b/sound/soc/fsl/fsl_sai.c
> @@ -175,7 +175,7 @@ static int fsl_sai_set_dai_fmt_tr(struct snd_soc_dai *cpu_dai,
>  	bool tx = fsl_dir == FSL_FMT_TRANSMITTER;
>  	u32 val_cr2 = 0, val_cr4 = 0;
>  
> -	if (!sai->big_endian_data)
> +	if (!sai->is_msb_first)
>  		val_cr4 |= FSL_SAI_CR4_MF;

IIRC, MF stands for 'MSB First' but the condition is !is_msb_first..

And also we can't not simply inverse the condition here since those
platforms without the original 'big_endian_data' property will be
broken unless they add the new 'is_msb_first' into the DT bindings,
which is, however, a violation due to breaking the old bindings.

So I guess is_lsb_first might be better here?

And actually, Xiubo, what's your purpose to add this patch? I can't
see any commit comments to explain the reason. So could you please
say something about it?

Thanks
Nicolin
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCHv2 5/5] ASoC: fsl-sai: rename big_endian_data to is_msb_first.
  2014-08-25  1:50       ` Nicolin Chen
@ 2014-08-25  2:04         ` Li.Xiubo
       [not found]           ` <b938ef9cd0df48e985a91c931f6052e6-swgC6WJTr6EbUgZD/0KOGpwN6zqB+hSMnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
  0 siblings, 1 reply; 21+ messages in thread
From: Li.Xiubo @ 2014-08-25  2:04 UTC (permalink / raw)
  To: Nicolin Chen; +Cc: mark.rutland, devicetree, alsa-devel, broonie, timur

> -----Original Message-----
> From: Nicolin Chen [mailto:nicoleotsuka@gmail.com]
> Sent: Monday, August 25, 2014 9:51 AM
> To: Xiubo Li-B47053
> Cc: broonie@kernel.org; alsa-devel@alsa-project.org; mark.rutland@arm.com;
> timur@tabi.org; devicetree@vger.kernel.org
> Subject: Re: [PATCHv2 5/5] ASoC: fsl-sai: rename big_endian_data to
> is_msb_first.
> 
> On Tue, Aug 19, 2014 at 12:14:53PM +0800, Xiubo Li wrote:
> > Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
> > ---
> >  Documentation/devicetree/bindings/sound/fsl-sai.txt | 8 ++++----
> >  sound/soc/fsl/fsl_sai.c                             | 6 +++---
> >  sound/soc/fsl/fsl_sai.h                             | 2 +-
> >  3 files changed, 8 insertions(+), 8 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/sound/fsl-sai.txt
> b/Documentation/devicetree/bindings/sound/fsl-sai.txt
> > index aed1f21..e25ef38 100644
> > --- a/Documentation/devicetree/bindings/sound/fsl-sai.txt
> > +++ b/Documentation/devicetree/bindings/sound/fsl-sai.txt
> > @@ -20,9 +20,9 @@ Required properties:
> >    See ../pinctrl/pinctrl-bindings.txt for details of the property values.
> >  - big-endian: Boolean property, required if all the SAI device 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.
> > +- msb-first: Configures whether the LSB or the MSB is transmitted first for
> > +  the fifo data. If this property is absent, the LSB is transmitted first
> as
> > +  default, or the MSB is transmitted first.
> >  - fsl,sai-synchronous-rx: This is a boolean property. If present,
> indicating
> >    that SAI will work in the synchronous mode (sync Tx with Rx) which means
> >    both the transimitter and receiver will send and receive data by
> following
> > @@ -53,5 +53,5 @@ sai2: sai@40031000 {
> >  	      dmas = <&edma0 0 VF610_EDMA_MUXID0_SAI2_TX>,
> >  		   <&edma0 0 VF610_EDMA_MUXID0_SAI2_RX>;
> >  	      big-endian;
> > -	      big-endian-data;
> > +	      msb-first;
> >  };
> > diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c
> > index a6eb784..4e48431 100644
> > --- a/sound/soc/fsl/fsl_sai.c
> > +++ b/sound/soc/fsl/fsl_sai.c
> > @@ -175,7 +175,7 @@ static int fsl_sai_set_dai_fmt_tr(struct snd_soc_dai
> *cpu_dai,
> >  	bool tx = fsl_dir == FSL_FMT_TRANSMITTER;
> >  	u32 val_cr2 = 0, val_cr4 = 0;
> >
> > -	if (!sai->big_endian_data)
> > +	if (!sai->is_msb_first)
> >  		val_cr4 |= FSL_SAI_CR4_MF;
> 
> IIRC, MF stands for 'MSB First' but the condition is !is_msb_first..
> 

Yes, I will fix this.

> And also we can't not simply inverse the condition here since those
> platforms without the original 'big_endian_data' property will be
> broken unless they add the new 'is_msb_first' into the DT bindings,
> which is, however, a violation due to breaking the old bindings.
> 
> So I guess is_lsb_first might be better here?
>
> And actually, Xiubo, what's your purpose to add this patch? I can't
> see any commit comments to explain the reason. So could you please
> say something about it?
> 
> Thanks
> Nicolin

Months ago, the hardware team needed to do some IP test based LS1 needing
this to be added to the driver. And for now there is hasn't any other reason
for this yet.


Thanks,

BRs
Xiubo

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

* Re: [PATCHv2 1/5] ASoC: fsl-asrc: Convert to use regmap framework's endianness method.
       [not found]           ` <ece08117aedf49eabd6660078432ed87-swgC6WJTr6EbUgZD/0KOGpwN6zqB+hSMnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
@ 2014-08-25  2:13             ` Nicolin Chen
  2014-08-25  2:29               ` Li.Xiubo-KZfg59tc24xl57MIdRCFDg
  0 siblings, 1 reply; 21+ messages in thread
From: Nicolin Chen @ 2014-08-25  2:13 UTC (permalink / raw)
  To: Li.Xiubo-KZfg59tc24xl57MIdRCFDg
  Cc: broonie-DgEjT+Ai2ygdnm+yROfE0A,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw, mark.rutland-5wv7dgnIgG8,
	timur-N01EOCouUvQ, devicetree-u79uwXL29TY76Z2rM5mHXA

On Mon, Aug 25, 2014 at 01:44:41AM +0000, Li.Xiubo-KZfg59tc24xl57MIdRCFDg@public.gmane.org wrote:
> Hi,
> 
> > Subject: Re: [PATCHv2 1/5] ASoC: fsl-asrc: Convert to use regmap framework's
> > endianness method.
> > 
> > On Tue, Aug 19, 2014 at 12:14:49PM +0800, Xiubo Li wrote:
> > > Signed-off-by: Xiubo Li <Li.Xiubo-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
> > > ---
> > >  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 */
> > > -	if (of_property_read_bool(np, "big-endian"))
> > > -		fsl_asrc_regmap_config.val_format_endian = REGMAP_ENDIAN_BIG;
> > > -
> > 
> > What about the binding document? Could we also update that one
> > since this 'big-endian' is useless?
> > 
> > Thanks
> > Nicolin
> 
> No, the 'big-endian' is very useful still, deleting this because we are using
> The regmap framework's endianness method instead of its own here.
> 
> And the binding document, as we have discussed days ago, no need to update here.

Okay.. I think I've missed some topic here.

Thanks,
Nicolin
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* RE: [PATCHv2 1/5] ASoC: fsl-asrc: Convert to use regmap framework's endianness method.
  2014-08-25  2:13             ` Nicolin Chen
@ 2014-08-25  2:29               ` Li.Xiubo-KZfg59tc24xl57MIdRCFDg
       [not found]                 ` <12fb3eca298842929a782e80a9cf6fbc-swgC6WJTr6EbUgZD/0KOGpwN6zqB+hSMnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
  0 siblings, 1 reply; 21+ messages in thread
From: Li.Xiubo-KZfg59tc24xl57MIdRCFDg @ 2014-08-25  2:29 UTC (permalink / raw)
  To: Nicolin Chen
  Cc: broonie-DgEjT+Ai2ygdnm+yROfE0A,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw, mark.rutland-5wv7dgnIgG8,
	timur-N01EOCouUvQ, devicetree-u79uwXL29TY76Z2rM5mHXA

Hi Nicolin,

> > > > 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 */
> > > > -	if (of_property_read_bool(np, "big-endian"))
> > > > -		fsl_asrc_regmap_config.val_format_endian =
> REGMAP_ENDIAN_BIG;
> > > > -
> > >
> > > What about the binding document? Could we also update that one
> > > since this 'big-endian' is useless?
> > >
> > > Thanks
> > > Nicolin
> >
> > No, the 'big-endian' is very useful still, deleting this because we are
> using
> > The regmap framework's endianness method instead of its own here.
> >
> > And the binding document, as we have discussed days ago, no need to update
> here.
> 
> Okay.. I think I've missed some topic here.
> 

Please refer to the following patches about this:

regmap: add DT endianness binding support.
regmap: Add the DT binding documentation for endianness
And also two of other patches to fix some bugs of these.

Thanks,

BRs
Xiubo

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCHv2 5/5] ASoC: fsl-sai: rename big_endian_data to is_msb_first.
       [not found]           ` <b938ef9cd0df48e985a91c931f6052e6-swgC6WJTr6EbUgZD/0KOGpwN6zqB+hSMnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
@ 2014-08-25  2:43             ` Nicolin Chen
  2014-08-25  3:11               ` Li.Xiubo-KZfg59tc24xl57MIdRCFDg
  0 siblings, 1 reply; 21+ messages in thread
From: Nicolin Chen @ 2014-08-25  2:43 UTC (permalink / raw)
  To: Li.Xiubo-KZfg59tc24xl57MIdRCFDg
  Cc: broonie-DgEjT+Ai2ygdnm+yROfE0A,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw, mark.rutland-5wv7dgnIgG8,
	timur-N01EOCouUvQ, devicetree-u79uwXL29TY76Z2rM5mHXA

On Mon, Aug 25, 2014 at 02:04:46AM +0000, Li.Xiubo-KZfg59tc24xl57MIdRCFDg@public.gmane.org wrote:
> > -----Original Message-----
> > From: Nicolin Chen [mailto:nicoleotsuka-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org]
> > Sent: Monday, August 25, 2014 9:51 AM
> > To: Xiubo Li-B47053
> > Cc: broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org; alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org; mark.rutland-5wv7dgnIgG8@public.gmane.org;
> > timur-N01EOCouUvQ@public.gmane.org; devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> > Subject: Re: [PATCHv2 5/5] ASoC: fsl-sai: rename big_endian_data to
> > is_msb_first.
> > 
> > On Tue, Aug 19, 2014 at 12:14:53PM +0800, Xiubo Li wrote:
> > > Signed-off-by: Xiubo Li <Li.Xiubo-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
> > > ---
> > >  Documentation/devicetree/bindings/sound/fsl-sai.txt | 8 ++++----
> > >  sound/soc/fsl/fsl_sai.c                             | 6 +++---
> > >  sound/soc/fsl/fsl_sai.h                             | 2 +-
> > >  3 files changed, 8 insertions(+), 8 deletions(-)
> > >
> > > diff --git a/Documentation/devicetree/bindings/sound/fsl-sai.txt
> > b/Documentation/devicetree/bindings/sound/fsl-sai.txt
> > > index aed1f21..e25ef38 100644
> > > --- a/Documentation/devicetree/bindings/sound/fsl-sai.txt
> > > +++ b/Documentation/devicetree/bindings/sound/fsl-sai.txt
> > > @@ -20,9 +20,9 @@ Required properties:
> > >    See ../pinctrl/pinctrl-bindings.txt for details of the property values.
> > >  - big-endian: Boolean property, required if all the SAI device 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.
> > > +- msb-first: Configures whether the LSB or the MSB is transmitted first for
> > > +  the fifo data. If this property is absent, the LSB is transmitted first
> > as
> > > +  default, or the MSB is transmitted first.
> > >  - fsl,sai-synchronous-rx: This is a boolean property. If present,
> > indicating
> > >    that SAI will work in the synchronous mode (sync Tx with Rx) which means
> > >    both the transimitter and receiver will send and receive data by
> > following
> > > @@ -53,5 +53,5 @@ sai2: sai@40031000 {
> > >  	      dmas = <&edma0 0 VF610_EDMA_MUXID0_SAI2_TX>,
> > >  		   <&edma0 0 VF610_EDMA_MUXID0_SAI2_RX>;
> > >  	      big-endian;
> > > -	      big-endian-data;
> > > +	      msb-first;
> > >  };
> > > diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c
> > > index a6eb784..4e48431 100644
> > > --- a/sound/soc/fsl/fsl_sai.c
> > > +++ b/sound/soc/fsl/fsl_sai.c
> > > @@ -175,7 +175,7 @@ static int fsl_sai_set_dai_fmt_tr(struct snd_soc_dai
> > *cpu_dai,
> > >  	bool tx = fsl_dir == FSL_FMT_TRANSMITTER;
> > >  	u32 val_cr2 = 0, val_cr4 = 0;
> > >
> > > -	if (!sai->big_endian_data)
> > > +	if (!sai->is_msb_first)
> > >  		val_cr4 |= FSL_SAI_CR4_MF;
> > 
> > IIRC, MF stands for 'MSB First' but the condition is !is_msb_first..
> > 
> 
> Yes, I will fix this.
> 
> > And also we can't not simply inverse the condition here since those
> > platforms without the original 'big_endian_data' property will be
> > broken unless they add the new 'is_msb_first' into the DT bindings,
> > which is, however, a violation due to breaking the old bindings.
> > 
> > So I guess is_lsb_first might be better here?
> >
> > And actually, Xiubo, what's your purpose to add this patch? I can't
> > see any commit comments to explain the reason. So could you please
> > say something about it?
> 
> Months ago, the hardware team needed to do some IP test based LS1 needing
> this to be added to the driver. And for now there is hasn't any other reason
> for this yet.
 
Hmm...the patch only renames big_endian_data to is_msb_first.

So whatever the problem of LS1 is, this change doesn't matter to LS1
at all unless LS1 has a specific property in its DT binding: If using
is_msb_first works for LS1, using big_endian_data without applying
this patch does work as well, doesn't it?

I think this patch is more likely making the binding explicit so that
any platform like LS1 will not miss the essential property. Then the
commit comments could have mentioned it if so.

I'm looking forward to your new version. And I give you an extra info
about SAI on i.MX. It should be configured as Little Endian and MSB
first. So with the current DT binding it doesn't have big_endian*
properties. Any replacement for big_endian_data shall be compatible
to this case as well as I mentioned in the previous reply.

Thank you,
Nicolin
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCHv2 1/5] ASoC: fsl-asrc: Convert to use regmap framework's endianness method.
       [not found]                 ` <12fb3eca298842929a782e80a9cf6fbc-swgC6WJTr6EbUgZD/0KOGpwN6zqB+hSMnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
@ 2014-08-25  2:48                   ` Nicolin Chen
  0 siblings, 0 replies; 21+ messages in thread
From: Nicolin Chen @ 2014-08-25  2:48 UTC (permalink / raw)
  To: Li.Xiubo-KZfg59tc24xl57MIdRCFDg
  Cc: broonie-DgEjT+Ai2ygdnm+yROfE0A,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw, mark.rutland-5wv7dgnIgG8,
	timur-N01EOCouUvQ, devicetree-u79uwXL29TY76Z2rM5mHXA

On Mon, Aug 25, 2014 at 02:29:32AM +0000, Li.Xiubo-KZfg59tc24xl57MIdRCFDg@public.gmane.org wrote:
> > > No, the 'big-endian' is very useful still, deleting this because we are
> > using
> > > The regmap framework's endianness method instead of its own here.
> > >
> > > And the binding document, as we have discussed days ago, no need to update
> > here.
> > 
> > Okay.. I think I've missed some topic here.
> > 
> 
> Please refer to the following patches about this:
> 
> regmap: add DT endianness binding support.
> regmap: Add the DT binding documentation for endianness
> And also two of other patches to fix some bugs of these.
> 

Great. Thank you :)
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* RE: [PATCHv2 5/5] ASoC: fsl-sai: rename big_endian_data to is_msb_first.
  2014-08-25  2:43             ` Nicolin Chen
@ 2014-08-25  3:11               ` Li.Xiubo-KZfg59tc24xl57MIdRCFDg
       [not found]                 ` <21764759b9c447c7a3c6158e3bcfb3e6-swgC6WJTr6EbUgZD/0KOGpwN6zqB+hSMnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
  0 siblings, 1 reply; 21+ messages in thread
From: Li.Xiubo-KZfg59tc24xl57MIdRCFDg @ 2014-08-25  3:11 UTC (permalink / raw)
  To: Nicolin Chen
  Cc: broonie-DgEjT+Ai2ygdnm+yROfE0A,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw, mark.rutland-5wv7dgnIgG8,
	timur-N01EOCouUvQ, devicetree-u79uwXL29TY76Z2rM5mHXA


> > > > diff --git a/Documentation/devicetree/bindings/sound/fsl-sai.txt
> > > b/Documentation/devicetree/bindings/sound/fsl-sai.txt
> > > > index aed1f21..e25ef38 100644
> > > > --- a/Documentation/devicetree/bindings/sound/fsl-sai.txt
> > > > +++ b/Documentation/devicetree/bindings/sound/fsl-sai.txt
> > > > @@ -20,9 +20,9 @@ Required properties:
> > > >    See ../pinctrl/pinctrl-bindings.txt for details of the property
> values.
> > > >  - big-endian: Boolean property, required if all the SAI device
> 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.
> > > > +- msb-first: Configures whether the LSB or the MSB is transmitted first
> for
> > > > +  the fifo data. If this property is absent, the LSB is transmitted
> first
> > > as
> > > > +  default, or the MSB is transmitted first.
> > > >  - fsl,sai-synchronous-rx: This is a boolean property. If present,
> > > indicating
> > > >    that SAI will work in the synchronous mode (sync Tx with Rx) which
> means
> > > >    both the transimitter and receiver will send and receive data by
> > > following
> > > > @@ -53,5 +53,5 @@ sai2: sai@40031000 {
> > > >  	      dmas = <&edma0 0 VF610_EDMA_MUXID0_SAI2_TX>,
> > > >  		   <&edma0 0 VF610_EDMA_MUXID0_SAI2_RX>;
> > > >  	      big-endian;
> > > > -	      big-endian-data;
> > > > +	      msb-first;
> > > >  };
> > > > diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c
> > > > index a6eb784..4e48431 100644
> > > > --- a/sound/soc/fsl/fsl_sai.c
> > > > +++ b/sound/soc/fsl/fsl_sai.c
> > > > @@ -175,7 +175,7 @@ static int fsl_sai_set_dai_fmt_tr(struct snd_soc_dai
> > > *cpu_dai,
> > > >  	bool tx = fsl_dir == FSL_FMT_TRANSMITTER;
> > > >  	u32 val_cr2 = 0, val_cr4 = 0;
> > > >
> > > > -	if (!sai->big_endian_data)
> > > > +	if (!sai->is_msb_first)
> > > >  		val_cr4 |= FSL_SAI_CR4_MF;
> > >
> > > IIRC, MF stands for 'MSB First' but the condition is !is_msb_first..
> > >
> >
> > Yes, I will fix this.
> >
> > > And also we can't not simply inverse the condition here since those
> > > platforms without the original 'big_endian_data' property will be
> > > broken unless they add the new 'is_msb_first' into the DT bindings,
> > > which is, however, a violation due to breaking the old bindings.
> > >
> > > So I guess is_lsb_first might be better here?
> > >
> > > And actually, Xiubo, what's your purpose to add this patch? I can't
> > > see any commit comments to explain the reason. So could you please
> > > say something about it?
> >
> > Months ago, the hardware team needed to do some IP test based LS1 needing
> > this to be added to the driver. And for now there is hasn't any other reason
> > for this yet.
> 
> Hmm...the patch only renames big_endian_data to is_msb_first.
> 
> So whatever the problem of LS1 is, this change doesn't matter to LS1
> at all unless LS1 has a specific property in its DT binding: If using
> is_msb_first works for LS1, using big_endian_data without applying
> this patch does work as well, doesn't it?
>

Yes.

 
> I think this patch is more likely making the binding explicit so that
> any platform like LS1 will not miss the essential property. Then the
> commit comments could have mentioned it if so.
> 
> I'm looking forward to your new version. And I give you an extra info
> about SAI on i.MX. It should be configured as Little Endian and MSB
> first. So with the current DT binding it doesn't have big_endian*
> properties. Any replacement for big_endian_data shall be compatible
> to this case as well as I mentioned in the previous reply.
> 

Fine.

Please wait.

BYW, how about other four patches of this patch series ? Do you have any 
Comment here ? 

BRs
Xiubo

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCHv2 5/5] ASoC: fsl-sai: rename big_endian_data to is_msb_first.
       [not found]                 ` <21764759b9c447c7a3c6158e3bcfb3e6-swgC6WJTr6EbUgZD/0KOGpwN6zqB+hSMnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
@ 2014-08-25  3:18                   ` Nicolin Chen
  2014-08-25  3:27                     ` Li.Xiubo-KZfg59tc24xl57MIdRCFDg
  0 siblings, 1 reply; 21+ messages in thread
From: Nicolin Chen @ 2014-08-25  3:18 UTC (permalink / raw)
  To: Li.Xiubo-KZfg59tc24xl57MIdRCFDg
  Cc: broonie-DgEjT+Ai2ygdnm+yROfE0A,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw, mark.rutland-5wv7dgnIgG8,
	timur-N01EOCouUvQ, devicetree-u79uwXL29TY76Z2rM5mHXA

On Mon, Aug 25, 2014 at 03:11:22AM +0000, Li.Xiubo-KZfg59tc24xl57MIdRCFDg@public.gmane.org wrote:
> > I'm looking forward to your new version. And I give you an extra info
> > about SAI on i.MX. It should be configured as Little Endian and MSB
> > first. So with the current DT binding it doesn't have big_endian*
> > properties. Any replacement for big_endian_data shall be compatible
> > to this case as well as I mentioned in the previous reply.
> > 
> 
> Fine.
> 
> Please wait.
> 
> BYW, how about other four patches of this patch series ? Do you have any 
> Comment here ? 

Not any more. I think you can drop this one from this series
so that the other four can be applied soon :)

Best regards,
Nicolin
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCHv2 5/5] ASoC: fsl-sai: rename big_endian_data to is_msb_first.
  2014-08-19  4:14   ` [PATCHv2 5/5] ASoC: fsl-sai: rename big_endian_data to is_msb_first Xiubo Li
       [not found]     ` <1408421693-9929-6-git-send-email-Li.Xiubo-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
@ 2014-08-25  3:18     ` Timur Tabi
  2014-08-25  3:22       ` Li.Xiubo
       [not found]       ` <53FAAB0D.2000403-N01EOCouUvQ@public.gmane.org>
  1 sibling, 2 replies; 21+ messages in thread
From: Timur Tabi @ 2014-08-25  3:18 UTC (permalink / raw)
  To: Xiubo Li, broonie, alsa-devel, mark.rutland, nicoleotsuka; +Cc: devicetree

Xiubo Li wrote:
> -	sai->big_endian_data = of_property_read_bool(np, "big-endian-data");
> +	sai->is_msb_first = of_property_read_bool(np, "msb-first");

This will break backwards compatibility with older device trees.

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

* Re: [PATCHv2 5/5] ASoC: fsl-sai: rename big_endian_data to is_msb_first.
  2014-08-25  3:18     ` Timur Tabi
@ 2014-08-25  3:22       ` Li.Xiubo
       [not found]       ` <53FAAB0D.2000403-N01EOCouUvQ@public.gmane.org>
  1 sibling, 0 replies; 21+ messages in thread
From: Li.Xiubo @ 2014-08-25  3:22 UTC (permalink / raw)
  To: Timur Tabi, broonie, alsa-devel, mark.rutland, nicoleotsuka; +Cc: devicetree

> -----Original Message-----
> From: Timur Tabi [mailto:timur@tabi.org]
> Sent: Monday, August 25, 2014 11:19 AM
> To: Xiubo Li-B47053; broonie@kernel.org; alsa-devel@alsa-project.org;
> mark.rutland@arm.com; nicoleotsuka@gmail.com
> Cc: devicetree@vger.kernel.org
> Subject: Re: [PATCHv2 5/5] ASoC: fsl-sai: rename big_endian_data to
> is_msb_first.
> 
> Xiubo Li wrote:
> > -	sai->big_endian_data = of_property_read_bool(np, "big-endian-data");
> > +	sai->is_msb_first = of_property_read_bool(np, "msb-first");
> 
> This will break backwards compatibility with older device trees.
>

Well, this hasn't been used for any other SoCs expect the LS1+, which are
still doing the Upstream.

Thanks,

BRs
Xiubo

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

* Re: [PATCHv2 5/5] ASoC: fsl-sai: rename big_endian_data to is_msb_first.
       [not found]       ` <53FAAB0D.2000403-N01EOCouUvQ@public.gmane.org>
@ 2014-08-25  3:22         ` Nicolin Chen
  2014-08-25  3:27           ` Li.Xiubo-KZfg59tc24xl57MIdRCFDg
  0 siblings, 1 reply; 21+ messages in thread
From: Nicolin Chen @ 2014-08-25  3:22 UTC (permalink / raw)
  To: Timur Tabi, Xiubo Li
  Cc: broonie-DgEjT+Ai2ygdnm+yROfE0A,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw, mark.rutland-5wv7dgnIgG8,
	devicetree-u79uwXL29TY76Z2rM5mHXA

On Sun, Aug 24, 2014 at 10:18:37PM -0500, Timur Tabi wrote:
> Xiubo Li wrote:
> >-	sai->big_endian_data = of_property_read_bool(np, "big-endian-data");
> >+	sai->is_msb_first = of_property_read_bool(np, "msb-first");
> 
> This will break backwards compatibility with older device trees.

Yes.

Xiubo, you can try to fetch "big-endian-data" first. Then fetch
the new binding if the "big-endian-data" is absent. Just make
it compatible with both older device trees and the new one.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* RE: [PATCHv2 5/5] ASoC: fsl-sai: rename big_endian_data to is_msb_first.
  2014-08-25  3:22         ` Nicolin Chen
@ 2014-08-25  3:27           ` Li.Xiubo-KZfg59tc24xl57MIdRCFDg
  0 siblings, 0 replies; 21+ messages in thread
From: Li.Xiubo-KZfg59tc24xl57MIdRCFDg @ 2014-08-25  3:27 UTC (permalink / raw)
  To: Nicolin Chen, Timur Tabi
  Cc: broonie-DgEjT+Ai2ygdnm+yROfE0A,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw, mark.rutland-5wv7dgnIgG8,
	devicetree-u79uwXL29TY76Z2rM5mHXA

> On Sun, Aug 24, 2014 at 10:18:37PM -0500, Timur Tabi wrote:
> > Xiubo Li wrote:
> > >-	sai->big_endian_data = of_property_read_bool(np, "big-endian-data");
> > >+	sai->is_msb_first = of_property_read_bool(np, "msb-first");
> >
> > This will break backwards compatibility with older device trees.
> 
> Yes.
> 
> Xiubo, you can try to fetch "big-endian-data" first. Then fetch
> the new binding if the "big-endian-data" is absent. Just make
> it compatible with both older device trees and the new one.
>

@ Nicolin, Timur,

Okay, if there has any other SoCs using this, I will modify them together.

Thanks,

BRs
Xiubo
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* RE: [PATCHv2 5/5] ASoC: fsl-sai: rename big_endian_data to is_msb_first.
  2014-08-25  3:18                   ` Nicolin Chen
@ 2014-08-25  3:27                     ` Li.Xiubo-KZfg59tc24xl57MIdRCFDg
  0 siblings, 0 replies; 21+ messages in thread
From: Li.Xiubo-KZfg59tc24xl57MIdRCFDg @ 2014-08-25  3:27 UTC (permalink / raw)
  To: Nicolin Chen
  Cc: broonie-DgEjT+Ai2ygdnm+yROfE0A,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw, mark.rutland-5wv7dgnIgG8,
	timur-N01EOCouUvQ, devicetree-u79uwXL29TY76Z2rM5mHXA

> On Mon, Aug 25, 2014 at 03:11:22AM +0000, Li.Xiubo-KZfg59tc24xl57MIdRCFDg@public.gmane.org wrote:
> > > I'm looking forward to your new version. And I give you an extra info
> > > about SAI on i.MX. It should be configured as Little Endian and MSB
> > > first. So with the current DT binding it doesn't have big_endian*
> > > properties. Any replacement for big_endian_data shall be compatible
> > > to this case as well as I mentioned in the previous reply.
> > >
> >
> > Fine.
> >
> > Please wait.
> >
> > BYW, how about other four patches of this patch series ? Do you have any
> > Comment here ?
> 
> Not any more. I think you can drop this one from this series
> so that the other four can be applied soon :)
> 

Sure, I will send them out separately.

Please help me review them.

Thanks,

BRs
Xiubo


--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

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

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-19  4:14 [PATCHv2 0/5] Convert to use regmap framework's endianness method Xiubo Li
     [not found] ` <1408421693-9929-1-git-send-email-Li.Xiubo-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2014-08-19  4:14   ` [PATCHv2 1/5] ASoC: fsl-asrc: " Xiubo Li
     [not found]     ` <1408421693-9929-2-git-send-email-Li.Xiubo-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2014-08-25  1:23       ` Nicolin Chen
2014-08-25  1:44         ` Li.Xiubo-KZfg59tc24xl57MIdRCFDg
     [not found]           ` <ece08117aedf49eabd6660078432ed87-swgC6WJTr6EbUgZD/0KOGpwN6zqB+hSMnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
2014-08-25  2:13             ` Nicolin Chen
2014-08-25  2:29               ` Li.Xiubo-KZfg59tc24xl57MIdRCFDg
     [not found]                 ` <12fb3eca298842929a782e80a9cf6fbc-swgC6WJTr6EbUgZD/0KOGpwN6zqB+hSMnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
2014-08-25  2:48                   ` Nicolin Chen
2014-08-19  4:14   ` [PATCHv2 2/5] ASoC: fsl-esai: " Xiubo Li
2014-08-19  4:14   ` [PATCHv2 3/5] ASoC: fsl-spdif: " Xiubo Li
2014-08-19  4:14   ` [PATCHv2 4/5] ASoC: fsl-sai: " Xiubo Li
2014-08-19  4:14   ` [PATCHv2 5/5] ASoC: fsl-sai: rename big_endian_data to is_msb_first Xiubo Li
     [not found]     ` <1408421693-9929-6-git-send-email-Li.Xiubo-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2014-08-25  1:50       ` Nicolin Chen
2014-08-25  2:04         ` Li.Xiubo
     [not found]           ` <b938ef9cd0df48e985a91c931f6052e6-swgC6WJTr6EbUgZD/0KOGpwN6zqB+hSMnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
2014-08-25  2:43             ` Nicolin Chen
2014-08-25  3:11               ` Li.Xiubo-KZfg59tc24xl57MIdRCFDg
     [not found]                 ` <21764759b9c447c7a3c6158e3bcfb3e6-swgC6WJTr6EbUgZD/0KOGpwN6zqB+hSMnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
2014-08-25  3:18                   ` Nicolin Chen
2014-08-25  3:27                     ` Li.Xiubo-KZfg59tc24xl57MIdRCFDg
2014-08-25  3:18     ` Timur Tabi
2014-08-25  3:22       ` Li.Xiubo
     [not found]       ` <53FAAB0D.2000403-N01EOCouUvQ@public.gmane.org>
2014-08-25  3:22         ` Nicolin Chen
2014-08-25  3:27           ` Li.Xiubo-KZfg59tc24xl57MIdRCFDg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.