From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: "Martin Zaťovič" <m.zatovic1@gmail.com>,
robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org,
andersson@kernel.org, jeffrey.l.hugo@gmail.com,
Michael.Srba@seznam.cz, gregkh@linuxfoundation.org,
elder@linaro.org, hemantk@codeaurora.org, mani@kernel.org,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
linus.walleij@linaro.org
Subject: Re: [RFCv3 PATCH 1/2] dt-bindings: bus: add Wiegand bus dt documentation
Date: Mon, 24 Oct 2022 17:12:19 -0400 [thread overview]
Message-ID: <07255e98-b5fe-3555-8cf8-b1e0005fd3d4@linaro.org> (raw)
In-Reply-To: <20221024162650.36587-2-m.zatovic1@gmail.com>
On 24/10/2022 12:26, Martin Zaťovič wrote:
> This patch documents the devicetree entry for a Wiegand bus.
Do not use "This commit/patch".
https://elixir.bootlin.com/linux/v5.17.1/source/Documentation/process/submitting-patches.rst#L95
> A Wiegand bus follows the Wiegand protocol. The bus claims two GPIO
> lines over which the communication is realized. It also introduces
> parameters to control the pulse durations and the length of a gap
> after finishing sending a frame.
>
> Signed-off-by: Martin Zaťovič <m.zatovic1@gmail.com>
> ---
> .../devicetree/bindings/bus/wiegand.yaml | 75 +++++++++++++++++++
> 1 file changed, 75 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/bus/wiegand.yaml
>
> diff --git a/Documentation/devicetree/bindings/bus/wiegand.yaml b/Documentation/devicetree/bindings/bus/wiegand.yaml
> new file mode 100644
> index 000000000000..cc8d3c46bcde
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/bus/wiegand.yaml
> @@ -0,0 +1,75 @@
> +# SPDX-License-Identifier: GPL-2.0
Dual license
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/bus/wiegand.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Wiegand Bus
> +
> +maintainers:
> + - Martin Zaťovič <m.zatovic1@gmail.com>
> +
> +description: |
> + Wiegand interface is a wiring standard popularized in the 1980s. To this day
> + many card readers, fingerprint readers, sensors, etc. use Wiegand interface
> + particularly for access control applications. It utilizes two wires to
> + transmit the data - D0 and D1.
> +
> + Both data lines are initially pulled up. To send a bit of value 1, the D1
> + line is set low. Similarly to send a bit of value 0, the D0 line is set low.
> +
> +properties:
> + $nodename:
> + pattern: "^wiegand(@.*|-[0-9a-f])*$"
> +
> + compatible:
> + contains:
> + const: wiegand
I think you are still making some shortcuts in design and this also
causes some misunderstanding.
If this is a bus, then there should be child device(s). But there is
none. If there is no device, how are you going to use this? Imagine now
a SPI controller without child device...
If this is a bus, then one controller implementing it might be using
GPIOs, but other one might have dedicated lines. Unless it's not
possible and all Wiegand implementations use GPIOs? It does not sound right.
> +
> + data-hi-gpios:
> + description: GPIO spec for data-hi line to use. This line is initially
> + pulled up to high value. Wiegand write of a bit of value 1 results in
> + this line being pulled down for pulse length duration.
> + maxItems: 1
> +
> + data-lo-gpios:
> + description: GPIO spec for data-lo line to use. This line is initially
> + pulled up to high value. Wiegand write of a bit of value 0 results in
> + this line being pulled down for pulse length duration.
> + maxItems: 1
> +
> + pulse-len:
> + description: length of the low pulse for both data-lo and data-hi lines.
> + maxItems: 1
> +
> + interval-len:
> + description: length of a whole bit (both the pulse and the high phase) for
> + both data-hi and data-lo lines in usecs; defaults to 2000us.
> + maxItems: 1
> +
> + frame-gap:
> + description: length of the last bit of a frame (both the pulse and the high
> + phase) in usec; defaults to 2000us.
For these properties you must use standard units.
https://github.com/devicetree-org/dt-schema/blob/main/dtschema/schemas/property-units.yaml
Best regards,
Krzysztof
next prev parent reply other threads:[~2022-10-24 22:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-24 16:26 [RFCv3 PATCH 0/2] Wiegand bus driver Martin Zaťovič
2022-10-24 16:26 ` [RFCv3 PATCH 1/2] dt-bindings: bus: add Wiegand bus dt documentation Martin Zaťovič
2022-10-24 21:12 ` Krzysztof Kozlowski [this message]
2022-10-24 16:26 ` [RFCv3 PATCH 2/2] bus: add bit banged Wiegand bus driver Martin Zaťovič
2022-10-24 21:21 ` Krzysztof Kozlowski
2022-10-25 5:38 ` Christophe JAILLET
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=07255e98-b5fe-3555-8cf8-b1e0005fd3d4@linaro.org \
--to=krzysztof.kozlowski@linaro.org \
--cc=Michael.Srba@seznam.cz \
--cc=andersson@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=elder@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=hemantk@codeaurora.org \
--cc=jeffrey.l.hugo@gmail.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=m.zatovic1@gmail.com \
--cc=mani@kernel.org \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).