lkml.org 
[lkml]   [2022]   [Aug]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [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@gmail.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

\
 
 \ /
  Last update: 2022-08-22 09:16    [W:0.116 / U:0.664 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site