summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorgituser2023-02-26 12:40:28 +0100
committergituser2023-02-26 12:42:14 +0100
commitab11261fa2f4e97d0fe0235559b85373afa3121c (patch)
tree9354aba92a93af9accf14bec1d4e4b846a70e48e
parent04e6ee2995f7de094e71df6a62135d3f7e638ecf (diff)
downloadaur-goodix-gpdwin3-dkms.tar.gz
update to 6.2.1
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD4
-rw-r--r--goodix.c24
3 files changed, 21 insertions, 11 deletions
diff --git a/.SRCINFO b/.SRCINFO
index f7d42faf798d..7d5b85620659 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = goodix-gpdwin3-dkms
pkgdesc = Patched Goodix touchscreen driver for GPD WIN3
- pkgver = 6.1.10
+ pkgver = 6.2.1
pkgrel = 1
arch = any
license = GPL2
@@ -11,7 +11,7 @@ pkgbase = goodix-gpdwin3-dkms
source = dkms.conf
source = Makefile
source = goodixgpdw3.conf
- md5sums = fb2bfa2649ad0f24095bb138ea33637e
+ md5sums = c0e99fdd6b2778ad43cf7a03a6063cb6
md5sums = aec7f644a9a305c4102665137c7f248b
md5sums = 190deba40c822b9d4f89672bc4e610e9
md5sums = f514c2a1d6de0f50ea5ebc112447ff7d
diff --git a/PKGBUILD b/PKGBUILD
index 5d7e5aff9c87..5ccf81ec3153 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
_pkgbase=goodix-gpdwin3
pkgname=${_pkgbase}-dkms
-pkgver=6.1.10
+pkgver=6.2.1
pkgrel=1
pkgdesc="Patched Goodix touchscreen driver for GPD WIN3"
arch=('any')
@@ -16,7 +16,7 @@ source=(
"Makefile"
"goodixgpdw3.conf"
)
-md5sums=('fb2bfa2649ad0f24095bb138ea33637e'
+md5sums=('c0e99fdd6b2778ad43cf7a03a6063cb6'
'aec7f644a9a305c4102665137c7f248b'
'190deba40c822b9d4f89672bc4e610e9'
'f514c2a1d6de0f50ea5ebc112447ff7d'
diff --git a/goodix.c b/goodix.c
index 17c5f8ca3419..df5432f748b3 100644
--- a/goodix.c
+++ b/goodix.c
@@ -1176,6 +1176,7 @@ static int goodix_configure_dev(struct goodix_ts_data *ts)
input_set_abs_params(ts->input_dev, ABS_MT_WIDTH_MAJOR, 0, 255, 0, 0);
input_set_abs_params(ts->input_dev, ABS_MT_TOUCH_MAJOR, 0, 255, 0, 0);
+retry_read_config:
/* Read configuration and apply touchscreen parameters */
goodix_read_config(ts);
@@ -1183,6 +1184,16 @@ static int goodix_configure_dev(struct goodix_ts_data *ts)
touchscreen_parse_properties(ts->input_dev, true, &ts->prop);
if (!ts->prop.max_x || !ts->prop.max_y || !ts->max_touch_num) {
+ if (!ts->reset_controller_at_probe &&
+ ts->irq_pin_access_method != IRQ_PIN_ACCESS_NONE) {
+ dev_info(&ts->client->dev, "Config not set, resetting controller\n");
+ /* Retry after a controller reset */
+ ts->reset_controller_at_probe = true;
+ error = goodix_reset(ts);
+ if (error)
+ return error;
+ goto retry_read_config;
+ }
dev_err(&ts->client->dev,
"Invalid config (%d, %d, %d), using defaults\n",
ts->prop.max_x, ts->prop.max_y, ts->max_touch_num);
@@ -1289,8 +1300,7 @@ static void goodix_disable_regulators(void *arg)
regulator_disable(ts->avdd28);
}
-static int goodix_ts_probe(struct i2c_client *client,
- const struct i2c_device_id *id)
+static int goodix_ts_probe(struct i2c_client *client)
{
#ifdef CONFIG_ACPI
const struct dmi_system_id *dmi_match = dmi_first_match(need_gpio_mapping);
@@ -1423,7 +1433,7 @@ static void goodix_ts_remove(struct i2c_client *client)
wait_for_completion(&ts->firmware_loading_complete);
}
-static int __maybe_unused goodix_suspend(struct device *dev)
+static int goodix_suspend(struct device *dev)
{
struct i2c_client *client = to_i2c_client(dev);
struct goodix_ts_data *ts = i2c_get_clientdata(client);
@@ -1470,7 +1480,7 @@ static int __maybe_unused goodix_suspend(struct device *dev)
return 0;
}
-static int __maybe_unused goodix_resume(struct device *dev)
+static int goodix_resume(struct device *dev)
{
struct i2c_client *client = to_i2c_client(dev);
struct goodix_ts_data *ts = i2c_get_clientdata(client);
@@ -1519,7 +1529,7 @@ static int __maybe_unused goodix_resume(struct device *dev)
return 0;
}
-static SIMPLE_DEV_PM_OPS(goodix_pm_ops, goodix_suspend, goodix_resume);
+static DEFINE_SIMPLE_DEV_PM_OPS(goodix_pm_ops, goodix_suspend, goodix_resume);
static const struct i2c_device_id goodix_ts_id[] = {
{ "GDIX1001:00", 0 },
@@ -1558,14 +1568,14 @@ MODULE_DEVICE_TABLE(of, goodix_of_match);
#endif
static struct i2c_driver goodix_ts_driver = {
- .probe = goodix_ts_probe,
+ .probe_new = goodix_ts_probe,
.remove = goodix_ts_remove,
.id_table = goodix_ts_id,
.driver = {
.name = "Goodix-TS",
.acpi_match_table = ACPI_PTR(goodix_acpi_match),
.of_match_table = of_match_ptr(goodix_of_match),
- .pm = &goodix_pm_ops,
+ .pm = pm_sleep_ptr(&goodix_pm_ops),
},
};
module_i2c_driver(goodix_ts_driver);