public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: nikita.shubin@maquefel.me, David Rhodes <david.rhodes@cirrus.com>,
	Richard Fitzgerald <rf@opensource.cirrus.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>, Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Alexander Sverdlin <alexander.sverdlin@gmail.com>
Cc: linux-sound@vger.kernel.org, patches@opensource.cirrus.com,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ASoC: dt-bindings: cirrus,cs4271: Convert to dtschema
Date: Mon, 26 Aug 2024 17:51:37 +0200	[thread overview]
Message-ID: <62edecf4-6fc6-4aff-bd42-4fac171f5093@kernel.org> (raw)
In-Reply-To: <20240826-cs4271-yaml-v1-1-dad3f0b041ef@maquefel.me>

On 26/08/2024 11:53, Nikita Shubin via B4 Relay wrote:
> From: Nikita Shubin <nikita.shubin@maquefel.me>
> 
> Convert the Cirrus Logic CS4271 audio CODEC bindings to DT schema.
> 
> Cc: Alexander Sverdlin <alexander.sverdlin@gmail.com>
> Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
> Link: https://lore.kernel.org/all/20240715-ep93xx-v11-0-4e924efda795@maquefel.me

I think Link goes above your SoB. Your Sob must be the last tag from you.

> ---
> This is complementary patch to ep93xx DT conversion series.

...

> +
> +title: Cirrus Logic CS4271 audio CODEC
> +
> +maintainers:
> +  - Alexander Sverdlin <alexander.sverdlin@gmail.com>
> +  - Nikita Shubin <nikita.shubin@maquefel.me>
> +
> +description:
> +  The CS4271 is a stereo audio codec. This driver supports both the I2C
> +  and the SPI bus.

Drop references to driver. You can say that device supports
configuration over I2C and SPI.

> +
> +allOf:
> +  - $ref: dai-common.yaml#
> +  - $ref: /schemas/spi/spi-peripheral-props.yaml#
> +
> +properties:
> +  compatible:
> +    const: cirrus,cs4271
> +
> +  reg:
> +    maxItems: 1
> +
> +  spi-cpha: true
> +
> +  spi-cpol: true
> +
> +  '#sound-dai-cells':
> +    const: 0

None of these three were present in original binding.

> +
> +  reset-gpio:

If it bases on cs4270, look there - there is no "gpio", but "gpios".
Mention changes in commit msg.


> +    description:
> +      This pin will be deasserted before communication to the codec starts.
> +    maxItems: 1
> +
> +  va-supply:
> +    description: Analog power supply.
> +
> +  vd-supply:
> +    description: Digital power supply.
> +
> +  vl-supply:
> +    description: Serial Control Port power supply.
> +
> +  port:
> +    $ref: audio-graph-port.yaml#
> +    unevaluatedProperties: false

This wasn't present in original binding and nothing in commit msg
explained changes from pure conversion. Explain them in commit msg.

> +
> +  cirrus,amuteb-eq-bmutec:
> +    description:
> +      When given, the Codec's AMUTEB=BMUTEC flag is enabled.
> +    type: boolean
> +
> +  cirrus,enable-soft-reset:
> +    description: |
> +      The CS4271 requires its LRCLK and MCLK to be stable before its RESET
> +      line is de-asserted. That also means that clocks cannot be changed
> +      without putting the chip back into hardware reset, which also requires
> +      a complete re-initialization of all registers.
> +
> +      One (undocumented) workaround is to assert and de-assert the PDN bit
> +      in the MODE2 register. This workaround can be enabled with this DT
> +      property.
> +
> +      Note that this is not needed in case the clocks are stable
> +      throughout the entire runtime of the codec.
> +    type: boolean
> +
> +required:
> +  - compatible
> +  - reg
> +
> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +    spi {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +        cs4271: codec@0 {

Drop unused label.

> +            compatible = "cirrus,cs4271";
> +            reg = <0>;
> +            reset-gpio = <&gpio0 1 0>;

Use defines for flags.

Also, make the example complete. You  miss many properties.

> +        };
> +    };
> +
> +...
> \ No newline at end of file

This needs to be always fixed before posting.



Best regards,
Krzysztof


      parent reply	other threads:[~2024-08-26 15:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-26  9:53 [PATCH] ASoC: dt-bindings: cirrus,cs4271: Convert to dtschema Nikita Shubin via B4 Relay
2024-08-26 11:26 ` Rob Herring (Arm)
2024-08-26 15:51 ` Krzysztof Kozlowski [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=62edecf4-6fc6-4aff-bd42-4fac171f5093@kernel.org \
    --to=krzk@kernel.org \
    --cc=alexander.sverdlin@gmail.com \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=david.rhodes@cirrus.com \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=nikita.shubin@maquefel.me \
    --cc=patches@opensource.cirrus.com \
    --cc=rf@opensource.cirrus.com \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox