Input: add support for ChipOne icn8318 based touchscreens
authorHans de Goede <hdegoede@redhat.com>
Sun, 22 Mar 2015 03:40:45 +0000 (20:40 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 24 Mar 2015 18:27:52 +0000 (11:27 -0700)
The ChipOne icn8318 is an i2c capacitive touchscreen controller typically
used in cheap android tablets, this commit adds a driver for it.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Documentation/devicetree/bindings/input/touchscreen/chipone_icn8318.txt [new file with mode: 0644]
Documentation/devicetree/bindings/vendor-prefixes.txt
MAINTAINERS
drivers/input/touchscreen/Kconfig
drivers/input/touchscreen/Makefile
drivers/input/touchscreen/chipone_icn8318.c [new file with mode: 0644]

diff --git a/Documentation/devicetree/bindings/input/touchscreen/chipone_icn8318.txt b/Documentation/devicetree/bindings/input/touchscreen/chipone_icn8318.txt
new file mode 100644 (file)
index 0000000..d11f8d6
--- /dev/null
@@ -0,0 +1,46 @@
+* ChipOne icn8318 I2C touchscreen controller
+
+Required properties:
+ - compatible            : "chipone,icn8318"
+ - 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 icn8318 interrupt
+ - wake-gpios            : GPIO specification for the WAKE input
+ - touchscreen-size-x    : horizontal resolution of touchscreen (in pixels)
+ - touchscreen-size-y    : vertical resolution of touchscreen (in pixels)
+
+Optional properties:
+ - pinctrl-names         : should be "default"
+ - pinctrl-0:            : a phandle pointing to the pin settings for the
+                           control gpios
+ - 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
+
+Example:
+
+i2c@00000000 {
+       /* ... */
+
+       chipone_icn8318@40 {
+               compatible = "chipone,icn8318";
+               reg = <0x40>;
+               interrupt-parent = <&pio>;
+               interrupts = <9 IRQ_TYPE_EDGE_FALLING>; /* EINT9 (PG9) */
+               pinctrl-names = "default";
+               pinctrl-0 = <&ts_wake_pin_p66>;
+               wake-gpios = <&pio 1 3 GPIO_ACTIVE_HIGH>; /* PB3 */
+               touchscreen-size-x = <800>;
+               touchscreen-size-y = <480>;
+               touchscreen-inverted-x;
+               touchscreen-swapped-x-y;
+       };
+
+       /* ... */
+};
diff --cc MAINTAINERS
Simple merge
Simple merge
Simple merge