Messages in this thread | | | From | Linus Walleij <> | Date | Thu, 21 Apr 2022 22:42:33 +0200 | Subject | Re: [PATCH 1/2] dt-binding: Add cypress,cy8c95x0 binding |
| |
Hi Patrick,
thanks for your patch!
On Tue, Apr 19, 2022 at 9:17 AM Patrick Rudolph <patrick.rudolph@9elements.com> wrote:
> Added device tree binding documentation for > Cypress CY8C95x0 I2C pin-controller. > > Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
> + '#gpio-cells': > + description: > + The first cell is the pin number and the second cell is used > + to specify optional parameters. > + const: 2
Maybe specify that the second cell uses the standard GPIO parameters in <dt-bindings/gpio/gpio.h>?
The driver is quite elaborate, you can probably list which parameters you support on this hardware even if the driver don't even implement them yet: it's just a binding after all.
> + ngpios: > + minimum: 1 > + maximum: 60
Why? Isn't it obvious from the compatible how many pins the GPIO chip has? Then use that instead. Write under the compatible as description: for each chip how many gpios it has.
> +patternProperties: > + '-pins$': > + type: object > + description: > + Pinctrl node's client devices use subnodes for desired pin configuration. > + Client device subnodes use below standard properties. > + $ref: "/schemas/pinctrl/pincfg-node.yaml"
This is impressive. It's quite advanced to use the pin config props for elaborate pin config control.
Yours, LInus Walleij
| |