Re: Property names regex

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

 



On Tue, Aug 2, 2022 at 6:58 PM Andrew Lunn <andrew@xxxxxxx> wrote:
>
> Hi Rob
>
> I'm slowly converting some of the Marvell binding documents to YAML.
>
> I've got a problem with one of the interrupt controllers.

devicetree-spec@xxxxxxxxxxxxxxx is less of a firehose and better for
asking questions.

> Documentation/devicetree/bindings/interrupt-controller/marvell,orion-intc.txt
> includes:
>
> Optional properties:
> - marvell,#interrupts: number of interrupts provided by bridge interrupt
>       controller, defaults to 32 if not set
>
>
> I converted this to YAML as:
>
>   'marvell,#interrupts':
>     description:
>       number of interrupts provided by bridge interrupt controller
>     $ref: /schemas/types.yaml#/definitions/uint32
>     default: 32
>
> but when i run dt_binding_check, i get:
>
> home/andrew/linux/Documentation/devicetree/bindings/interrupt-controller/marvell,orion-bridge-intc.yaml: properties: 'marvell,#interrupts' does not match '^[#$a-zA-Z][a-zA-Z0-9,+\\-._@]{0,63}$'
>         hint: Expected a valid DT property name
>         from schema $id: http://devicetree.org/meta-schemas/keywords.yaml#
>
> As far as i can see from:
>
> https://devicetree-specification.readthedocs.io/en/v0.3/devicetree-basics.html#properties
>
> A property name is allowed a # anywhere in it, not just at the start.

Yes, the schemas are a bit more restrictive for modern DTs than the spec.

> How do i get this regex changed?

I committed a fix to relax this[1].

Rob

[1] https://github.com/devicetree-org/dt-schema/commit/0e28a44059a6e33314784cfaf7b45d48afd10527



[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