[U-Boot] [PATCH v4 3/3] usb:udc:samsung Add functions for storing private gadget data in UDC driver

Marek Vasut marex at denx.de
Mon Apr 30 01:25:12 CEST 2012


Dear Lukasz Majewski,

> This commit adds support for storing private data to Samsung's UDC
> driver. This data is afterward used by usb gadget.
> 
> Signed-off-by: Lukasz Majewski <l.majewski at samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park at samsung.com>
> Cc: Marek Vasut <marex at denx.de>
> ---
>  drivers/usb/gadget/s3c_udc_otg.c |   12 ++++++++++++
>  1 files changed, 12 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/usb/gadget/s3c_udc_otg.c
> b/drivers/usb/gadget/s3c_udc_otg.c index f7f7b54..925d2f2 100644
> --- a/drivers/usb/gadget/s3c_udc_otg.c
> +++ b/drivers/usb/gadget/s3c_udc_otg.c
> @@ -133,6 +133,18 @@ static void nuke(struct s3c_ep *ep, int status);
>  static int s3c_udc_set_halt(struct usb_ep *_ep, int value);
>  static void s3c_udc_set_nak(struct s3c_ep *ep);
> 
> +void set_udc_gadget_private_data(void *p)
> +{
> +	DEBUG_SETUP("%s: the_controller: 0x%p, p: 0x%p\n", __func__,
> +	       the_controller, p);

debug() and fix this message, otherwise:

Acked-by: Marek Vasut <marex at denx.de>

Damn, I shouldn't have avoided reviewing them if I knew the remaining ones were 
so short. But after the first one, I was quite scared of what's coming next. 
Either way, here you go, fix these few issues and you're in mainline ;-)

> +	the_controller->gadget.dev.device_data = p;
> +}
> +
> +void *get_udc_gadget_private_data(struct usb_gadget *gadget)
> +{
> +	return gadget->dev.device_data;
> +}
> +
>  static struct usb_ep_ops s3c_ep_ops = {
>  	.enable = s3c_ep_enable,
>  	.disable = s3c_ep_disable,

Best regards,
Marek Vasut


More information about the U-Boot mailing list