Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1716472 > unrolled thread

[PATCH v8 0/2] serio: PS/2 gpio bit banging driver for serio bus

Started byDanilo Krummrich <danilokrummrich@dk-develop.de>
First post2017-08-21 15:40 +0200
Last post2017-08-21 21:30 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH v8 0/2] serio: PS/2 gpio bit banging driver for serio bus Danilo Krummrich <danilokrummrich@dk-develop.de> - 2017-08-21 15:40 +0200
    [PATCH v8 2/2] dt-bindings: new binding for ps/2 gpio devices Danilo Krummrich <danilokrummrich@dk-develop.de> - 2017-08-21 15:50 +0200
      Re: [PATCH v8 2/2] dt-bindings: new binding for ps/2 gpio devices Rob Herring <robh@kernel.org> - 2017-08-21 21:30 +0200

#1716472 — [PATCH v8 0/2] serio: PS/2 gpio bit banging driver for serio bus

FromDanilo Krummrich <danilokrummrich@dk-develop.de>
Date2017-08-21 15:40 +0200
Subject[PATCH v8 0/2] serio: PS/2 gpio bit banging driver for serio bus
Message-ID<ugV5U-4XE-47@gated-at.bofh.it>
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
      critical.
    - disable irq initially until ps2_gpip_open (serio->open) is called
v5: Checked again why timings are that hard to reach while in tx mode and·
    discovered that there is an extra clock pulse between stop bit sent from
    host and acknowledgement from device. By just skipping this clock pulse
    tx works fine now, though it still happens sometimes that the timing can·
    not be reached of course.
v6: - fixed typos
    - use of_match_ptr
v7: remove unnecessary barriers
v8: - split patch to have a separate one for the dt binding
    - remove ps2-gpio prefix in binding

Danilo Krummrich (2):
  serio: PS/2 gpio bit banging driver for serio bus
  dt-bindings: new binding for ps/2 gpio devices

 .../devicetree/bindings/serio/ps2-gpio.txt         |  22 +
 Documentation/gpio/drivers-on-gpio.txt             |   5 +
 drivers/input/serio/Kconfig                        |  11 +
 drivers/input/serio/Makefile                       |   1 +
 drivers/input/serio/ps2-gpio.c                     | 453 +++++++++++++++++++++
 5 files changed, 492 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/serio/ps2-gpio.txt
 create mode 100644 drivers/input/serio/ps2-gpio.c

--
2.14.1

[toc] | [next] | [standalone]


#1716493 — [PATCH v8 2/2] dt-bindings: new binding for ps/2 gpio devices

FromDanilo Krummrich <danilokrummrich@dk-develop.de>
Date2017-08-21 15:50 +0200
Subject[PATCH v8 2/2] dt-bindings: new binding for ps/2 gpio devices
Message-ID<ugVfA-50U-15@gated-at.bofh.it>
In reply to#1716472
The PS/2 gpio device binding defines the gpio pins (data and clock)
as well as the interrupt which should be used to drive the ps/2 bus.
It is expected to get an interrupt on the falling edge of the clock
line.

Also it can be configured whether the host should support writing to
the device.

Signed-off-by: Danilo Krummrich <danilokrummrich@dk-develop.de>
---
 .../devicetree/bindings/serio/ps2-gpio.txt         | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/serio/ps2-gpio.txt

diff --git a/Documentation/devicetree/bindings/serio/ps2-gpio.txt b/Documentation/devicetree/bindings/serio/ps2-gpio.txt
new file mode 100644
index 000000000000..83e05ea05883
--- /dev/null
+++ b/Documentation/devicetree/bindings/serio/ps2-gpio.txt
@@ -0,0 +1,22 @@
+Device-Tree binding for ps/2 gpio device
+
+Required properties:
+	- compatible = "ps2-gpio"
+	- gpios: data and clock gpio
+	- interrupts: Should trigger on the falling edge of the clock line.
+
+Optional properties:
+	- write-enable: Indicates whether write function is provided
+	to serio device. Possibly providing the write fn will not work, because
+	of the tough timing requirements.
+
+Example nodes:
+
+ps2@0 {
+	compatible = "ps2-gpio";
+	interrupt-parent = <&gpio>;
+	interrupts = <23 IRQ_TYPE_EDGE_FALLING>;
+	data-gpios = <&gpio 24 GPIO_ACTIVE_HIGH>;
+	clk-gpios = <&gpio 23 GPIO_ACTIVE_HIGH>;
+	write-enable;
+};
-- 
2.14.1

[toc] | [prev] | [next] | [standalone]


#1716807 — Re: [PATCH v8 2/2] dt-bindings: new binding for ps/2 gpio devices

FromRob Herring <robh@kernel.org>
Date2017-08-21 21:30 +0200
SubjectRe: [PATCH v8 2/2] dt-bindings: new binding for ps/2 gpio devices
Message-ID<uh0yC-8qw-43@gated-at.bofh.it>
In reply to#1716493
On Mon, Aug 21, 2017 at 8:31 AM, Danilo Krummrich
<danilokrummrich@dk-develop.de> wrote:
> The PS/2 gpio device binding defines the gpio pins (data and clock)
> as well as the interrupt which should be used to drive the ps/2 bus.
> It is expected to get an interrupt on the falling edge of the clock
> line.
>
> Also it can be configured whether the host should support writing to
> the device.
>
> Signed-off-by: Danilo Krummrich <danilokrummrich@dk-develop.de>
> ---
>  .../devicetree/bindings/serio/ps2-gpio.txt         | 22 ++++++++++++++++++++++
>  1 file changed, 22 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/serio/ps2-gpio.txt
>
> diff --git a/Documentation/devicetree/bindings/serio/ps2-gpio.txt b/Documentation/devicetree/bindings/serio/ps2-gpio.txt
> new file mode 100644
> index 000000000000..83e05ea05883
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/serio/ps2-gpio.txt
> @@ -0,0 +1,22 @@
> +Device-Tree binding for ps/2 gpio device
> +
> +Required properties:
> +       - compatible = "ps2-gpio"
> +       - gpios: data and clock gpio

Doesn't match the example.

> +       - interrupts: Should trigger on the falling edge of the clock line.
> +
> +Optional properties:
> +       - write-enable: Indicates whether write function is provided
> +       to serio device. Possibly providing the write fn will not work, because
> +       of the tough timing requirements.
> +
> +Example nodes:
> +
> +ps2@0 {
> +       compatible = "ps2-gpio";
> +       interrupt-parent = <&gpio>;
> +       interrupts = <23 IRQ_TYPE_EDGE_FALLING>;
> +       data-gpios = <&gpio 24 GPIO_ACTIVE_HIGH>;
> +       clk-gpios = <&gpio 23 GPIO_ACTIVE_HIGH>;
> +       write-enable;
> +};
> --
> 2.14.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe devicetree" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web