Skip to content

Commit

Permalink
tty: serial: altera_jtaguart: Add device tree support
Browse files Browse the repository at this point in the history
Advertise the possibility to use this driver with device tree if
CONFIG_OF is set.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
  • Loading branch information
Tobias Klauser authored and Grant Likely committed Mar 1, 2011
1 parent 7c9325d commit 9f15444
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
4 changes: 4 additions & 0 deletions Documentation/devicetree/bindings/serial/altera_jtaguart.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Altera JTAG UART

Required properties:
- compatible : should be "ALTR,juart-1.0"
15 changes: 13 additions & 2 deletions drivers/tty/serial/altera_jtaguart.c
Original file line number Diff line number Diff line change
Expand Up @@ -465,12 +465,23 @@ static int __devexit altera_jtaguart_remove(struct platform_device *pdev)
return 0;
}

#ifdef CONFIG_OF
static struct of_device_id altera_jtaguart_match[] = {
{ .compatible = "ALTR,juart-1.0", },
{},
};
MODULE_DEVICE_TABLE(of, altera_jtaguart_match);
#else
#define altera_jtaguart_match NULL
#endif /* CONFIG_OF */

static struct platform_driver altera_jtaguart_platform_driver = {
.probe = altera_jtaguart_probe,
.remove = __devexit_p(altera_jtaguart_remove),
.driver = {
.name = DRV_NAME,
.owner = THIS_MODULE,
.name = DRV_NAME,
.owner = THIS_MODULE,
.of_match_table = altera_jtaguart_match,
},
};

Expand Down

0 comments on commit 9f15444

Please sign in to comment.