Skip to contentSkip to conversation

input: touchscreen: Remove duplicate ft6236 driver

PATCH Superseded Hans de Goede 4 participants 7 messages Aug 5, 2016 – Aug 6, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover input: touchscreen: Remove duplicate ft6236 driver

<resend with Noralf's email address fixed>

Hi All,

December 19th 2015 I noticed that a new ft6236 driver had been added to the kernel, and that it was in essence just a re-implementation of the M09 protocol from the edt-ft5x06 driver, IOW it contains 100% duplicate code. I asked the submitter and authors of the new ft6236 driver to test there devices with the edt-ft5x06 driver instead, but I got no reply.

January 26th 2016 I asked the submitter and authors of the new ft6236 driver to test with the edt-ft5x06 driver again, but again got no reply.

Note: this is likely due to my having made an error in Noralf's email address with those 2 mails (sorry), so it would be good to give Noralf some time to reply now before applying this.

Given the lack of response from the submitter / authors of the ft6236 driver I believe it is best to just remove it. I've double checked and the edt-ft5x06 driver is 100% compatible both wrt wire protocol usage, as wrt to the reset gpio usage (and the gpio name in dt).

Regards,

Hans

#1 lore raw

PATCH v3 1/1 input: touchscreen: 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.

Cc Sean Cross <[email protected]>
Cc Noralf Tr?nnes <[email protected]>
---
 drivers/input/touchscreen/Kconfig      |  13 --
 drivers/input/touchscreen/Makefile     |   1 -
 drivers/input/touchscreen/edt-ft5x06.c |   8 +
 drivers/input/touchscreen/ft6236.c     | 326 ---------------------------------
 4 files changed, 8 insertions(+), 340 deletions(-)
 delete mode 100644 drivers/input/touchscreen/ft6236.c
drivers/input/touchscreen/Kconfig +0 -13
index 64e7501..198945d 100644
@@ -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
drivers/input/touchscreen/Makefile +0 -1
index a4b00d0..a144c4e 100644
@@ -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
drivers/input/touchscreen/edt-ft5x06.c +8 -0
index d19bf45..481d8ba 100644
@@ -1071,9 +1071,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);
@@ -1084,6 +1090,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);
drivers/input/touchscreen/ft6236.c deleted +0 -326

326 lines not on this page · raw message

Signature · 1 line
2.7.4
#2 lore raw

PATCH v3 1/1 input: touchscreen: Remove duplicate ft6236 driver

Hi Hans,

Am 05.08.2016 um 09:24 schrieb Hans de Goede:

Quoted 5 lines

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.

i think only remove of the driver is incorrect here.

Since there are two similar but still different DT bindings

Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt

Documentation/devicetree/bindings/input/touchscreen/focaltech-ft6236.txt

the DT handling of edt-ft5x06.c needs to be extended and then finally driver and binding could be removed.

Regards
Stefan

maintainer
#3 lore raw

PATCH v3 1/1 input: touchscreen: Remove duplicate ft6236 driver

Quoted 11 lines · Stefan Wahren

Hi Hans,

Am 05.08.2016 um 09:24 schrieb Hans de Goede:

Quoted 5 lines

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.

i think only remove of the driver is incorrect here.

Quoted 8 lines

Since there are two similar but still different DT bindings

Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt

Documentation/devicetree/bindings/input/touchscreen/focaltech-ft6236.txt

the DT handling of edt-ft5x06.c needs to be extended and then finally driver and binding could be removed.

I believe Hans made sure edt-ft5x06.c can handle focaltech-ft6236 bindings. Do you see a discrepancy?

Thanks.

Signature · 1 line
Dmitry
#4 lore raw

PATCH v3 1/1 input: touchscreen: Remove duplicate ft6236 driver

Hi,

Quoted 16 lines · Dmitry Torokhov
Quoted 15 lines · Stefan Wahren

Hi Hans,

Am 05.08.2016 um 09:24 schrieb Hans de Goede:

Quoted 5 lines

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.

i think only remove of the driver is incorrect here.

Since there are two similar but still different DT bindings

Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt

Quoted 7 lines
Quoted 4 lines

Documentation/devicetree/bindings/input/touchscreen/focaltech-ft6236.txt

the DT handling of edt-ft5x06.c needs to be extended and then finally driver and binding could be removed.

I believe Hans made sure edt-ft5x06.c can handle focaltech-ft6236 bindings. Do you see a discrepancy?

Correct I've double checked that both the i2c protocol and the reset gpio binding are compatible. Devices using the focaltech-ft6236.txt binding should work fine with the edt-ft5x06.c driver.

Now if someone can test and confirm that on actual hardware that would be great...

And we probably want to remove Documentation/devicetree/bindings/input/touchscreen/focaltech-ft6236.txt and instead add the compatible string that defines to Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt

I can whip up a patch for that, but as said some testing on actual hw would be good, preferably before I write said patch.

Regards,

Hans

p.s.

(the v3 in the subject is bogus my bad)

#5 lore raw

PATCH v3 1/1 input: touchscreen: Remove duplicate ft6236 driver

Den 06.08.2016 12:00, skrev Hans de Goede:

Quoted 35 lines

Hi,

Quoted 16 lines · Dmitry Torokhov
Quoted 15 lines · Stefan Wahren

Hi Hans,

Am 05.08.2016 um 09:24 schrieb Hans de Goede:

Quoted 5 lines

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.

i think only remove of the driver is incorrect here.

Since there are two similar but still different DT bindings

Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt

Quoted 8 lines
Quoted 5 lines

Documentation/devicetree/bindings/input/touchscreen/focaltech-ft6236.txt

the DT handling of edt-ft5x06.c needs to be extended and then finally driver and binding could be removed.

I believe Hans made sure edt-ft5x06.c can handle focaltech-ft6236 bindings. Do you see a discrepancy?

Correct I've double checked that both the i2c protocol and the reset gpio binding are compatible. Devices using the focaltech-ft6236.txt binding should work fine with the edt-ft5x06.c driver.

Now if someone can test and confirm that on actual hardware that would be great...

Quoted 8 lines

And we probably want to remove Documentation/devicetree/bindings/input/touchscreen/focaltech-ft6236.txt and instead add the compatible string that defines to Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt

I can whip up a patch for that, but as said some testing on actual hw would be good, preferably before I write said patch.

I can confirm that this works with a ft6236.

[    1.987092] input: EP0110M09 as 

/devices/platform/soc/20804000.i2c/i2c-1/1-0038/input/input0

My display panel is broken, but the values reported by evtest looks correct. Thanks for doing this, one less driver to care about.

Maybe you could add a reference to touchscreen.txt in edt-ft5x06.txt?

Noralf.

#6 lore raw

PATCH v3 1/1 input: touchscreen: Remove duplicate ft6236 driver

In reply to Hans de Goede

Hi,

Quoted 28 lines

Hans de Goede <[email protected]> hat am 6. August 2016 um 12:00 geschrieben:

Hi,

Quoted 21 lines · Dmitry Torokhov
Quoted 19 lines · Stefan Wahren

Hi Hans,

Am 05.08.2016 um 09:24 schrieb Hans de Goede:

Quoted 5 lines

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.

i think only remove of the driver is incorrect here.

Since there are two similar but still different DT bindings

Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt

Documentation/devicetree/bindings/input/touchscreen/focaltech-ft6236.txt

the DT handling of edt-ft5x06.c needs to be extended and then finally driver and binding could be removed.

Quoted 6 lines
Quoted 2 lines

I believe Hans made sure edt-ft5x06.c can handle focaltech-ft6236 bindings. Do you see a discrepancy?

Correct I've double checked that both the i2c protocol and the reset gpio binding are compatible. Devices using the focaltech-ft6236.txt binding should work fine with the edt-ft5x06.c driver.

i missed the point about touchscreen_parse_properties() and it's properties. Sorry for the noise. Everything okay.

Quoted 9 lines

Now if someone can test and confirm that on actual hardware that would be great...

And we probably want to remove Documentation/devicetree/bindings/input/touchscreen/focaltech-ft6236.txt and instead add the compatible string that defines to Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt

That would be great.

Stefan

Quoted 14 lines

I can whip up a patch for that, but as said some testing on actual hw would be good, preferably before I write said patch.

Regards,

Hans

p.s.

(the v3 in the subject is bogus my bad)