Re: [PATCH v4] serio: PS/2 gpio bit banging driver for serio bus
From: Linus Walleij
Date: Mon Aug 07 2017 - 08:21:38 EST
On Wed, Aug 2, 2017 at 2:12 PM, Danilo Krummrich
> This driver provides PS/2 serio bus support by implementing bit banging
> with the GPIO API. The GPIO pins, data and clock, can be configured with
> a node in the device tree or by generic device properties (GDP).
> Writing to a device is supported as well, though it is not recommended as
> the timings to be halt given by libps2 are very tough and difficult to
> reach with bit banging. Therefore it can be configured (also in DT and
> GDP) whether the serio write function should be available for clients.
> This driver is for development purposes and not for productive use.
> However, this driver can be useful e.g. when no USB port is available or
> using old peripherals is desired as PS/2 controller chips getting rare.
> This driver was tested on RPI1 and on Hikey960 and it worked well together
> with the atkbd driver.
> Signed-off-by: Danilo Krummrich <danilokrummrich@xxxxxxxxxxxxx>
> v2: Removed one verbose print statement, changed another one to dev_dbg.
> v3: - fixed compiler warning on blackfin
> - depends on GPIOLIB
> - clarify documentation
> v4: - fixed concurrent calls to ps2_gpio_write (serio->write)
> - use gpiod API
> - use generic device properties
> - request irq separately, do not use gpiod_to_irq
> - abort when gpio is connected via slow bus
> - Fixed a bug where PS2_CMD_RESEND is always send after tx failed once.
> The makes the write functionallity work better, tough timing is still
> - disable irq initially until ps2_gpip_open (serio->open) is called
Oh there is a new version of this patch.
This is better, some review comments from my old review still