mbox series

[v2,00/11] Convert DA906{1,2} bindings to json-schema

Message ID 20231202192536.266885-1-biju.das.jz@bp.renesas.com
Headers show
Series Convert DA906{1,2} bindings to json-schema | expand

Message

Biju Das Dec. 2, 2023, 7:25 p.m. UTC
Convert the below bindings to json-schema
1) DA906{1,2} mfd bindings
2) DA906{1,2,3} onkey bindings
3) DA906{1,2,3} thermal bindings

Also add fallback for DA9061 watchdog device and document
DA9063 watchdog device.

v1->v2:
 Ref : https://lore.kernel.org/all/20231201110840.37408-5-biju.das.jz@bp.renesas.com/
 * Made as a separate series
 * DA9062 and DA9061 merged with DA9063
 * Sorted the child devices
 * mfd,onkey and thermal are pointing to child bindings
 
Biju Das (11):
  dt-bindings: watchdog: dlg,da9062-watchdog: Add fallback for DA9061
    watchdog
  dt-bindings: watchdog: dlg,da9062-watchdog: Document DA9063 watchdog
  dt-bindings: input: Convert da906{1,2,3} onkey to json-schema
  dt-bindings: thermal: Convert da906{1,2} thermal to json-schema
  dt-bindings: mfd: dlg,da9063: Update watchdog property
  dt-bindings: mfd: dlg,da9063: Update onkey property
  dt-bindings: mfd: dlg,da9063: Sort child devices
  dt-bindings: mfd: da9062: Update watchdog description
  dt-bindings: mfd: da9062: Update onkey description
  dt-bindings: mfd: da9062: Update thermal description
  dt-bindings: mfd: dlg,da9063: Convert da9062 to json-schema

 .../bindings/input/da9062-onkey.txt           |  47 ----
 .../bindings/input/dlg,da9062-onkey.yaml      |  61 +++++
 .../devicetree/bindings/mfd/da9062.txt        | 124 ----------
 .../devicetree/bindings/mfd/dlg,da9063.yaml   | 220 +++++++++++++++---
 .../bindings/thermal/da9062-thermal.txt       |  36 ---
 .../bindings/thermal/dlg,da9062-thermal.yaml  |  58 +++++
 .../watchdog/dlg,da9062-watchdog.yaml         |  12 +-
 7 files changed, 313 insertions(+), 245 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/input/da9062-onkey.txt
 create mode 100644 Documentation/devicetree/bindings/input/dlg,da9062-onkey.yaml
 delete mode 100644 Documentation/devicetree/bindings/mfd/da9062.txt
 delete mode 100644 Documentation/devicetree/bindings/thermal/da9062-thermal.txt
 create mode 100644 Documentation/devicetree/bindings/thermal/dlg,da9062-thermal.yaml

Comments

Conor Dooley Dec. 3, 2023, 11:34 a.m. UTC | #1
On Sat, Dec 02, 2023 at 07:25:25PM +0000, Biju Das wrote:
> The DA9061 watchdog is identical to DA9062 watchdog, so no driver changes
> are required. The fallback compatible string "dlg,da9062-watchdog" will be
> used on DA9061 watchdog.
> 
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> ---
> v2:
>  * New patch
> ---
>  .../bindings/watchdog/dlg,da9062-watchdog.yaml        | 11 ++++++++---
>  1 file changed, 8 insertions(+), 3 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/watchdog/dlg,da9062-watchdog.yaml b/Documentation/devicetree/bindings/watchdog/dlg,da9062-watchdog.yaml
> index f058628bb632..2b71fdb9251c 100644
> --- a/Documentation/devicetree/bindings/watchdog/dlg,da9062-watchdog.yaml
> +++ b/Documentation/devicetree/bindings/watchdog/dlg,da9062-watchdog.yaml
> @@ -14,9 +14,14 @@ allOf:
>  
>  properties:
>    compatible:
> -    enum: 
> -      - dlg,da9061-watchdog
> -      - dlg,da9062-watchdog
> +    oneOf:
> +      - items:
> +          - enum:
> +              - dlg,da9062-watchdog
> +      - items:
> +          - enum:
> +              - dlg,da9061-watchdog

