/* Returns 0 if ep not full, 1 if ep full, -EOPNOTSUPP if OUT endpoint  */
static int ep_is_full(struct pxa_ep *ep)
/* Returns 0 if ep not full, 1 if ep full, -EOPNOTSUPP if OUT endpoint  */
static int ep_is_full(struct pxa_ep *ep)
{
	if (is_ep0(ep))
		return (udc_ep_readl(ep, UDCCSR) & UDCCSR0_IPR);
	if (!ep->dir_in)
		return -EOPNOTSUPP;
	return (!(udc_ep_readl(ep, UDCCSR) & UDCCSR_BNF));
}