Re: [PATCH V3] usb: Add Device Tree support to XHCI Platform driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Tue, Jul 23, 2013 at 10:25:44AM -0400, Al Cooper wrote:
> Add Device Tree match table to xhci-plat.c. Add DT bindings document.
> 
> Signed-off-by: Al Cooper <alcooperx@xxxxxxxxx>
> ---
>  Documentation/devicetree/bindings/usb/usb-xhci.txt | 14 ++++++++++++++
>  drivers/usb/host/xhci-plat.c                       |  9 +++++++++
>  2 files changed, 23 insertions(+)
>  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..654cf3d
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/usb/usb-xhci.txt
> @@ -0,0 +1,14 @@
> +USB XHCI controllers
> +
> +Required properties:
> +  - compatible: should be "usb-xhci".
> +  - reg: should contain address and length of the standard XHCI
> +    register set for the device.
> +  - interrupts: one XHCI interrupt should be described here.
> +
> +Example:
> +	xhci@f0931000 {
> +		compatible = "usb-xhci";
> +		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..d70f607 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,19 @@ 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 = "usb-xhci" },

you might want to use a less generic name here so it's easy to apply
quirks should you need, although no strong feelings either way. Other
than that, and the missing MODULE_DEVICE_TABLE() which Sergei commented
about, patch looks good.

-- 
balbi

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux