[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMRc=MfogAnGPL7BQp6r9_BpnJPPQ=DunqErfLrn2Ci960c=sg@mail.gmail.com>
Date: Wed, 12 Oct 2022 14:16:08 +0200
From: Bartosz Golaszewski <brgl@...ev.pl>
To: Martin Zaťovič <m.zatovic1@...il.com>
Cc: robh+dt@...nel.org, krzysztof.kozlowski+dt@...aro.org,
linus.walleij@...aro.org, gregkh@...uxfoundation.org,
jeffrey.l.hugo@...il.com, andersson@...nel.org,
Michael.Srba@...nam.cz, saravanak@...gle.com, mani@...nel.org,
hemantk@...eaurora.org, linux-kernel@...r.kernel.org,
devicetree@...r.kernel.org, linux-gpio@...r.kernel.org
Subject: Re: [RFCv2 PATCH 4/4] gpio: add Wiegand GPIO driver
On Wed, Oct 5, 2022 at 4:58 PM Martin Zaťovič <m.zatovic1@...il.com> wrote:
>
> Wiegand GPIO driver uses GPIO lines defined in the devicetree to
> transmit data following the Wiegand protocol.
>
> Signed-off-by: Martin Zaťovič <m.zatovic1@...il.com>
> ---
[snip]
> +
> +DEVICE_ATTR_RW(pulse_len);
> +DEVICE_ATTR_RW(interval_len);
> +DEVICE_ATTR_RW(frame_gap);
> +DEVICE_ATTR_RW(format);
> +DEVICE_ATTR_RW(payload_len);
> +
We don't really allow GPIO drivers to define all kinds of custom
device attributes. Also: this driver does not register a GPIO provider
- rather it's a GPIO consumer.
For what you're trying to achieve: have you tried using libgpiod and
controlling the lines from user-space? If that's too slow, then I'd
say this driver should go somewhere else. Maybe you'd need a whole new
protocol sub-system for that. In any case - this subsystem is not the
right place.
Bartosz
[snip]
Powered by blists - more mailing lists