提交 2c0a4f8b 编写于 作者: M Mischa Jonker 提交者: Dmitry Torokhov

Input: arc_ps2 - add support for device tree

Add match table for device tree binding and dts binding doc.
Signed-off-by: NMischa Jonker <mjonker@synopsys.com>
Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
上级 257a1ec6
* ARC PS/2 driver: PS/2 block used in some ARC FPGA's & nSIM OSCI model
Required properties:
- compatible : "snps,arc_ps2"
- reg : offset and length (always 0x14) of registers
- interrupts : interrupt
- interrupt-names : name of interrupt, must be "arc_ps2_irq"
Example:
serio@c9000400 {
compatible = "snps,arc_ps2";
reg = <0xc9000400 0x14>;
interrupts = <13>;
interrupt-names = "arc_ps2_irq";
}
......@@ -14,6 +14,7 @@
#include <linux/input.h>
#include <linux/serio.h>
#include <linux/platform_device.h>
#include <linux/of.h>
#include <linux/io.h>
#include <linux/kernel.h>
#include <linux/slab.h>
......@@ -259,10 +260,19 @@ static int arc_ps2_remove(struct platform_device *pdev)
return 0;
}
#ifdef CONFIG_OF
static const struct of_device_id arc_ps2_match[] = {
{ .compatible = "snps,arc_ps2" },
{ },
};
MODULE_DEVICE_TABLE(of, arc_ps2_match);
#endif
static struct platform_driver arc_ps2_driver = {
.driver = {
.name = "arc_ps2",
.owner = THIS_MODULE,
.of_match_table = of_match_ptr(arc_ps2_match),
},
.probe = arc_ps2_probe,
.remove = arc_ps2_remove,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册