Skip to content

Commit

Permalink
mfd: omap-usb-tll: Add device tree support and binding information
Browse files Browse the repository at this point in the history
Allows the OMAP USB TLL module to be specified via device tree.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
  • Loading branch information
Roger Quadros authored and Samuel Ortiz committed Apr 9, 2013
1 parent 9f4a3ec commit 48130b8
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
17 changes: 17 additions & 0 deletions Documentation/devicetree/bindings/mfd/omap-usb-tll.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
OMAP HS USB Host TLL (Transceiver-Less Interface)

Required properties:

- compatible : should be "ti,usbhs-tll"
- reg : should contain one register range i.e. start and length
- interrupts : should contain the TLL module's interrupt
- ti,hwmod : must contain "usb_tll_hs"

Example:

usbhstll: usbhstll@4a062000 {
compatible = "ti,usbhs-tll";
reg = <0x4a062000 0x1000>;
interrupts = <78>;
ti,hwmods = "usb_tll_hs";
};
10 changes: 10 additions & 0 deletions drivers/mfd/omap-usb-tll.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include <linux/err.h>
#include <linux/pm_runtime.h>
#include <linux/platform_data/usb-omap.h>
#include <linux/of.h>

#define USBTLL_DRIVER_NAME "usbhs_tll"

Expand Down Expand Up @@ -311,10 +312,18 @@ static int usbtll_omap_remove(struct platform_device *pdev)
return 0;
}

static const struct of_device_id usbtll_omap_dt_ids[] = {
{ .compatible = "ti,usbhs-tll" },
{ }
};

MODULE_DEVICE_TABLE(of, usbtll_omap_dt_ids);

static struct platform_driver usbtll_omap_driver = {
.driver = {
.name = (char *)usbtll_driver_name,
.owner = THIS_MODULE,
.of_match_table = of_match_ptr(usbtll_omap_dt_ids),
},
.probe = usbtll_omap_probe,
.remove = usbtll_omap_remove,
Expand Down Expand Up @@ -467,6 +476,7 @@ int omap_tll_disable(struct usbhs_omap_platform_data *pdata)
EXPORT_SYMBOL_GPL(omap_tll_disable);

MODULE_AUTHOR("Keshava Munegowda <keshava_mgowda@ti.com>");
MODULE_AUTHOR("Roger Quadros <rogerq@ti.com>");
MODULE_ALIAS("platform:" USBHS_DRIVER_NAME);
MODULE_LICENSE("GPL v2");
MODULE_DESCRIPTION("usb tll driver for TI OMAP EHCI and OHCI controllers");
Expand Down

0 comments on commit 48130b8

Please sign in to comment.