diff options
author | Aleksei Mamlin <mamlinav@gmail.com> | 2015-03-06 19:43:38 -0500 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2015-03-06 20:18:17 -0500 |
commit | 771d8f1b178e7e09fcc641fccd48852958dbc329 (patch) | |
tree | dde9fadc552a07c0890f362e6939c455713b7ac7 /drivers/input/touchscreen | |
parent | a7ac7c95d4682883d141c5d7a7544d2818f0a09f (diff) |
Input: goodix - add device tree support
This change adds device tree support and binding information for Goodix
GT9xx series touchscreen controller. It also adds support for 5-finger
chips, like GT911 and GT912, which can be found on ARM tablets, such as
Wexler TAB7200 and MSI Primo73.
Datasheets can be found here:
https://drive.google.com/folderview?id=0BxCVOQS3ZymGfmJyY2RKbE5XbVlKNlktVTlwV0lxNEdxd2dzeWZER094cmJPVnMxN1F0Yzg&usp=sharing
Signed-off-by: Aleksei Mamlin <mamlinav@gmail.com>
Reviewed-by: Bastien Nocera <hadess@hadess.net>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/touchscreen')
-rw-r--r-- | drivers/input/touchscreen/Kconfig | 5 | ||||
-rw-r--r-- | drivers/input/touchscreen/goodix.c | 21 |
2 files changed, 23 insertions, 3 deletions
diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig index 58917525126e..2adf7244b025 100644 --- a/drivers/input/touchscreen/Kconfig +++ b/drivers/input/touchscreen/Kconfig | |||
@@ -297,11 +297,12 @@ config TOUCHSCREEN_FUJITSU | |||
297 | 297 | ||
298 | config TOUCHSCREEN_GOODIX | 298 | config TOUCHSCREEN_GOODIX |
299 | tristate "Goodix I2C touchscreen" | 299 | tristate "Goodix I2C touchscreen" |
300 | depends on I2C && ACPI | 300 | depends on I2C |
301 | help | 301 | help |
302 | Say Y here if you have the Goodix touchscreen (such as one | 302 | Say Y here if you have the Goodix touchscreen (such as one |
303 | installed in Onda v975w tablets) connected to your | 303 | installed in Onda v975w tablets) connected to your |
304 | system. | 304 | system. It also supports 5-finger chip models, which can be |
305 | found on ARM tablets, like Wexler TAB7200 and MSI Primo73. | ||
305 | 306 | ||
306 | If unsure, say N. | 307 | If unsure, say N. |
307 | 308 | ||
diff --git a/drivers/input/touchscreen/goodix.c b/drivers/input/touchscreen/goodix.c index 3ab7232ac1af..3af16984d57c 100644 --- a/drivers/input/touchscreen/goodix.c +++ b/drivers/input/touchscreen/goodix.c | |||
@@ -23,6 +23,8 @@ | |||
23 | #include <linux/irq.h> | 23 | #include <linux/irq.h> |
24 | #include <linux/interrupt.h> | 24 | #include <linux/interrupt.h> |
25 | #include <linux/slab.h> | 25 | #include <linux/slab.h> |
26 | #include <linux/acpi.h> | ||
27 | #include <linux/of.h> | ||
26 | #include <asm/unaligned.h> | 28 | #include <asm/unaligned.h> |
27 | 29 | ||
28 | struct goodix_ts_data { | 30 | struct goodix_ts_data { |
@@ -375,11 +377,27 @@ static const struct i2c_device_id goodix_ts_id[] = { | |||
375 | { } | 377 | { } |
376 | }; | 378 | }; |
377 | 379 | ||
380 | #ifdef CONFIG_ACPI | ||
378 | static const struct acpi_device_id goodix_acpi_match[] = { | 381 | static const struct acpi_device_id goodix_acpi_match[] = { |
379 | { "GDIX1001", 0 }, | 382 | { "GDIX1001", 0 }, |
380 | { } | 383 | { } |
381 | }; | 384 | }; |
382 | MODULE_DEVICE_TABLE(acpi, goodix_acpi_match); | 385 | MODULE_DEVICE_TABLE(acpi, goodix_acpi_match); |
386 | #endif | ||
387 | |||
388 | #ifdef CONFIG_OF | ||
389 | static const struct of_device_id goodix_of_match[] = { | ||
390 | { .compatible = "goodix,gt911" }, | ||
391 | { .compatible = "goodix,gt9110" }, | ||
392 | { .compatible = "goodix,gt912" }, | ||
393 | { .compatible = "goodix,gt927" }, | ||
394 | { .compatible = "goodix,gt9271" }, | ||
395 | { .compatible = "goodix,gt928" }, | ||
396 | { .compatible = "goodix,gt967" }, | ||
397 | { } | ||
398 | }; | ||
399 | MODULE_DEVICE_TABLE(of, goodix_of_match); | ||
400 | #endif | ||
383 | 401 | ||
384 | static struct i2c_driver goodix_ts_driver = { | 402 | static struct i2c_driver goodix_ts_driver = { |
385 | .probe = goodix_ts_probe, | 403 | .probe = goodix_ts_probe, |
@@ -387,7 +405,8 @@ static struct i2c_driver goodix_ts_driver = { | |||
387 | .driver = { | 405 | .driver = { |
388 | .name = "Goodix-TS", | 406 | .name = "Goodix-TS", |
389 | .owner = THIS_MODULE, | 407 | .owner = THIS_MODULE, |
390 | .acpi_match_table = goodix_acpi_match, | 408 | .acpi_match_table = ACPI_PTR(goodix_acpi_match), |
409 | .of_match_table = of_match_ptr(goodix_of_match), | ||
391 | }, | 410 | }, |
392 | }; | 411 | }; |
393 | module_i2c_driver(goodix_ts_driver); | 412 | module_i2c_driver(goodix_ts_driver); |