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

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

Input: remove duplicate ft6236 driver



The new(ish) ft6236 simply re-implements the M09 protocol of the
(much) older edt-ft5x06.c driver.

This commit removes this duplicate driver and adds the i2c ids and
dt compatible string to the edt-ft5x06.c driver to keep compatibility.

This commit also adds the standard touchscreen properties as optional
properties to the edt,ft5x06 binding, these were documented in the
focaltech,ft6236 bindingi, but were missing from the edt,ft5x06 doc.

Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Acked-by: default avatarRob Herring <robh@kernel.org>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent a485cb03
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ Required properties:
           or:  "edt,edt-ft5306"
           or:  "edt,edt-ft5406"
           or:  "edt,edt-ft5506"
           or:  "focaltech,ft6236"

 - reg:         I2C slave address of the chip (0x38)
 - interrupt-parent: a phandle pointing to the interrupt controller
@@ -43,6 +44,13 @@ Optional properties:

 - offset:      allows setting the edge compensation in the range from
                0 to 31.
 - touchscreen-size-x	   : See touchscreen.txt
 - touchscreen-size-y	   : See touchscreen.txt
 - touchscreen-fuzz-x      : See touchscreen.txt
 - touchscreen-fuzz-y      : See touchscreen.txt
 - touchscreen-inverted-x  : See touchscreen.txt
 - touchscreen-inverted-y  : See touchscreen.txt
 - touchscreen-swapped-x-y : See touchscreen.txt

Example:
	polytouch: edt-ft5x06@38 {
+0 −35
Original line number Diff line number Diff line
* FocalTech FT6236 I2C touchscreen controller

Required properties:
 - compatible		  : "focaltech,ft6236"
 - reg			  : I2C slave address of the chip (0x38)
 - interrupt-parent	  : a phandle pointing to the interrupt controller
			    serving the interrupt for this chip
 - interrupts		  : interrupt specification for the touch controller
			    interrupt
 - reset-gpios		  : GPIO specification for the RSTN input
 - touchscreen-size-x	  : horizontal resolution of touchscreen (in pixels)
 - touchscreen-size-y	  : vertical resolution of touchscreen (in pixels)

Optional properties:
 - 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:

	ft6x06@38 {
		compatible = "focaltech,ft6236";
		reg = <0x38>;
		interrupt-parent = <&gpio>;
		interrupts = <23 2>;
		touchscreen-size-x = <320>;
		touchscreen-size-y = <480>;
		touchscreen-inverted-x;
		touchscreen-swapped-x-y;
	};
+0 −13
Original line number Diff line number Diff line
@@ -305,19 +305,6 @@ config TOUCHSCREEN_EGALAX_SERIAL
	  To compile this driver as a module, choose M here: the
	  module will be called egalax_ts_serial.

config TOUCHSCREEN_FT6236
	tristate "FT6236 I2C touchscreen"
	depends on I2C
	depends on GPIOLIB || COMPILE_TEST
	help
	  Say Y here to enable support for the I2C connected FT6x06 and
	  FT6x36 family of capacitive touchscreen drivers.

	  If unsure, say N.

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

config TOUCHSCREEN_FUJITSU
	tristate "Fujitsu serial touchscreen"
	select SERIO
+0 −1
Original line number Diff line number Diff line
@@ -36,7 +36,6 @@ obj-$(CONFIG_TOUCHSCREEN_ELAN) += elants_i2c.o
obj-$(CONFIG_TOUCHSCREEN_ELO)		+= elo.o
obj-$(CONFIG_TOUCHSCREEN_EGALAX)	+= egalax_ts.o
obj-$(CONFIG_TOUCHSCREEN_EGALAX_SERIAL)	+= egalax_ts_serial.o
obj-$(CONFIG_TOUCHSCREEN_FT6236)	+= ft6236.o
obj-$(CONFIG_TOUCHSCREEN_FUJITSU)	+= fujitsu_ts.o
obj-$(CONFIG_TOUCHSCREEN_GOODIX)	+= goodix.o
obj-$(CONFIG_TOUCHSCREEN_ILI210X)	+= ili210x.o
+8 −0
Original line number Diff line number Diff line
@@ -1063,9 +1063,15 @@ static const struct edt_i2c_chip_data edt_ft5506_data = {
	.max_support_points = 10,
};

static const struct edt_i2c_chip_data edt_ft6236_data = {
	.max_support_points = 2,
};

static const struct i2c_device_id edt_ft5x06_ts_id[] = {
	{ .name = "edt-ft5x06", .driver_data = (long)&edt_ft5x06_data },
	{ .name = "edt-ft5506", .driver_data = (long)&edt_ft5506_data },
	/* Note no edt- prefix for compatibility with the ft6236.c driver */
	{ .name = "ft6236", .driver_data = (long)&edt_ft6236_data },
	{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(i2c, edt_ft5x06_ts_id);
@@ -1076,6 +1082,8 @@ static const struct of_device_id edt_ft5x06_of_match[] = {
	{ .compatible = "edt,edt-ft5306", .data = &edt_ft5x06_data },
	{ .compatible = "edt,edt-ft5406", .data = &edt_ft5x06_data },
	{ .compatible = "edt,edt-ft5506", .data = &edt_ft5506_data },
	/* Note focaltech vendor prefix for compatibility with ft6236.c */
	{ .compatible = "focaltech,ft6236", .data = &edt_ft6236_data },
	{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(of, edt_ft5x06_of_match);
Loading