If there is no da9064 on the horizon, I'd just make this const.

> +          - const: dlg,da9062-watchdog # da9062-watchdog fallback

The comment here is just noise IMO.

Otherwise, LGTM.
Biju Das Dec. 3, 2023, 12:52 p.m. UTC | #2
Hi Conor Dooley,

Thanks for the feedback.

> Subject: Re: [PATCH v2 01/11] dt-bindings: watchdog: dlg,da9062-watchdog:
> Add fallback for DA9061 watchdog
> 
> On Sat, Dec 02, 2023 at 07:25:25PM +0000, Biju Das wrote:
> > The DA9061 watchdog is identical to DA9062 watchdog, so no driver
> > changes are required. The fallback compatible string
> > "dlg,da9062-watchdog" will be used on DA9061 watchdog.
> >
> > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> > ---
> > v2:
> >  * New patch
> > ---
> >  .../bindings/watchdog/dlg,da9062-watchdog.yaml        | 11 ++++++++---
> >  1 file changed, 8 insertions(+), 3 deletions(-)
> >
> > diff --git
> > a/Documentation/devicetree/bindings/watchdog/dlg,da9062-watchdog.yaml
> > b/Documentation/devicetree/bindings/watchdog/dlg,da9062-watchdog.yaml
> > index f058628bb632..2b71fdb9251c 100644
> > ---
> > a/Documentation/devicetree/bindings/watchdog/dlg,da9062-watchdog.yaml
> > +++ b/Documentation/devicetree/bindings/watchdog/dlg,da9062-watchdog.y
> > +++ aml
> > @@ -14,9 +14,14 @@ allOf:
> >
> >  properties:
> >    compatible:
> > -    enum:
> > -      - dlg,da9061-watchdog
> > -      - dlg,da9062-watchdog
> > +    oneOf:
> > +      - items:
> > +          - enum:
> > +              - dlg,da9062-watchdog
> > +      - items:
> > +          - enum:
> > +              - dlg,da9061-watchdog
> 
> If there is no da9064 on the horizon, I'd just make this const.

You mean since it is single device having a fallback,
define both device compatible and fallback as const instead of enum and const??

> 
> > +          - const: dlg,da9062-watchdog # da9062-watchdog fallback
> 
> The comment here is just noise IMO.

OK, will change the comment as generic fallback. Is it ok? Or you want to drop completely??

Cheers,

Biju
Biju Das Dec. 4, 2023, 10:55 a.m. UTC | #3
Hi Conor Dooley,

> Subject: RE: [PATCH v2 01/11] dt-bindings: watchdog: dlg,da9062-watchdog:
> Add fallback for DA9061 watchdog
> 
> Hi Conor Dooley,
> 
> Thanks for the feedback.
> 
> > Subject: Re: [PATCH v2 01/11] dt-bindings: watchdog: dlg,da9062-
> watchdog:
> > Add fallback for DA9061 watchdog
> >
> > On Sat, Dec 02, 2023 at 07:25:25PM +0000, Biju Das wrote:
> > > The DA9061 watchdog is identical to DA9062 watchdog, so no driver
> > > changes are required. The fallback compatible string
> > > "dlg,da9062-watchdog" will be used on DA9061 watchdog.
> > >
> > > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> > > ---
> > > v2:
> > >  * New patch
> > > ---
> > >  .../bindings/watchdog/dlg,da9062-watchdog.yaml        | 11 ++++++++--
> -
> > >  1 file changed, 8 insertions(+), 3 deletions(-)
> > >
> > > diff --git
> > > a/Documentation/devicetree/bindings/watchdog/dlg,da9062-watchdog.yam
> > > l
> > > b/Documentation/devicetree/bindings/watchdog/dlg,da9062-watchdog.yam
> > > l index f058628bb632..2b71fdb9251c 100644
> > > ---
> > > a/Documentation/devicetree/bindings/watchdog/dlg,da9062-watchdog.yam
> > > l
> > > +++ b/Documentation/devicetree/bindings/watchdog/dlg,da9062-watchdog
> > > +++ .y
> > > +++ aml
> > > @@ -14,9 +14,14 @@ allOf:
> > >
> > >  properties:
> > >    compatible:
> > > -    enum:
> > > -      - dlg,da9061-watchdog
> > > -      - dlg,da9062-watchdog
> > > +    oneOf:
> > > +      - items:
> > > +          - enum:
> > > +              - dlg,da9062-watchdog
> > > +      - items:
> > > +          - enum:
> > > +              - dlg,da9061-watchdog
> >
> > If there is no da9064 on the horizon, I'd just make this const.
> 
> You mean since it is single device having a fallback, define both device
> compatible and fallback as const instead of enum and const??
> 
> >
> > > +          - const: dlg,da9062-watchdog # da9062-watchdog fallback
> >
> > The comment here is just noise IMO.

