aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMischa Jonker <Mischa.Jonker@synopsys.com>2013-03-31 03:25:33 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2013-03-31 03:48:14 -0400
commit2c0a4f8b870dbeb48e3351899bd0e0cc886d4985 (patch)
treec3772172a2e62ad446b4ce3d3b6cc0da73968e81
parent257a1ec603538036a2f2ae7e8433d775b7a7588a (diff)
Input: arc_ps2 - add support for device tree
Add match table for device tree binding and dts binding doc. Signed-off-by: Mischa Jonker <mjonker@synopsys.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-rw-r--r--Documentation/devicetree/bindings/serio/snps-arc_ps2.txt16
-rw-r--r--drivers/input/serio/arc_ps2.c14
2 files changed, 28 insertions, 2 deletions
diff --git a/Documentation/devicetree/bindings/serio/snps-arc_ps2.txt b/Documentation/devicetree/bindings/serio/snps-arc_ps2.txt
new file mode 100644
index 000000000000..38c2f21e8044
--- /dev/null
+++ b/Documentation/devicetree/bindings/serio/snps-arc_ps2.txt
@@ -0,0 +1,16 @@
1* ARC PS/2 driver: PS/2 block used in some ARC FPGA's & nSIM OSCI model
2
3Required properties:
4- compatible : "snps,arc_ps2"
5- reg : offset and length (always 0x14) of registers
6- interrupts : interrupt
7- interrupt-names : name of interrupt, must be "arc_ps2_irq"
8
9Example:
10
11serio@c9000400 {
12 compatible = "snps,arc_ps2";
13 reg = <0xc9000400 0x14>;
14 interrupts = <13>;
15 interrupt-names = "arc_ps2_irq";
16}
diff --git a/drivers/input/serio/arc_ps2.c b/drivers/input/serio/arc_ps2.c
index c52e3e589f72..3fb7727c8ea5 100644
--- a/drivers/input/serio/arc_ps2.c
+++ b/drivers/input/serio/arc_ps2.c
@@ -14,6 +14,7 @@
14#include <linux/input.h> 14#include <linux/input.h>
15#include <linux/serio.h> 15#include <linux/serio.h>
16#include <linux/platform_device.h> 16#include <linux/platform_device.h>
17#include <linux/of.h>
17#include <linux/io.h> 18#include <linux/io.h>
18#include <linux/kernel.h> 19#include <linux/kernel.h>
19#include <linux/slab.h> 20#include <linux/slab.h>
@@ -259,10 +260,19 @@ static int arc_ps2_remove(struct platform_device *pdev)
259 return 0; 260 return 0;
260} 261}
261 262
263#ifdef CONFIG_OF
264static const struct of_device_id arc_ps2_match[] = {
265 { .compatible = "snps,arc_ps2" },
266 { },
267};
268MODULE_DEVICE_TABLE(of, arc_ps2_match);
269#endif
270
262static struct platform_driver arc_ps2_driver = { 271static struct platform_driver arc_ps2_driver = {
263 .driver = { 272 .driver = {
264 .name = "arc_ps2", 273 .name = "arc_ps2",
265 .owner = THIS_MODULE, 274 .owner = THIS_MODULE,
275 .of_match_table = of_match_ptr(arc_ps2_match),
266 }, 276 },
267 .probe = arc_ps2_probe, 277 .probe = arc_ps2_probe,
268 .remove = arc_ps2_remove, 278 .remove = arc_ps2_remove,