Re: [PATCH RFC v1 1/2] bus: add Wiegand write-only GPIO driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Martin!

Thanks for your patch!

On Thu, Jul 28, 2022 at 11:17 AM Martin Zaťovič <m.zatovic1@xxxxxxxxx> 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




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux