Re: [PATCH v1] Add support for the ektf2127 touchscreencontroller

Rob Herring
2016-07-05T16:14:39Z

> From: Siebren Vroegindeweij <siebren.vroegindeweij@hotmail.com>
>
> The ELAN eKTF2127 driver is written for the ELAN series of
> touchscreencontrollers. This version is especially written for the
space ^

> eKTF2127 controller. The driver communicates to the controller over i2c.
> The additional screen specifications can be read from the devicetree file.
> The driver has also the ability to read the screen height and width from
> the controller. When the screen is pressed, a interrupt is generated.
> The interrupt wil be handled by a function that request a data string from
> the controller. This string is then modified so that the right number of touches
> and their x and y coordinates are available and given to userspace through
> the input subsystem.
>
> Signed-off-by: Michel Verlaan <michel.verl@gmail.com>
> Signed-off-by: Siebren Vroegindeweij <siebren.vroegindeweij@hotmail.com>
> ---
> .../bindings/input/touchscreen/ektf2127.txt | 40 +++
> drivers/input/touchscreen/Kconfig | 11 +
> drivers/input/touchscreen/Makefile | 1 +
> drivers/input/touchscreen/ektf2127.c | 351 +++++++++++++++++++++
> 4 files changed, 403 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/input/touchscreen/ektf2127.txt
> create mode 100644 drivers/input/touchscreen/ektf2127.c
>
> diff --git a/Documentation/devicetree/bindings/input/touchscreen/ektf2127.txt b/Documentation/devicetree/bindings/input/touchscreen/ektf2127.txt
> new file mode 100644
> index 0000000..a774336
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/input/touchscreen/ektf2127.txt
> @@ -0,0 +1,40 @@
> +* Elan eKTF2127 I2C touchscreen controller
> +
> +Required properties:
> + - compatible : "elan,ektf2127"
> + - reg : I2C slave address of the chip (0x40)
> + - interrupt-parent : a phandle pointing to the interrupt controller
> + serving the interrupt for this chip
> + - interrupts : interrupt specification for the eKTF2127 interrupt
> + - wake-gpios : GPIO specification for the WAKE input

Please state the active state and make it clear this is input to the
touch controller (or host?).

> +
> +Optional properties:
> + - touchscreen-size-x : horizontal resolution of touchscreen (in pixels)
> + - touchscreen-size-y : vertical resolution of touchscreen (in pixels)
> + - touchscreen-fuzz-x : horizontal noise value of the absolute input
> + device (in pixels)
> + - touchscreen-fuzz-y : vertical noise value of the absolute input
> + device (in pixels)
> + - touchscreen-inverted-x : X axis is inverted (boolean)
> + - touchscreen-inverted-y : Y axis is inverted (boolean)
> + - touchscreen-swapped-x-y : X and Y axis are swapped (boolean)
> + Swapping is done after inverting the axis

Just state "See touchscreen.txt" for each of these.

> +
> +Example:
> +
> +i2c@00000000 {
> +
> + ektf2127: touchscreen@40 {
> + compatible = "elan,ektf2127";
> + reg = <0x40>;
> + interrupt-parent = <&pio>;
> + interrupts = <6 11 IRQ_TYPE_EDGE_FALLING>
> + /* pinctrl-names = "default";
> + pinctrl-0 = <&ts_wake_pin_p66>; */

Not documented.

> + power-gpios = <&pio 1 3 GPIO_ACTIVE_HIGH>;

Not documented.

> + touchscreen-inverted-x;
> + touchscreen-swapped-x-y;
> + };
> +
> +};
> +