Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Ki-Seok Jo <kiseok.jo@irondevice.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>, Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
Cc: "devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>
Subject: Re: [PATCH] Fixed the schema binding according to test
Date: Thu, 2 Feb 2023 21:20:17 +0100	[thread overview]
Message-ID: <4111d645-478a-e55f-60bd-4ecbef077183@linaro.org> (raw)
In-Reply-To: <SLXP216MB0077A1B1F744D74A5B338F0C8CD69@SLXP216MB0077.KORP216.PROD.OUTLOOK.COM>

On 02/02/2023 10:55, Ki-Seok Jo wrote:
>> Thank you for your patch. There is something to discuss/improve.
>>
>> On 02/02/2023 10:07, Kiseok Jo wrote:
>>> Modified according to the writing-schema.rst file and tested.
>>
>> Use imperative, not past tense (Fixed->Fix, Modified->Modify).
> 
> Okay. I got it. I'll do that when I rewrite it. Thanks.
> 
>>>
>>> Signed-off-by: Kiseok Jo <kiseok.jo@irondevice.com>
>>
>> Use subject prefixes matching the subsystem (which you can get for example
>> with `git log --oneline -- DIRECTORY_OR_FILE` on the directory your patch
>> is touching). Therefore it should be:
>> "ASoC: dt-bindings: irondevice,sma1303: Rework binding and add missing
>> properties"
>>
> 
> Oh, thank you for good information. I feel like I still lack a lot.
> I'll apply it. Thanks!
> 
>>
>>> ---
>>>  .../bindings/sound/irondevice,sma1303.yaml    | 46 +++++++++++++++++--
>>>  1 file changed, 43 insertions(+), 3 deletions(-)
>>>
>>> diff --git
>>> a/Documentation/devicetree/bindings/sound/irondevice,sma1303.yaml
>>> b/Documentation/devicetree/bindings/sound/irondevice,sma1303.yaml
>>> index 162c52606635..35d9a046ef75 100644
>>> --- a/Documentation/devicetree/bindings/sound/irondevice,sma1303.yaml
>>> +++ b/Documentation/devicetree/bindings/sound/irondevice,sma1303.yaml
>>> @@ -10,22 +10,62 @@ maintainers:
>>>    - Kiseok Jo <kiseok.jo@irondevice.com>
>>>
>>>  description:
>>> -  SMA1303 digital class-D audio amplifier with an integrated boost
>> converter.
>>> +  SMA1303 digital class-D audio amplifier  with an integrated boost
>>> + converter.
>>>
>>>  allOf:
>>> -  - $ref: name-prefix.yaml#
>>> +  - $ref: dai-common.yaml#
>>> +
>>> +properties:
>>> +  compatible:
>>> +    enum:
>>> +      - irondevice,sma1303
>>> +
>>> +  reg:
>>> +    maxItems: 1
>>> +
>>> +  '#sound-dai-cells':
>>> +    const: 1
>>> +
>>> +  i2c-retry:
>>> +    description: number of retries for I2C regmap.
>>
>> Why do you need this? Why this fits the purpose of DT (or IOW why this
>> differs between boards)?
> 
> When working with drivers on mulitiple platforms, there were cases where
> I2C did not work properly dpending on the AP or setting.
> So I made it possible to set a few retry settings, and then check or do
> other actions. Retry is performed only when I2C fails.
> 
> And each device may have a different pull-up resisor or strength,
> so there may be differences between boards.

None of I2C drivers need it (except SBS battery), so it should not be
needed here. If you have wrong pin setup, this one should be corrected
instead.

> 
> Could that property be a problem?
> 
>>> +    maximum: 49
>>> +    default: 3
>>> +
>>> +  tdm-slot-rx:
>>> +    description: set the tdm rx start slot.
>>
>> Aren't you now re-writing dai-tdm-slot-rx-mask property? Same for tx below.
>>
> 
> It can be the same as audio DAI's tdm slot, I think but there are cases
> where it is set differently, so I omitted it separately.

Unfortunately I still do not understand why do you need it. Use generic
DAI/TDM properties.

> 
>>> +    maximum: 7
>>> +    default: 0
>>> +
>>> +  tdm-slot-tx:
>>> +    description: set the tdm tx start slot.
>>> +    maximum: 7
>>> +    default: 0
>>> +
>>> +  sys-clk-id:
>>> +    description: select the using system clock.
>>
>> What does it mean? Why do you need such property instead of clocks?
> 
> This can receive an external clock, but it can use internal clock.
> Should I write all the clock descriptions in case?

How do you configure and enable external clock with this property? I
don't see it. If the device has clock input, this should be "clocks". If
it is omitted, then internal clock is used.



Best regards,
Krzysztof


  reply	other threads:[~2023-02-02 20:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-02  9:07 [PATCH] Fixed the schema binding according to test Kiseok Jo
2023-02-02  9:15 ` Krzysztof Kozlowski
2023-02-02  9:55   ` Ki-Seok Jo
2023-02-02 20:20     ` Krzysztof Kozlowski [this message]
2023-02-03  5:06       ` Ki-Seok Jo
2023-02-03  7:35         ` Krzysztof Kozlowski

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=4111d645-478a-e55f-60bd-4ecbef077183@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=kiseok.jo@irondevice.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=lgirdwood@gmail.com \
    --cc=robh+dt@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