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

From: Conor Dooley
Date: Mon May 29 2023 - 08:34:44 EST


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