[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230824134013.GB649032-robh@kernel.org>
Date: Thu, 24 Aug 2023 08:40:13 -0500
From: Rob Herring <robh@...nel.org>
To: Martin Zaťovič <m.zatovic1@...il.com>
Cc: linux-kernel@...r.kernel.org, krzysztof.kozlowski+dt@...aro.org,
conor+dt@...nel.org, gregkh@...uxfoundation.org,
linus.walleij@...aro.org, quic_jhugo@...cinc.com,
nipun.gupta@....com, tzimmermann@...e.de, ogabbay@...nel.org,
mathieu.poirier@...aro.org, axboe@...nel.dk,
damien.lemoal@...nsource.wdc.com, linux@...y.sk, arnd@...db.de,
yangyicong@...ilicon.com, benjamin.tissoires@...hat.com,
masahiroy@...nel.org, jacek.lawrynowicz@...ux.intel.com,
geert+renesas@...der.be, devicetree@...r.kernel.org,
andriy.shevchenko@...el.com
Subject: Re: [PATCHv5 3/4] dt-bindings: wiegand: add GPIO bitbanged Wiegand
controller
On Thu, Aug 24, 2023 at 01:10:14PM +0200, Martin Zaťovič wrote:
> GPIO bitbanged Wiegand controller requires definitions of GPIO lines to be
> used on top of the common Wiegand properties. Wiegand utilizes two such
> lines - DATA0(low data line) and DATA1(high data line).
>
> Acked-by: Linus Walleij <linus.walleij@...aro.org>
> Signed-off-by: Martin Zaťovič <m.zatovic1@...il.com>
> ---
> .../bindings/wiegand/wiegand-gpio.yaml | 46 +++++++++++++++++++
> MAINTAINERS | 5 ++
> 2 files changed, 51 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/wiegand/wiegand-gpio.yaml
>
> diff --git a/Documentation/devicetree/bindings/wiegand/wiegand-gpio.yaml b/Documentation/devicetree/bindings/wiegand/wiegand-gpio.yaml
> new file mode 100644
> index 000000000000..cf2cb938de02
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/wiegand/wiegand-gpio.yaml
> @@ -0,0 +1,46 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/wiegand/wiegand-gpio.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: GPIO bitbanged Wiegand interface properties
> +
> +maintainers:
> + - Martin Zaťovič <m.zatovic1@...il.com>
> +
> +description:
> + This represents the GPIO lines used for bit-banged Wiegand on dedicated GPIO
> + lines.
> +
> +allOf:
> + - $ref: /schemas/wiegand/wiegand-controller.yaml#
> +
> +properties:
> + compatible:
> + const: wiegand-gpio
> +
> + data-gpios:
> + description: GPIOs used as Wiegand data lines, DATA0 and DATA1 respectivelly.
> + maxItems: 2
> +
> +required:
> + - compatible
> + - data-gpios
> +
> +unevaluatedProperties: false
You'll find this fails if you add an actual child node. Assuming you go
with only 1 child node allowed, then you need:
unevaluatedProperties:
type: object
(There's not any way to say only 1 child, but multiple would have
constraints in the common binding as I explained.)
Rob
Powered by blists - more mailing lists