[PATCH 05/19] dt-bindings: bluetooth: realtek: Switch to unevaluatedProperties
Maxime Ripard
maxime at cerno.tech
Mon Jan 18 05:15:01 EST 2021
Hi Rob,
On Thu, Jan 14, 2021 at 07:37:14PM -0600, Rob Herring wrote:
> On Thu, Jan 14, 2021 at 12:35:24PM +0100, Maxime Ripard wrote:
> > additionalProperties prevent any property not explicitly defined in the
> > binding to be used. Yet, some serial properties like max-speed are valid
> > and validated through the serial/serial.yaml binding.
> >
> > Let's change additionalProperties to unevaluatedProperties to avoid
> > spurious warnings.
> >
> > Cc: Alistair Francis <alistair at alistair23.me>
> > Cc: Vasily Khoruzhick <anarsoul at gmail.com>
> > Signed-off-by: Maxime Ripard <maxime at cerno.tech>
> > ---
> > Documentation/devicetree/bindings/net/realtek-bluetooth.yaml | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/Documentation/devicetree/bindings/net/realtek-bluetooth.yaml b/Documentation/devicetree/bindings/net/realtek-bluetooth.yaml
> > index 4f485df69ac3..f4d4969d87f4 100644
> > --- a/Documentation/devicetree/bindings/net/realtek-bluetooth.yaml
> > +++ b/Documentation/devicetree/bindings/net/realtek-bluetooth.yaml
> > @@ -37,7 +37,7 @@ properties:
> > required:
> > - compatible
> >
> > -additionalProperties: false
> > +unevaluatedProperties: false
>
> This would still fail because the serial schema is applied to the parent
> and this schema is applied to the child node. It's a common problem for
> how we've done bus schemas. We'd need to split them into 2 schemas and
> reference the child schema here. I'd rather not do that here because
> then we'd apply the schema twice assuming we keep bus schemas also
> applying the child schemas (which is good at least until we have schemas
> for *all* possible child devices).
I couldn't find what requires additionalProperties in the meta-schemas,
could you point me to what enforces it?
> We've handled this in other cases by just doing 'max-speed: true' here.
I will do that then, thanks!
Maxime
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20210118/0d9abd78/attachment.sig>
More information about the linux-arm-kernel
mailing list