Yes it make sense, comment is not needed.

    oneOf:
      - items:
          - enum:
              - dlg,da9062-watchdog
      - items:
          - const: dlg,da9061-watchdog
          - const: dlg,da9062-watchdog

Cheers,
Biju
Conor Dooley Dec. 4, 2023, 5:10 p.m. UTC | #4
On Mon, Dec 04, 2023 at 10:55:20AM +0000, Biju Das wrote:
> Hi Conor Dooley,
> 
> > Subject: RE: [PATCH v2 01/11] dt-bindings: watchdog: dlg,da9062-watchdog:
> > Add fallback for DA9061 watchdog
> > 
> > Hi Conor Dooley,
> > 
> > Thanks for the feedback.
> > 
> > > Subject: Re: [PATCH v2 01/11] dt-bindings: watchdog: dlg,da9062-
> > watchdog:
> > > Add fallback for DA9061 watchdog
> > >
> > > On Sat, Dec 02, 2023 at 07:25:25PM +0000, Biju Das wrote:
> > > > The DA9061 watchdog is identical to DA9062 watchdog, so no driver
> > > > changes are required. The fallback compatible string
> > > > "dlg,da9062-watchdog" will be used on DA9061 watchdog.
> > > >
> > > > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> > > > ---
> > > > v2:
> > > >  * New patch
> > > > ---
> > > >  .../bindings/watchdog/dlg,da9062-watchdog.yaml        | 11 ++++++++--
> > -
> > > >  1 file changed, 8 insertions(+), 3 deletions(-)
> > > >
> > > > diff --git
> > > > a/Documentation/devicetree/bindings/watchdog/dlg,da9062-watchdog.yam
> > > > l
> > > > b/Documentation/devicetree/bindings/watchdog/dlg,da9062-watchdog.yam
> > > > l index f058628bb632..2b71fdb9251c 100644
> > > > ---
> > > > a/Documentation/devicetree/bindings/watchdog/dlg,da9062-watchdog.yam
> > > > l
> > > > +++ b/Documentation/devicetree/bindings/watchdog/dlg,da9062-watchdog
> > > > +++ .y
> > > > +++ aml
> > > > @@ -14,9 +14,14 @@ allOf:
> > > >
> > > >  properties:
> > > >    compatible:
> > > > -    enum:
> > > > -      - dlg,da9061-watchdog
> > > > -      - dlg,da9062-watchdog
> > > > +    oneOf:
> > > > +      - items:
> > > > +          - enum:
> > > > +              - dlg,da9062-watchdog
> > > > +      - items:
> > > > +          - enum:
> > > > +              - dlg,da9061-watchdog
> > >
> > > If there is no da9064 on the horizon, I'd just make this const.
> > 
> > You mean since it is single device having a fallback, define both device
> > compatible and fallback as const instead of enum and const??
> > 
> > >
> > > > +          - const: dlg,da9062-watchdog # da9062-watchdog fallback
> > >
> > > The comment here is just noise IMO.
> 
> Yes it make sense, comment is not needed.
> 
>     oneOf:
>       - items:
>           - enum:
>               - dlg,da9062-watchdog
>       - items:
>           - const: dlg,da9061-watchdog
>           - const: dlg,da9062-watchdog

Ye, this looks good. Thanks.