devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-omap@vger.kernel.org,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	Keerthy <j-keerthy@ti.com>, Nishanth Menon <nm@ti.com>,
	Vignesh Raghavendra <vigneshr@ti.com>
Subject: Re: [PATCH 1/2] dt-bindings: timer: Update TI timer to yaml
Date: Wed, 13 Apr 2022 09:04:51 +0300	[thread overview]
Message-ID: <YlZoA/TX02E+Ey7U@atomide.com> (raw)
In-Reply-To: <1c455b6e-0009-6f8b-15c8-2a352479c5f2@linaro.org>

* Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> [220412 17:04]:
> On 12/04/2022 15:16, Tony Lindgren wrote:
> > +allOf:
> > +  - if:
> > +      properties:
> > +        compatible:
> > +          contains:
> > +            enum:
> > +              - ti,omap3430-timer
> > +              - ti,omap4430-timer
> > +              - ti,omap5430-timer
> > +    then:
> > +      properties:
> > +        reg:
> > +          oneOf:
> > +            - items:
> > +                - description: IO address
> > +            - items:
> > +                - description: CPU to L4 ABE IO address
> > +                - description: L3 to L4 ABE IO address
> > +        clocks:
> > +          oneOf:
> > +            - items:
> > +                - description: Functional clock
> > +            - items:
> > +                - description: Functional clock
> > +                - description: System clock
> 
> I think this can be made simpler, without oneOf:
> 
>   clocks:
>     items:
>       - description: Functional clock
>       - description: System clock
>     minItems: 1
> 
> 
> and similar for clock-names.

OK simpler sure sounds good to me considering the file path starts with
"Documentation" :)

> > +        clock-names:
> > +          oneOf:
> > +            - items:
> > +                - const: fck
> > +            - items:
> > +                - const: fck
> > +                - const: timer_sys_ck
> > +    else:
> > +      properties:
> > +        reg:
> > +          items:
> > +            - description: IO address
> > +        clocks:
> > +          items:
> > +            - description: Functional clock
> > +        clock-names:
> > +          items:
> > +            - const: fck
> 
> Hmmm, in your previous version I had impression that first clock is not
> the same on every flavor. Now it looks the same, so clocks you could
> simplify even more:
> 1. Define full list in main properties (not in allOf) with minItems:1
> 2. Use maxItems:1, for this "else:" case.
> 
> This could greatly reduce amount of code you need and keep the actual
> definition of clocks in main properties (not in allOf; allOf are only to
> constrain it).

OK thanks I'll check. I think we can assume the first clock is "fck" if
it is configured at all.

Regards,

Tony

  reply	other threads:[~2022-04-13  6:04 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-12 13:16 [PATCHv3 0/2] Convert TI dmtimer binding to yaml Tony Lindgren
2022-04-12 13:16 ` [PATCH 1/2] dt-bindings: timer: Update TI timer " Tony Lindgren
2022-04-12 17:06   ` Krzysztof Kozlowski
2022-04-13  6:04     ` Tony Lindgren [this message]
2022-04-13  8:09       ` Tony Lindgren
2022-04-12 13:16 ` [PATCH 2/2] dt-bindings: timer: Add compatible for am6 for TI timer-dm Tony Lindgren
2022-04-12 21:26 ` [PATCHv3 0/2] Convert TI dmtimer binding to yaml Rob Herring
2022-04-13  6:11   ` Tony Lindgren
  -- strict thread matches above, loose matches on Subject: below --
2022-04-11 11:18 [PATCH 1/2] dt-bindings: timer: Update TI timer " Tony Lindgren
2022-04-12  8:38 ` Grygorii Strashko
2022-04-12  8:51   ` Tony Lindgren
2022-04-12  9:48     ` Grygorii Strashko
2022-04-12  9:00 ` Krzysztof Kozlowski
2022-04-12  9:10   ` Tony Lindgren
2022-04-12  9:13     ` 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=YlZoA/TX02E+Ey7U@atomide.com \
    --to=tony@atomide.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=j-keerthy@ti.com \
    --cc=krzk+dt@kernel.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=nm@ti.com \
    --cc=robh+dt@kernel.org \
    --cc=vigneshr@ti.com \
    /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;
as well as URLs for NNTP newsgroup(s).