Skip to contentSkip to conversation

input: goodix - support Goodix gt5688

PATCH Superseded Guido Günther 2 participants 6 messages Jan 28, 2019 – Jan 29, 2019

Subsystems (5)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 input: goodix - support Goodix gt5688

Quoted 1 line

From what I've seen in vendor trees it's fine to treat this as gt1x¹.

[1]: https://github.com/TadiT7/android_kernel_mtk-4.4/tree/master/drivers/input/touchscreen/mediatek/GT5688

---
 Documentation/devicetree/bindings/input/touchscreen/goodix.txt | 1 +
 drivers/input/touchscreen/goodix.c                             | 2 ++
 2 files changed, 3 insertions(+)
Documentation/devicetree/bindings/input/touchscreen/goodix.txt +1 -0
index f7e95c52f3c7..57d3d8870a09 100644
@@ -3,6 +3,7 @@ Device tree bindings for Goodix GT9xx series touchscreen controller
 Required properties:
 
  - compatible		: Should be "goodix,gt1151"
+				 or "goodix,gt5688"
 				 or "goodix,gt911"
 				 or "goodix,gt9110"
 				 or "goodix,gt912"
drivers/input/touchscreen/goodix.c +2 -0
index f2d9c2c41885..47b1ced41576 100644
@@ -216,6 +216,7 @@ static const struct goodix_chip_data *goodix_get_chip_data(u16 id)
 {
 	switch (id) {
 	case 1151:
+	case 5688:
 		return &gt1x_chip_data;
 
 	case 911:
@@ -942,6 +943,7 @@ MODULE_DEVICE_TABLE(acpi, goodix_acpi_match);
 #ifdef CONFIG_OF
 static const struct of_device_id goodix_of_match[] = {
 	{ .compatible = "goodix,gt1151" },
+	{ .compatible = "goodix,gt5688" },
 	{ .compatible = "goodix,gt911" },
 	{ .compatible = "goodix,gt9110" },
 	{ .compatible = "goodix,gt912" },
Signature · 1 line
2.20.1
#1 lore raw
Quoted 3 lines · Guido Günther

From what I've seen in vendor trees it's fine to treat this as gt1x¹.

[1]: https://github.com/TadiT7/android_kernel_mtk-4.4/tree/master/drivers/input/touchscreen/mediatek/GT5688

Can you please point to the exact line of code that makes you say that? I'm not saying it's not compatible, but it's not the same driver that the current goodix.c was based on, or even goodix.c.

Can you please elaborate?

Finding that data in the specs would also be fine:
https://github.com/hadess/gt9xx/tree/master/specifications

Cheers

[1]: original driver:
https://github.com/hadess/gt9xx/commit/82b141220e8bce00060e0de697735d0a70af2678

Quoted 44 lines
---
 Documentation/devicetree/bindings/input/touchscreen/goodix.txt | 1 +
 drivers/input/touchscreen/goodix.c                             | 2
++
 2 files changed, 3 insertions(+)

diff --git a/Documentation/devicetree/bindings/input/touchscreen/goodix.txt b/Documentation/devicetree/bindings/input/touchscreen/goodix.txt index f7e95c52f3c7..57d3d8870a09 100644

Documentation/devicetree/bindings/input/touchscreen/goodix.txt +0 -0
@@ -3,6 +3,7 @@ Device tree bindings for Goodix GT9xx series

touchscreen controller
Required properties:

- compatible : Should be "goodix,gt1151"

Documentation/devicetree/bindings/input/touchscreen/goodix.txt +1 -0
+				 or "goodix,gt5688"
 				 or "goodix,gt911"
 				 or "goodix,gt9110"
 				 or "goodix,gt912"
drivers/input/touchscreen/goodix.c +1 -0
index f2d9c2c41885..47b1ced41576 100644
@@ -216,6 +216,7 @@ static const struct goodix_chip_data
 *goodix_get_chip_data(u16 id)
 {
 	switch (id) {
 	case 1151:
+	case 5688:
 		return &gt1x_chip_data;
 
drivers/input/touchscreen/goodix.c +1 -0
 	case 911:
@@ -942,6 +943,7 @@ MODULE_DEVICE_TABLE(acpi, goodix_acpi_match);
 #ifdef CONFIG_OF
 static const struct of_device_id goodix_of_match[] = {
 	{ .compatible = "goodix,gt1151" },
+	{ .compatible = "goodix,gt5688" },
 	{ .compatible = "goodix,gt911" },
 	{ .compatible = "goodix,gt9110" },
 	{ .compatible = "goodix,gt912" },
#2 lore raw

Hi,

Quoted 10 lines · Bastien Nocera
Quoted 3 lines · Guido Günther

From what I've seen in vendor trees it's fine to treat this as gt1x¹.

[1]: https://github.com/TadiT7/android_kernel_mtk-4.4/tree/master/drivers/input/touchscreen/mediatek/GT5688

Can you please point to the exact line of code that makes you say that? I'm not saying it's not compatible, but it's not the same driver that the current goodix.c was based on, or even goodix.c.

Can you please elaborate?

I basically looked at the registers uses for the config update:

https://github.com/TadiT7/android_kernel_mtk-4.4/blob/master/drivers/input/touchscreen/mediatek/GT5688/include/gt1x_tpd_common.h#L152
https://github.com/TadiT7/android_kernel_mtk-4.4/blob/master/drivers/input/touchscreen/mediatek/GT5688/gt1x_generic.c#L430

That and the fact that the driver is doing it's job well made me believe that's good for base support. Things like hotknot, gesture wakeup and proximity sensor will need additional work.

Quoted 2 lines

Finding that data in the specs would also be fine:
https://github.com/hadess/gt9xx/tree/master/specifications

https://github.com/hadess/gt9xx/pull/3

Cheers,
-- Guido

#3 lore raw
Quoted 15 lines · Guido Günther

Hi,

Quoted 13 lines · Bastien Nocera
Quoted 5 lines · Guido Günther

From what I've seen in vendor trees it's fine to treat this as gt1x¹.

[1]:
https://github.com/TadiT7/android_kernel_mtk-4.4/tree/master/drivers/input/touchscreen/mediatek/GT5688

Can you please point to the exact line of code that makes you say that?
I'm not saying it's not compatible, but it's not the same driver that
the current goodix.c was based on, or even goodix.c.

Quoted 6 lines
Quoted 1 line

Can you please elaborate?

I basically looked at the registers uses for the config update:

https://github.com/TadiT7/android_kernel_mtk-4.4/blob/master/drivers/input/touchscreen/mediatek/GT5688/include/gt1x_tpd_common.h#L152
https://github.com/TadiT7/android_kernel_mtk-4.4/blob/master/drivers/input/touchscreen/mediatek/GT5688/gt1x_generic.c#L430

I'm not sure that's good enough to say that the touchscreen models are compatible.

Quoted 3 lines

That and the fact that the driver is doing it's job well made me believe
that's good for base support.

If you've tested it, that's better. Can you please add a reference to the device that you've tested this on in the commit message?

Quoted 7 lines

Things like hotknot, gesture wakeup and
proximity sensor will need additional work.

Quoted 2 lines

Finding that data in the specs would also be fine:
https://github.com/hadess/gt9xx/tree/master/specifications

https://github.com/hadess/gt9xx/pull/3

Merged that, thanks

Cheers

#4 lore raw

PATCH v2 1/1 input: goodix - support Goodix gt5688

Quoted 1 line

From what I've seen in vendor trees it's fine to treat this as gt1x¹.

Tested on the Purism Librem 5 Devkit (Rocktech JH057N00900 panel).

[1]: https://github.com/TadiT7/android_kernel_mtk-4.4/tree/master/drivers/input/touchscreen/mediatek/GT5688

---
Changes from v1:
* Add tested board to commit message

 Documentation/devicetree/bindings/input/touchscreen/goodix.txt | 1 +
 drivers/input/touchscreen/goodix.c                             | 2 ++
 2 files changed, 3 insertions(+)
Documentation/devicetree/bindings/input/touchscreen/goodix.txt +1 -0
index f7e95c52f3c7..57d3d8870a09 100644
@@ -3,6 +3,7 @@ Device tree bindings for Goodix GT9xx series touchscreen controller
 Required properties:
 
  - compatible		: Should be "goodix,gt1151"
+				 or "goodix,gt5688"
 				 or "goodix,gt911"
 				 or "goodix,gt9110"
 				 or "goodix,gt912"
drivers/input/touchscreen/goodix.c +2 -0
index f2d9c2c41885..47b1ced41576 100644
@@ -216,6 +216,7 @@ static const struct goodix_chip_data *goodix_get_chip_data(u16 id)
 {
 	switch (id) {
 	case 1151:
+	case 5688:
 		return &gt1x_chip_data;
 
 	case 911:
@@ -942,6 +943,7 @@ MODULE_DEVICE_TABLE(acpi, goodix_acpi_match);
 #ifdef CONFIG_OF
 static const struct of_device_id goodix_of_match[] = {
 	{ .compatible = "goodix,gt1151" },
+	{ .compatible = "goodix,gt5688" },
 	{ .compatible = "goodix,gt911" },
 	{ .compatible = "goodix,gt9110" },
 	{ .compatible = "goodix,gt912" },
Signature · 1 line
2.20.1
Reviewed-by on v2 1/1
#5 lore raw
Quoted 7 lines · Guido Günther

From what I've seen in vendor trees it's fine to treat this as gt1x¹. Tested on the Purism Librem 5 Devkit (Rocktech JH057N00900 panel).

[1]:
https://github.com/TadiT7/android_kernel_mtk-4.4/tree/master/drivers/input/touchscreen/mediatek/GT5688

Not super fond of the casual commit message, but the code and explanation are fine.

Quoted 46 lines

---
Changes from v1:
* Add tested board to commit message

 Documentation/devicetree/bindings/input/touchscreen/goodix.txt | 1 +
 drivers/input/touchscreen/goodix.c                             | 2
++
 2 files changed, 3 insertions(+)

diff --git a/Documentation/devicetree/bindings/input/touchscreen/goodix.txt b/Documentation/devicetree/bindings/input/touchscreen/goodix.txt index f7e95c52f3c7..57d3d8870a09 100644

Documentation/devicetree/bindings/input/touchscreen/goodix.txt +0 -0
@@ -3,6 +3,7 @@ Device tree bindings for Goodix GT9xx series

touchscreen controller
Required properties:

- compatible : Should be "goodix,gt1151"

Documentation/devicetree/bindings/input/touchscreen/goodix.txt +1 -0
+				 or "goodix,gt5688"
 				 or "goodix,gt911"
 				 or "goodix,gt9110"
 				 or "goodix,gt912"
drivers/input/touchscreen/goodix.c +1 -0
index f2d9c2c41885..47b1ced41576 100644
@@ -216,6 +216,7 @@ static const struct goodix_chip_data
 *goodix_get_chip_data(u16 id)
 {
 	switch (id) {
 	case 1151:
+	case 5688:
 		return &gt1x_chip_data;
 
drivers/input/touchscreen/goodix.c +1 -0
 	case 911:
@@ -942,6 +943,7 @@ MODULE_DEVICE_TABLE(acpi, goodix_acpi_match);
 #ifdef CONFIG_OF
 static const struct of_device_id goodix_of_match[] = {
 	{ .compatible = "goodix,gt1151" },
+	{ .compatible = "goodix,gt5688" },
 	{ .compatible = "goodix,gt911" },
 	{ .compatible = "goodix,gt9110" },
 	{ .compatible = "goodix,gt912" },