Re: [PATCH] mfd:rtsx: Support RTS5249

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

 



On Mon, Mar 25, 2013 at 02:23:45PM +0800, wwang wrote:
> 于 2013年03月25日 14:00, Dan Carpenter 写道:
> >On Mon, Mar 25, 2013 at 10:13:56AM +0800, wei_wang@xxxxxxxxxxxxxx wrote:
> >>+static int rts5249_optimize_phy(struct rtsx_pcr *pcr)
> >>+{
> >>+	int err;
> >>+
> >>+	err = rtsx_pci_write_phy_register(pcr, 0x19, 0xFE46);
> >>+	if (err < 0)
> >>+		return err;
> >>+
> >>+	mdelay(1);
> >Why do we have the mdelay() and the later msleep(5)?
> >rtsx_pci_write_phy_register() busy loops until the write succeeds or
> >it returns -ETIMEOUT.  The extra wait here seems unnecessary.
> >
> >regards,
> >dan carpenter
> >
> >
> >.
> 
> Hi,
> 
> The busy loops in rtsx_pci_write_phy_register only tell us that the
> write sequence succeeds. The device still needs to wait for a while
> until the internal signal stable. Or else the timing won't fit the
> requirement.
> All of the delays in the driver are necessary.

Ok.  Cool.

regards,
dan carpenter

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel





[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux