On Thu, Jul 25, 2013 at 07:04:44PM -0400, Al Cooper wrote:
> Add Device Tree match table to xhci-plat.c. Add DT bindings document.
> 
> Signed-off-by: Al Cooper <[email protected]>
> ---

Al, in the future, please add a description of your changes since the
last revision here, after the --- line.  It makes it much easier to
review patch revisions.

>  Documentation/devicetree/bindings/usb/usb-xhci.txt |   14 ++++++++++++++
>  drivers/usb/host/xhci-plat.c                       |   10 ++++++++++
>  2 files changed, 24 insertions(+), 0 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/usb/usb-xhci.txt
> 
> diff --git a/Documentation/devicetree/bindings/usb/usb-xhci.txt 
> b/Documentation/devicetree/bindings/usb/usb-xhci.txt
> new file mode 100644
> index 0000000..5752df0
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/usb/usb-xhci.txt
> @@ -0,0 +1,14 @@
> +USB xHCI controllers

Ok, Sergei's comment was addressed.

> +
> +Required properties:
> +  - compatible: should be "xhci-platform".
> +  - reg: should contain address and length of the standard XHCI
> +    register set for the device.
> +  - interrupts: one XHCI interrupt should be described here.
> +
> +Example:
> +     usb@f0931000 {

Also addressed.

> +             compatible = "xhci-platform";

You didn't take Sergei's suggestion to change this to usb-xhci-platform.
That's not specific to the IP, so it doesn't violate the DT rules, but
it also lets people know which subsystem xHCI belongs to.

Did you have a strong reason to keep it as xhci-platform, rather than
changing it to usb-xhci-platform?

Sergei, Felipe, do you have a strong preference on this name?  Or should
I take the patch as is?

> +             reg = <0xf0931000 0x8c8>;
> +             interrupts = <0x0 0x4e 0x0>;
> +     };
> diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c
> index d718134..fbc11dc 100644
> --- a/drivers/usb/host/xhci-plat.c
> +++ b/drivers/usb/host/xhci-plat.c
> @@ -14,6 +14,7 @@
>  #include <linux/platform_device.h>
>  #include <linux/module.h>
>  #include <linux/slab.h>
> +#include <linux/of.h>
>  
>  #include "xhci.h"
>  
> @@ -212,11 +213,20 @@ static int xhci_plat_remove(struct platform_device *dev)
>       return 0;
>  }
>  
> +#ifdef CONFIG_OF
> +static const struct of_device_id usb_xhci_of_match[] = {
> +     { .compatible = "xhci-platform" },
> +     { },

You did add a space here, like Sergei asked.

> +};
> +MODULE_DEVICE_TABLE(of, usb_xhci_of_match);
> +#endif
> +
>  static struct platform_driver usb_xhci_driver = {
>       .probe  = xhci_plat_probe,
>       .remove = xhci_plat_remove,
>       .driver = {
>               .name = "xhci-hcd",
> +             .of_match_table = of_match_ptr(usb_xhci_of_match),
>       },
>  };
>  MODULE_ALIAS("platform:xhci-hcd");
> -- 
> 1.7.6
> 
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to