[PATCHv2 0/4] Wiegand bus driver and GPIO bit-banged controller

From: Martin Zaťovič
Date: Thu Feb 02 2023 - 09:33:27 EST


Hello,

Thank you for your feedback on the last version.

I came to a realization, that it is for the best to let message
formats and checksum calculation be handled by device drivers.
Support of these options was removed from the bus driver.

The GPIO bitbanging controller driver contained two attribute
files - format and payload_len. The format file is obviously not
needed anymore, however I have decided to keep the payload_len
file. It seems to me to be the best way to communicate this
information to the controller driver. This information needs
to be provided especially in order for the /dev file to work
properly(as the driver has no idea where the message ends). If
there is a better way to approach this problem, please let me
know.

Device drivers will not face the same problem, as the length of
a message is passed with every call of the transfer_message()
function.

CHANGELOG since v1:
- added dt-bindings for wiegand_gpio driver
- dt_binding_check now passes
- added help texts to Kconfig files
- removed controller list from bus driver
- removed the option to add a device from another driver (along
with wiegand_baord_info structure)
- moved the bus driver to drivers/wiegand/
- removed all explicit castings, used specific getters instead
- fixed indentation
- removed fromat attribute from controller structure
- removed format implementation from wiegand_gpio driver

Martin Zaťovič (4):
dt-bindings: wiegand: add Wiegand controller common properties
wiegand: add Wiegand bus driver
dt-bindings: wiegand: add GPIO bitbanged Wiegand documentation
wiegand: add Wiegand GPIO bit-banged controller driver

.../ABI/testing/sysfs-driver-wiegand-gpio | 9 +
.../bindings/wiegand/wiegand-controller.yaml | 50 ++
.../bindings/wiegand/wiegand-gpio.yaml | 51 ++
MAINTAINERS | 14 +
drivers/Kconfig | 2 +
drivers/Makefile | 1 +
drivers/wiegand/Kconfig | 28 +
drivers/wiegand/Makefile | 2 +
drivers/wiegand/wiegand-gpio.c | 324 +++++++++++
drivers/wiegand/wiegand.c | 543 ++++++++++++++++++
include/linux/wiegand.h | 177 ++++++
11 files changed, 1201 insertions(+)
create mode 100644 Documentation/ABI/testing/sysfs-driver-wiegand-gpio
create mode 100644 Documentation/devicetree/bindings/wiegand/wiegand-controller.yaml
create mode 100644 Documentation/devicetree/bindings/wiegand/wiegand-gpio.yaml
create mode 100644 drivers/wiegand/Kconfig
create mode 100644 drivers/wiegand/Makefile
create mode 100644 drivers/wiegand/wiegand-gpio.c
create mode 100644 drivers/wiegand/wiegand.c
create mode 100644 include/linux/wiegand.h

--
2.39.1