/* Returns 0 if OK, -EOPNOTSUPP if udc driver doesn't handle D+ pullup  */
static int pxa_udc_pullup(struct usb_gadget *_gadget, int is_active)
/* Returns 0 if OK, -EOPNOTSUPP if udc driver doesn't handle D+ pullup  */
static int pxa_udc_pullup(struct usb_gadget *_gadget, int is_active)
{
	struct pxa_udc *udc = to_gadget_udc(_gadget);
	if (!gpio_is_valid(udc->mach->gpio_pullup) && !udc->mach->udc_command)
		return -EOPNOTSUPP;
	dplus_pullup(udc, is_active);
	if (should_enable_udc(udc))
		udc_enable(udc);
	if (should_disable_udc(udc))
		udc_disable(udc);
	return 0;
}