Re: [PATCH 5/8] MXC: Add support for ULPI Viewports

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jun 12, 2009 at 04:50:39PM +0200, Alberto Panizzo wrote:
> > +static int ulpi_write(struct usb_xcvr *xcvr, u32 val, u32 reg)
> > +{
> > +	int ret;
> > +	void __iomem *view = xcvr->access_priv;
> > +
> > +	/* make sure the interface is running */
> > +	if (!(__raw_readl(view) && ULPIVW_SS)) {
> > +		__raw_writel(ULPIVW_WU, view);
> > +		/* wait for wakeup */
> > +		ret = ulpi_poll(view, ULPIVW_WU);
> > +		if (ret < 0)
> > +			return ret;
> > +	}
> > +
> > +	__raw_writel((ULPIVW_RUN | ULPIVW_WRITE |
> > +		      (reg << ULPIVW_ADDR_SHIFT) |
> > +		      ((val & ULPIVW_WDATA_MASK) << ULPIVW_WDATA_SHIFT)),
> > +		     view);
> > +
> > +	/* wait for completion */
> > +	return ulpi_poll(view, ULPIVW_RUN);
> > +}
> 
> Why do you return results of polling?
> You may want this..
>  -	return ulpi_poll(view, ULPIVW_RUN);
>  +	ret = ulpi_poll(view, ULPIVW_RUN);
>  +	if(ret < 0)
>  +		return ret;
>  +	return 0;

Probably. I'll fix that for the next round.

Thanks,
Daniel
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux