Message ID | 1342787373-2230-1-git-send-email-linux@prisktech.co.nz (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Friday 20 July 2012, Tony Prisk wrote: > Signed-off-by: Tony Prisk <linux@prisktech.co.nz> > --- > .../devicetree/bindings/usb/vt8500-ehci.txt | 10 ++++++++++ > drivers/usb/host/ehci-vt8500.c | 9 +++++++++ > 2 files changed, 19 insertions(+), 0 deletions(-) > create mode 100644 Documentation/devicetree/bindings/usb/vt8500-ehci.txt As mentioned, you need to Cc the USB mailing list and the EHCI maintainers: $ ./scripts/get_maintainer.pl drivers/usb/host/ehci-vt8500.c -f Alan Stern <stern@rowland.harvard.edu> (maintainer:USB EHCI DRIVER) Greg Kroah-Hartman <gregkh@linuxfoundation.org> (supporter:USB SUBSYSTEM) linux-usb@vger.kernel.org (open list:USB EHCI DRIVER) linux-kernel@vger.kernel.org (open list) > diff --git a/Documentation/devicetree/bindings/usb/vt8500-ehci.txt b/Documentation/devicetree/bindings/usb/vt8500-ehci.txt > new file mode 100644 > index 0000000..74f75c6 > --- /dev/null > +++ b/Documentation/devicetree/bindings/usb/vt8500-ehci.txt > @@ -0,0 +1,10 @@ > +VIA VT8500 and Wondermedia WM8xxx SoC USB controllers. > + > +Required properties: > + - compatible: Should be "via,vt8500-ehci" or "wm,prizm-ehci". I would list the interrupts and reg properties as required as well, and you can mention that there must be exactly one interrupt and one reg resource with a length of 0x200 bytes. Arnd
diff --git a/Documentation/devicetree/bindings/usb/vt8500-ehci.txt b/Documentation/devicetree/bindings/usb/vt8500-ehci.txt new file mode 100644 index 0000000..74f75c6 --- /dev/null +++ b/Documentation/devicetree/bindings/usb/vt8500-ehci.txt @@ -0,0 +1,10 @@ +VIA VT8500 and Wondermedia WM8xxx SoC USB controllers. + +Required properties: + - compatible: Should be "via,vt8500-ehci" or "wm,prizm-ehci". + +usb: ehci@D8007100 { + compatible = "wm,prizm-ehci", "usb-ehci"; + reg = <0xD8007100 0x200>; + interrupts = <1>; +}; diff --git a/drivers/usb/host/ehci-vt8500.c b/drivers/usb/host/ehci-vt8500.c index c1eda73..4ba8f0c 100644 --- a/drivers/usb/host/ehci-vt8500.c +++ b/drivers/usb/host/ehci-vt8500.c @@ -16,6 +16,7 @@ * */ +#include <linux/of.h> #include <linux/platform_device.h> static int ehci_update_device(struct usb_hcd *hcd, struct usb_device *udev) @@ -162,6 +163,12 @@ static int vt8500_ehci_drv_remove(struct platform_device *pdev) return 0; } +static const struct of_device_id vt8500_ehci_ids[] = { + { .compatible = "via,vt8500-ehci", }, + { .compatible = "wm,prizm-ehci", }, + {} +}; + static struct platform_driver vt8500_ehci_driver = { .probe = vt8500_ehci_drv_probe, .remove = vt8500_ehci_drv_remove, @@ -169,7 +176,9 @@ static struct platform_driver vt8500_ehci_driver = { .driver = { .name = "vt8500-ehci", .owner = THIS_MODULE, + .of_match_table = of_match_ptr(vt8500_ehci_ids), } }; MODULE_ALIAS("platform:vt8500-ehci"); +MODULE_DEVICE_TABLE(of, vt8500_ehci_ids);
Signed-off-by: Tony Prisk <linux@prisktech.co.nz> --- .../devicetree/bindings/usb/vt8500-ehci.txt | 10 ++++++++++ drivers/usb/host/ehci-vt8500.c | 9 +++++++++ 2 files changed, 19 insertions(+), 0 deletions(-) create mode 100644 Documentation/devicetree/bindings/usb/vt8500-ehci.txt