diff options
-rw-r--r-- | Documentation/devicetree/bindings/input/touchscreen/lpc32xx-tsc.txt | 16 | ||||
-rw-r--r-- | drivers/input/touchscreen/lpc32xx_ts.c | 10 |
2 files changed, 26 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/input/touchscreen/lpc32xx-tsc.txt b/Documentation/devicetree/bindings/input/touchscreen/lpc32xx-tsc.txt new file mode 100644 index 000000000000..d0c68e33de3a --- /dev/null +++ b/Documentation/devicetree/bindings/input/touchscreen/lpc32xx-tsc.txt | |||
@@ -0,0 +1,16 @@ | |||
1 | * NXP LPC32xx SoC Touchscreen Controller (TSC) | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: must be "nxp,lpc32xx-tsc" | ||
5 | - reg: physical base address of the controller and length of memory mapped | ||
6 | region. | ||
7 | - interrupts: The TSC/ADC interrupt | ||
8 | |||
9 | Example: | ||
10 | |||
11 | tsc@40048000 { | ||
12 | compatible = "nxp,lpc32xx-tsc"; | ||
13 | reg = <0x40048000 0x1000>; | ||
14 | interrupt-parent = <&mic>; | ||
15 | interrupts = <39 0>; | ||
16 | }; | ||
diff --git a/drivers/input/touchscreen/lpc32xx_ts.c b/drivers/input/touchscreen/lpc32xx_ts.c index afcd0691ec67..e8fccbc452db 100644 --- a/drivers/input/touchscreen/lpc32xx_ts.c +++ b/drivers/input/touchscreen/lpc32xx_ts.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/clk.h> | 22 | #include <linux/clk.h> |
23 | #include <linux/io.h> | 23 | #include <linux/io.h> |
24 | #include <linux/slab.h> | 24 | #include <linux/slab.h> |
25 | #include <linux/of.h> | ||
25 | 26 | ||
26 | /* | 27 | /* |
27 | * Touchscreen controller register offsets | 28 | * Touchscreen controller register offsets |
@@ -383,6 +384,14 @@ static const struct dev_pm_ops lpc32xx_ts_pm_ops = { | |||
383 | #define LPC32XX_TS_PM_OPS NULL | 384 | #define LPC32XX_TS_PM_OPS NULL |
384 | #endif | 385 | #endif |
385 | 386 | ||
387 | #ifdef CONFIG_OF | ||
388 | static struct of_device_id lpc32xx_tsc_of_match[] = { | ||
389 | { .compatible = "nxp,lpc32xx-tsc", }, | ||
390 | { }, | ||
391 | }; | ||
392 | MODULE_DEVICE_TABLE(of, lpc32xx_tsc_of_match); | ||
393 | #endif | ||
394 | |||
386 | static struct platform_driver lpc32xx_ts_driver = { | 395 | static struct platform_driver lpc32xx_ts_driver = { |
387 | .probe = lpc32xx_ts_probe, | 396 | .probe = lpc32xx_ts_probe, |
388 | .remove = __devexit_p(lpc32xx_ts_remove), | 397 | .remove = __devexit_p(lpc32xx_ts_remove), |
@@ -390,6 +399,7 @@ static struct platform_driver lpc32xx_ts_driver = { | |||
390 | .name = MOD_NAME, | 399 | .name = MOD_NAME, |
391 | .owner = THIS_MODULE, | 400 | .owner = THIS_MODULE, |
392 | .pm = LPC32XX_TS_PM_OPS, | 401 | .pm = LPC32XX_TS_PM_OPS, |
402 | .of_match_table = of_match_ptr(lpc32xx_tsc_of_match), | ||
393 | }, | 403 | }, |
394 | }; | 404 | }; |
395 | module_platform_driver(lpc32xx_ts_driver); | 405 | module_platform_driver(lpc32xx_ts_driver); |