Mageia Bugzilla – Attachment 10019 Details for
Bug 22703
Add support for goodix tablet for chuwi hi13 tablet
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
[patch]
Patch to be applied to mageia to make goodix tablet work
input-touchscreen-goodix.patch (text/plain), 1.61 KB, created by
Joseph Wang
on 2018-03-04 17:45:43 CET
(
hide
)
Description:
Patch to be applied to mageia to make goodix tablet work
Filename:
MIME Type:
Creator:
Joseph Wang
Created:
2018-03-04 17:45:43 CET
Size:
1.61 KB
patch
obsolete
>diff --git a/drivers/input/touchscreen/goodix.c b/drivers/input/touchscreen/goodix.c >index 69d0b8cbc..a2947097f 100644 >--- a/drivers/input/touchscreen/goodix.c >+++ b/drivers/input/touchscreen/goodix.c >@@ -7,6 +7,9 @@ > * This code is based on gt9xx.c authored by andrew@goodix.com: > * > * 2010 - 2012 Goodix Technology. >+ * >+ * see https://github.com/nexus511/gpd-ubuntu-packages/issues/10 >+ * see https://bugs.launchpad.net/ubuntu/+source/linux-hwe/+bug/1746027 > */ > > /* >@@ -878,8 +881,10 @@ static int __maybe_unused goodix_suspend(struct device *dev) > int error; > > /* We need gpio pins to suspend/resume */ >- if (!ts->gpiod_int || !ts->gpiod_rst) >+ if (!ts->gpiod_int || !ts->gpiod_rst) { >+ disable_irq(client->irq); > return 0; >+ } > > wait_for_completion(&ts->firmware_loading_complete); > >@@ -919,8 +924,10 @@ static int __maybe_unused goodix_resume(struct device *dev) > struct goodix_ts_data *ts = i2c_get_clientdata(client); > int error; > >- if (!ts->gpiod_int || !ts->gpiod_rst) >+ if (!ts->gpiod_int || !ts->gpiod_rst) { >+ enable_irq(client->irq); > return 0; >+ } > > /* > * Exit sleep mode by outputting HIGH level to INT pin >@@ -947,6 +954,7 @@ static SIMPLE_DEV_PM_OPS(goodix_pm_ops, goodix_suspend, goodix_resume); > > static const struct i2c_device_id goodix_ts_id[] = { > { "GDIX1001:00", 0 }, >+ { "GDIX1002:00", 0 }, > { } > }; > MODULE_DEVICE_TABLE(i2c, goodix_ts_id); >@@ -954,6 +962,7 @@ MODULE_DEVICE_TABLE(i2c, goodix_ts_id); > #ifdef CONFIG_ACPI > static const struct acpi_device_id goodix_acpi_match[] = { > { "GDIX1001", 0 }, >+ { "GDIX1002", 0 }, > { } > }; > MODULE_DEVICE_TABLE(acpi, goodix_acpi_match);
diff --git a/drivers/input/touchscreen/goodix.c b/drivers/input/touchscreen/goodix.c index 69d0b8cbc..a2947097f 100644 --- a/drivers/input/touchscreen/goodix.c +++ b/drivers/input/touchscreen/goodix.c @@ -7,6 +7,9 @@ * This code is based on gt9xx.c authored by andrew@goodix.com: * * 2010 - 2012 Goodix Technology. + * + * see https://github.com/nexus511/gpd-ubuntu-packages/issues/10 + * see https://bugs.launchpad.net/ubuntu/+source/linux-hwe/+bug/1746027 */ /* @@ -878,8 +881,10 @@ static int __maybe_unused goodix_suspend(struct device *dev) int error; /* We need gpio pins to suspend/resume */ - if (!ts->gpiod_int || !ts->gpiod_rst) + if (!ts->gpiod_int || !ts->gpiod_rst) { + disable_irq(client->irq); return 0; + } wait_for_completion(&ts->firmware_loading_complete); @@ -919,8 +924,10 @@ static int __maybe_unused goodix_resume(struct device *dev) struct goodix_ts_data *ts = i2c_get_clientdata(client); int error; - if (!ts->gpiod_int || !ts->gpiod_rst) + if (!ts->gpiod_int || !ts->gpiod_rst) { + enable_irq(client->irq); return 0; + } /* * Exit sleep mode by outputting HIGH level to INT pin @@ -947,6 +954,7 @@ static SIMPLE_DEV_PM_OPS(goodix_pm_ops, goodix_suspend, goodix_resume); static const struct i2c_device_id goodix_ts_id[] = { { "GDIX1001:00", 0 }, + { "GDIX1002:00", 0 }, { } }; MODULE_DEVICE_TABLE(i2c, goodix_ts_id); @@ -954,6 +962,7 @@ MODULE_DEVICE_TABLE(i2c, goodix_ts_id); #ifdef CONFIG_ACPI static const struct acpi_device_id goodix_acpi_match[] = { { "GDIX1001", 0 }, + { "GDIX1002", 0 }, { } }; MODULE_DEVICE_TABLE(acpi, goodix_acpi_match);
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 22703
: 10019