diff options
author | Miodrag Dinic <miodrag.dinic@imgtec.com> | 2016-02-26 19:00:44 +0000 |
---|---|---|
committer | Amit Pundir <amit.pundir@linaro.org> | 2016-12-01 15:18:44 +0530 |
commit | 7912004ee2521cc393583958fee86cbd1f82c589 (patch) | |
tree | 19cd3c268048a7121a1aca952f6bd9c39201ee84 /drivers/tty | |
parent | 44a4608e6a9848af3e641ea5cb63b5353eda22e2 (diff) |
BACKPORT: drivers: tty: goldfish: Add device tree bindings
Enable support for registering this device using the device tree.
Device tree node example for registering Goldfish TTY device :
goldfish_tty@1f004000 {
interrupts = <0xc>;
reg = <0x1f004000 0x1000>;
compatible = "google,goldfish-tty";
};
Signed-off-by: Miodrag Dinic <miodrag.dinic@imgtec.com>
Signed-off-by: Jin Qian <jinqian@android.com>
Signed-off-by: Alan <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 9b883eea26ccf043b608e398cf6a26231d44f5fb)
Change-Id: Idbe1bbac4f371e2feb6730712b08b66be1188ea7
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/goldfish.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/tty/goldfish.c b/drivers/tty/goldfish.c index 4356a23c588f..1e332855b933 100644 --- a/drivers/tty/goldfish.c +++ b/drivers/tty/goldfish.c @@ -330,11 +330,19 @@ static int goldfish_tty_remove(struct platform_device *pdev) return 0; } +static const struct of_device_id goldfish_tty_of_match[] = { + { .compatible = "google,goldfish-tty", }, + {}, +}; + +MODULE_DEVICE_TABLE(of, goldfish_tty_of_match); + static struct platform_driver goldfish_tty_platform_driver = { .probe = goldfish_tty_probe, .remove = goldfish_tty_remove, .driver = { - .name = "goldfish_tty" + .name = "goldfish_tty", + .of_match_table = goldfish_tty_of_match, } }; |