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

Message ID 20230202143305.21789-1-m.zatovic1@gmail.com
Headers
Series Wiegand bus driver and GPIO bit-banged controller |

Message

Martin Zaťovič Feb. 2, 2023, 2:33 p.m. UTC
  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
  

Comments

Linus Walleij Feb. 2, 2023, 10:20 p.m. UTC | #1
Hi Martin,

the whole patch set looks very sensible to me, I see there is still some
DT binding things to fix (it is a somewhat moving target, so expected)
but the whole design looks very sound to me, so from a GPIO point
of view (which is a minor thing though):
Acked-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij