lkml.org 
[lkml]   [2023]   [May]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [EXT] Re: [PATCH 1/2 v8] dt-bindings: watchdog: marvell GTI system watchdog driver
    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.
    [unhandled content-type:application/pgp-signature]
    \
     
     \ /
      Last update: 2023-05-29 14:35    [W:4.062 / U:0.300 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site