diff mbox

[v3,2/3] ASoC: zx-i2s: introduce pclk for zx2967 family

Message ID 1486522955-14528-2-git-send-email-baoyou.xie@linaro.org (mailing list archive)
State New, archived
Headers show

Commit Message

Baoyou Xie Feb. 8, 2017, 3:02 a.m. UTC
ZTE's zx2967 I2S controller driver introduces pclk, this
patch documents this fact.

Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
---
 Documentation/devicetree/bindings/sound/zte,zx-i2s.txt | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

Comments

Rob Herring Feb. 9, 2017, 12:52 a.m. UTC | #1
On Wed, Feb 08, 2017 at 11:02:34AM +0800, Baoyou Xie wrote:
> ZTE's zx2967 I2S controller driver introduces pclk, this
> patch documents this fact.

Now we have the same subject for patches 2 and 3.

Personally, I'd prefer "dt-bindings: sound: blah...", but not enough to 
argue with Mark about it. If that is not the prefix, then it should at 
least have "binding" in the subject.

> Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
> ---
>  Documentation/devicetree/bindings/sound/zte,zx-i2s.txt | 12 ++++++++----
>  1 file changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/sound/zte,zx-i2s.txt b/Documentation/devicetree/bindings/sound/zte,zx-i2s.txt
> index 7e5aa6f..77390c0 100644
> --- a/Documentation/devicetree/bindings/sound/zte,zx-i2s.txt
> +++ b/Documentation/devicetree/bindings/sound/zte,zx-i2s.txt
> @@ -4,7 +4,7 @@ Required properties:
>   - compatible : Must be "zte,zx296702-i2s"
>   - reg : Must contain I2S core's registers location and length
>   - clocks : Pairs of phandle and specifier referencing the controller's clocks.
> - - clock-names: "tx" for the clock to the I2S interface.
> + - clock-names: "wclk" for the wclk, "pclk" for the pclk to the I2S interface.
>   - dmas: Pairs of phandle and specifier for the DMA channel that is used by
>     the core. The core expects two dma channels for transmit.
>   - dma-names : Must be "tx" and "rx"
> @@ -15,13 +15,17 @@ please check:
>  	* clock/clock-bindings.txt
>  	* dma/dma.txt
>  
> +Please note that ZTE ZX296702 I2S controller driver is compatible for zx296702
> +and zx296718, so compatible string might be set as follow:
> +	"zte,zx296718-i2s", "zte,zx296702-i2s"

Drop this and just make compatible doc above like this:

   - compatible : Must be one of:
	"zte,zx296718-i2s", "zte,zx296702-i2s"
	"zte,zx296702-i2s"

> +
>  Example:
>  	i2s0: i2s0@0b005000 {

BTW, this should be "i2s@0b005000". No trailing 0 on i2s and no leading 
0 on unit-address.

>  		#sound-dai-cells = <0>;
> -		compatible = "zte,zx296702-i2s";
> +		compatible = "zte,zx296718-i2s", "zte,zx296702-i2s";
>  		reg = <0x0b005000 0x1000>;
> -		clocks = <&lsp0clk ZX296702_I2S0_DIV>;
> -		clock-names = "tx";
> +		clocks = <&audiocrm AUDIO_I2S0_WCLK>, <&audiocrm AUDIO_I2S0_PCLK>;
> +		clock-names = "wclk", "pclk";
>  		interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>;
>  		dmas = <&dma 5>, <&dma 6>;
>  		dma-names = "tx", "rx";
> -- 
> 2.7.4
>
Shawn Guo Feb. 9, 2017, 1:48 a.m. UTC | #2
On Wed, Feb 08, 2017 at 06:52:07PM -0600, Rob Herring wrote:
> On Wed, Feb 08, 2017 at 11:02:34AM +0800, Baoyou Xie wrote:
> > ZTE's zx2967 I2S controller driver introduces pclk, this
> > patch documents this fact.
> 
> Now we have the same subject for patches 2 and 3.
> 
> Personally, I'd prefer "dt-bindings: sound: blah...", but not enough to 
> argue with Mark about it. If that is not the prefix, then it should at 
> least have "binding" in the subject.

+1

The prefix of sound bindings is quite unique from other subsystems.
Looking at the prefix of Documentation/devicetree/bindings/sound/
commits, I'm always confused whether it's a pure binding commit
or just submitted as part of the driver patch.  I feel that we
kinda lose the point of having a prefix.

Just my 2 cents.

Shawn
Mark Brown Feb. 9, 2017, 12:06 p.m. UTC | #3
On Thu, Feb 09, 2017 at 09:48:09AM +0800, Shawn Guo wrote:
> On Wed, Feb 08, 2017 at 06:52:07PM -0600, Rob Herring wrote:

> > Personally, I'd prefer "dt-bindings: sound: blah...", but not enough to 
> > argue with Mark about it. If that is not the prefix, then it should at 
> > least have "binding" in the subject.

> +1

> The prefix of sound bindings is quite unique from other subsystems.
> Looking at the prefix of Documentation/devicetree/bindings/sound/
> commits, I'm always confused whether it's a pure binding commit
> or just submitted as part of the driver patch.  I feel that we
> kinda lose the point of having a prefix.

That's really not what's happening reliably - other subsystems also seem
to have a bunch of things prefixed for the subsystem and the DT specific
prefixes are all over the shop, people seem to be making them up at
random.  If DT binding review were something that reliably and
consistently happened and didn't affect the subsystem I'd perhaps buy it
but for run of the mill stuff it seems like getting things reviewed in
the subsystem is more important.
Rob Herring Feb. 9, 2017, 10:47 p.m. UTC | #4
On Thu, Feb 9, 2017 at 6:06 AM, Mark Brown <broonie@kernel.org> wrote:
> On Thu, Feb 09, 2017 at 09:48:09AM +0800, Shawn Guo wrote:
>> On Wed, Feb 08, 2017 at 06:52:07PM -0600, Rob Herring wrote:
>
>> > Personally, I'd prefer "dt-bindings: sound: blah...", but not enough to
>> > argue with Mark about it. If that is not the prefix, then it should at
>> > least have "binding" in the subject.
>
>> +1
>
>> The prefix of sound bindings is quite unique from other subsystems.
>> Looking at the prefix of Documentation/devicetree/bindings/sound/
>> commits, I'm always confused whether it's a pure binding commit
>> or just submitted as part of the driver patch.  I feel that we
>> kinda lose the point of having a prefix.
>
> That's really not what's happening reliably - other subsystems also seem
> to have a bunch of things prefixed for the subsystem and the DT specific
> prefixes are all over the shop, people seem to be making them up at
> random.

I'm getting more picky about the subject and splitting bindings to a
separate patch, but generally only when I have other comments. And
I've had to get some maintainers to stop combining commits as they
apply them.

Maybe get_maintainers.pl could spit out the desired prefix and
checkpatch check it. Evidently, running "git log --oneline" is too
hard.

> If DT binding review were something that reliably and
> consistently happened and didn't affect the subsystem I'd perhaps buy it
> but for run of the mill stuff it seems like getting things reviewed in
> the subsystem is more important.

I review everything that gets sent to the DT list unless maintainers
apply it first. I'll still comment afterwards if there's anything
significant (or I missed that it was applied :)).

Rob
diff mbox

Patch

diff --git a/Documentation/devicetree/bindings/sound/zte,zx-i2s.txt b/Documentation/devicetree/bindings/sound/zte,zx-i2s.txt
index 7e5aa6f..77390c0 100644
--- a/Documentation/devicetree/bindings/sound/zte,zx-i2s.txt
+++ b/Documentation/devicetree/bindings/sound/zte,zx-i2s.txt
@@ -4,7 +4,7 @@  Required properties:
  - compatible : Must be "zte,zx296702-i2s"
  - reg : Must contain I2S core's registers location and length
  - clocks : Pairs of phandle and specifier referencing the controller's clocks.
- - clock-names: "tx" for the clock to the I2S interface.
+ - clock-names: "wclk" for the wclk, "pclk" for the pclk to the I2S interface.
  - dmas: Pairs of phandle and specifier for the DMA channel that is used by
    the core. The core expects two dma channels for transmit.
  - dma-names : Must be "tx" and "rx"
@@ -15,13 +15,17 @@  please check:
 	* clock/clock-bindings.txt
 	* dma/dma.txt
 
+Please note that ZTE ZX296702 I2S controller driver is compatible for zx296702
+and zx296718, so compatible string might be set as follow:
+	"zte,zx296718-i2s", "zte,zx296702-i2s"
+
 Example:
 	i2s0: i2s0@0b005000 {
 		#sound-dai-cells = <0>;
-		compatible = "zte,zx296702-i2s";
+		compatible = "zte,zx296718-i2s", "zte,zx296702-i2s";
 		reg = <0x0b005000 0x1000>;
-		clocks = <&lsp0clk ZX296702_I2S0_DIV>;
-		clock-names = "tx";
+		clocks = <&audiocrm AUDIO_I2S0_WCLK>, <&audiocrm AUDIO_I2S0_PCLK>;
+		clock-names = "wclk", "pclk";
 		interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>;
 		dmas = <&dma 5>, <&dma 6>;
 		dma-names = "tx", "rx";