Re: [EXT] Re: [PATCH 1/2 v8] dt-bindings: watchdog: marvell GTI system watchdog driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hey Bharat,

On Mon, May 29, 2023 at 06:14:07AM +0000, Bharat Bhushan wrote:

> Fallback you mentioned make code look simple. Is below representation correct for above mentioned fallback? 
> 
> properties:
>   compatible:
>     oneOf:
>       - const: marvell,cn9670-wdt
>       - items:
>           - enum:
>               - marvell,cn9880-wdt
>               - marvell,cnf9535-wdt
>           - const: marvell,cn9670-wdt
>       - const: marvell,cn10624-wdt
>       - items:
>           - enum:
>               - marvell,cn10308-wdt
>               - marvell,cnf10518-wdt
>           - const: marvell,cn10624-wdt

Instead of having const: bits for each of the single-compatible ones, if
you are not going to add descriptions, I'd probably do:
properties:
  compatible:
    oneOf:
      - enum:
          - marvell,cn9670-wdt
          - marvell,cn10624-wdt

      - items:
          - enum:
              - marvell,cn9880-wdt
              - marvell,cnf9535-wdt
          - const: marvell,cn9670-wdt

      - items:
          - enum:
              - marvell,cn10308-wdt
              - marvell,cnf10518-wdt
          - const: marvell,cn10624-wdt

> And driver will have
>         { .compatible = "marvell,cn9670-wdt", .data = &match_data_octeontx2},
>         { .compatible = "marvell,cn10624-wdt", .data = &match_data_cn10k},

Otherwise, looks good to me. You should probably also rename the file to
match one of the compatibles contained in it.

Thanks,
Conor.

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux