Re: [PATCH 1/8] usb: host: xhci-plat: Allow to register glue code using the device tree
From: Felipe Balbi
Date: Sat Apr 19 2014 - 23:19:10 EST
Hi,
On Fri, Apr 18, 2014 at 12:22:36PM +0200, Gregory CLEMENT wrote:
> This patch allow to register specific glue code for xhci controller.
> It creates a structure called xhci_plat_ops to register functions
> specific to an SoC. Currently there are only probe() and remove() but
What SoC-specific code do you need ?
> it can be extended later, it was the point to create such a structure.
>
> Each compatible string can then be associated to an instance of this
> structure. In the non device tree case a default structure is used.
>
> Signed-off-by: Gregory CLEMENT <gregory.clement@xxxxxxxxxxxxxxxxxx>
> ---
> drivers/usb/host/xhci-plat.c | 72 +++++++++++++++++++++++++++++++++++++++++---
> drivers/usb/host/xhci.h | 4 +++
> 2 files changed, 72 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c
> index 151901ce1ba9..8029cc82edc4 100644
> --- a/drivers/usb/host/xhci-plat.c
> +++ b/drivers/usb/host/xhci-plat.c
> @@ -16,6 +16,7 @@
> #include <linux/slab.h>
> #include <linux/of.h>
> #include <linux/dma-mapping.h>
> +#include <linux/of_device.h>
>
> #include "xhci.h"
>
> @@ -85,7 +86,7 @@ static const struct hc_driver xhci_plat_xhci_driver = {
> .bus_resume = xhci_bus_resume,
> };
>
> -static int xhci_plat_probe(struct platform_device *pdev)
> +int common_xhci_plat_probe(struct platform_device *pdev, void *priv)
no, I rather not see this sort of hack.
--
balbi
Attachment:
signature.asc
Description: Digital signature