Re: [PATCH 1/3] dt-bindings: Add bindings for aspeed pwm-tach.

From: Billy Tsai
Date: Thu Nov 03 2022 - 06:36:57 EST



On 2022/11/3, 5:20 AM, "Krzysztof Kozlowski" <krzk@xxxxxxxxxx> wrote:

On 31/10/2022 06:38, Billy Tsai wrote:
> > +patternProperties:
> > + "^pwm(@[0-9a-f]+)?$":
> > + $ref: ../pwm/aspeed,ast2600-pwm.yaml

> Full path, so: /schemas/pwm/aspeed,ast2600-pwm.yaml

> Why unit addresses are optional?

> > +
> > + "^tach(@[0-9a-f]+)?$":
> > + $ref: ../hwmon/aspeed,ast2600-tach.yaml

> Ditto

> Why unit addresses are optional?

The pwm_tach is not the bus. I will use
pwm:
type: object
$ref: "/schemas/pwm/aspeed,ast2600-pwm.yaml"

tach:
type: object
$ref: "/schemas/hwmon/aspeed,ast2600-tach.yaml"
to replace it.

> > +
> > +additionalProperties: false
> > +
> > +examples:
> > + - |
> > + #include <dt-bindings/clock/ast2600-clock.h>
> > + pwm_tach: pwm_tach@1e610000 {

> Node names should be generic.
> https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation

This is the mfd with pwm and tach, so they are combined as the node name.

> No underscores in node names.

https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#table-1
I see that the underscore is the valid characters for node names.
Did I miss any information?

Thanks

Best Regards,
Billy Tsai