Re: [PATCH] dt-bindings: can: renesas,rcar-canfd: Fix number of channels for R-Car V3U

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

 



Hi Krzysztof,

On Fri, Dec 2, 2022 at 11:49 AM Krzysztof Kozlowski
<krzysztof.kozlowski@xxxxxxxxxx> wrote:
> On 02/12/2022 10:25, Geert Uytterhoeven wrote:
> > On Fri, Dec 2, 2022 at 10:01 AM Krzysztof Kozlowski
> > <krzysztof.kozlowski@xxxxxxxxxx> wrote:
> >> On 02/12/2022 09:22, Geert Uytterhoeven wrote:
> >>> According to the bindings, only two channels are supported.
> >>> However, R-Car V3U supports eight, leading to "make dtbs" failures:
> >>>
> >>>         arch/arm64/boot/dts/renesas/r8a779a0-falcon.dtb: can@e6660000: Unevaluated properties are not allowed ('channel2', 'channel3', 'channel4', 'channel5', 'channel6', 'channel7' were unexpected)
> >>>
> >>> Update the number of channels to 8 on R-Car V3U.
> >>> While at it, prevent adding more properties to the channel nodes, as
> >>> they must contain no other properties than a status property.
> >>>
> >>> Fixes: d6254d52d70de530 ("dt-bindings: can: renesas,rcar-canfd: Document r8a779a0 support")
> >>> Signed-off-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
> >
> >>> --- a/Documentation/devicetree/bindings/net/can/renesas,rcar-canfd.yaml
> >>> +++ b/Documentation/devicetree/bindings/net/can/renesas,rcar-canfd.yaml
> >
> >>>      description: Maximum frequency of the CANFD clock.
> >>>
> >>>  patternProperties:
> >>> -  "^channel[01]$":
> >>> +  "^channel[0-7]$":
> >>>      type: object
> >>>      description:
> >>> -      The controller supports two channels and each is represented as a child
> >>> -      node.  Each child node supports the "status" property only, which
> >>> +      The controller supports multiple channels and each is represented as a
> >>> +      child node.  Each child node supports the "status" property only, which
> >>>        is used to enable/disable the respective channel.
> >>>
> >>> +    unevaluatedProperties: false
> >>
> >> There are no other properties within a channel, so this should be rather
> >> additionalProperties: false.
> >
> > Are you sure? Then I also have to add:
> >
> >         properties:
> >           status: true
>
> Do you? I think it would be first schema needing it, so maybe that would
> be a problem for dtschema...

You think I haven't tried? ;-)

    arch/arm64/boot/dts/renesas/r8a774a1-beacon-rzg2m-kit.dtb:
can@e66c0000: channel0: Additional properties are not allowed
('status' was unexpected)

And indeed, that would be the first reference to status in a bindings
file...

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds



[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux