hi,

On Fri, Mar 06, 2015 at 10:36:03AM +0800, Peter Chen wrote:
> @@ -145,6 +148,34 @@ EXPORT_SYMBOL_GPL(usb_gadget_set_state);
>  
>  /* ------------------------------------------------------------------------- 
> */
>  
> +static void usb_udc_connect_control(struct usb_udc *udc)
> +{
> +     if (udc->vbus)
> +             usb_gadget_connect(udc->gadget);
> +     else
> +             usb_gadget_disconnect(udc->gadget);
> +}
> +
> +/**
> + * usb_udc_vbus_handler - updates the udc core vbus status, and try to
> + * connect or disconnect gadget
> + * @gadget: The gadget which vbus change occurs
> + * @status: The vbus status
> + *
> + * The udc driver calls it when it wants to connect or disconnect gadget
> + * according to vbus status.
> + */
> +void usb_udc_vbus_handler(struct usb_gadget *gadget, bool status)

I have a feeling we need more bits for status here. If we ever want to
treat different VBUS levels (vbus valid, session valid, session end,
etc). But maybe we can just change this prototype when that's really
needed ?

-- 
balbi

Attachment: signature.asc
Description: Digital signature

Reply via email to