Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a93ad65d authored by Hans de Goede's avatar Hans de Goede Committed by Dmitry Torokhov
Browse files

Input: add support for ChipOne icn8318 based touchscreens



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: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent d16a33bb
Loading
Loading
Loading
Loading
+46 −0
Original line number Diff line number Diff line
* 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;
	};

	/* ... */
};
+1 −0
Original line number Diff line number Diff line
@@ -37,6 +37,7 @@ capella Capella Microsystems, Inc
cavium	Cavium, Inc.
cdns	Cadence Design Systems Inc.
chipidea	Chipidea, Inc
chipone		ChipOne
chipspark	ChipSPARK
chrp	Common Hardware Reference Platform
chunghwa	Chunghwa Picture Tubes Ltd.
+7 −0
Original line number Diff line number Diff line
@@ -2523,6 +2523,13 @@ L: linux-usb@vger.kernel.org
S:	Maintained
F:	drivers/usb/chipidea/

CHIPONE ICN8318 I2C TOUCHSCREEN DRIVER
M:	Hans de Goede <hdegoede@redhat.com>
L:	linux-input@vger.kernel.org
S:	Maintained
F:	Documentation/devicetree/bindings/input/touchscreen/chipone_icn8318.txt
F:	drivers/input/touchscreen/chipone_icn8318.c

CHROME HARDWARE PLATFORM SUPPORT
M:	Olof Johansson <olof@lixom.net>
S:	Maintained
+13 −0
Original line number Diff line number Diff line
@@ -140,6 +140,19 @@ config TOUCHSCREEN_BU21013
	  To compile this driver as a module, choose M here: the
	  module will be called bu21013_ts.

config TOUCHSCREEN_CHIPONE_ICN8318
	tristate "chipone icn8318 touchscreen controller"
	depends on GPIOLIB
	depends on I2C
	depends on OF
	help
	  Say Y here if you have a ChipOne icn8318 based I2C touchscreen.

	  If unsure, say N.

	  To compile this driver as a module, choose M here: the
	  module will be called chipone_icn8318.

config TOUCHSCREEN_CY8CTMG110
	tristate "cy8ctmg110 touchscreen"
	depends on I2C
+1 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@ obj-$(CONFIG_TOUCHSCREEN_AR1021_I2C) += ar1021_i2c.o
obj-$(CONFIG_TOUCHSCREEN_ATMEL_MXT)	+= atmel_mxt_ts.o
obj-$(CONFIG_TOUCHSCREEN_AUO_PIXCIR)	+= auo-pixcir-ts.o
obj-$(CONFIG_TOUCHSCREEN_BU21013)	+= bu21013_ts.o
obj-$(CONFIG_TOUCHSCREEN_CHIPONE_ICN8318)	+= chipone_icn8318.o
obj-$(CONFIG_TOUCHSCREEN_CY8CTMG110)	+= cy8ctmg110_ts.o
obj-$(CONFIG_TOUCHSCREEN_CYTTSP_CORE)	+= cyttsp_core.o
obj-$(CONFIG_TOUCHSCREEN_CYTTSP_I2C)	+= cyttsp_i2c.o cyttsp_i2c_common.o
Loading