[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACRpkdbD1qzJujhq-U0UN0tWam9CaoLvVuAQfafq4XNaEdZ2QA@mail.gmail.com>
Date: Mon, 22 Aug 2022 09:14:38 +0200
From: Linus Walleij <linus.walleij@...aro.org>
To: Martin Zaťovič <m.zatovic1@...il.com>
Cc: linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
mani@...nel.org, hemantk@...eaurora.org, elder@...aro.org,
f.fainelli@...il.com, Michael.Srba@...nam.cz,
jeffrey.l.hugo@...il.com, gregkh@...uxfoundation.org,
bjorn.andersson@...aro.org, saravanak@...gle.com,
krzysztof.kozlowski+dt@...aro.org, robh+dt@...nel.org
Subject: Re: [PATCH RFC v1 1/2] bus: add Wiegand write-only GPIO driver
Hi Martin!
Thanks for your patch!
On Thu, Jul 28, 2022 at 11:17 AM Martin Zaťovič <m.zatovic1@...il.com> wrote:
> Wiegand is a communication protocol that is still widely used
> especially for access control applications. It utilizes two wires to
> transmit data - D0 and D1, the generic names of which are data-lo and
> data-hi.
So the driver provides Wiegand GPIO, if you want to provide
generic Wiegand infrastructure (for other things than GPIO
as well) then that should indeed be in drivers/bus.
However then you should provide an API for random WIegand
drivers, such as the now baked-in GPIO driver, so I think
what you want to achieve is:
1. A wiegand bus transport driver in drives/bus
2. A wiegand abstract API in include/linux/wiegand.h
3. A GPIO driver on top of the wiegand bus in
drivers/gpio/wiegand-gpio.c that uses <linux/wiegand.h>
How does this sound?
I don't know how a wiegand device driver API would look
but there are several examples in other subsystems and
buses then the wiegand specifics need to be accounted for.
Yours,
Linus Walleij
Powered by blists - more mailing lists