Re: [RESEND] [PATCH] i2c: Support for Netlogic XLR/XLS on-chip I2C controller.

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

 



On Mon, Jul 11, 2011 at 12:32:03PM +0530, Jayachandran C. wrote:
> On Sat, Jul 09, 2011 at 10:37:42AM +0100, Mark Brown wrote:
> > On Fri, Jul 08, 2011 at 03:42:04PM +0530, Jayachandran C. wrote:

> > > +	if (bus == 0)
> > > +		mmio = netlogic_io_mmio(NETLOGIC_IO_I2C_0_OFFSET);
> > > +	else
> > > +		mmio = netlogic_io_mmio(NETLOGIC_IO_I2C_1_OFFSET);

> > > +	return (u32 *)mmio;

> > Functions like this should be static, though in this case the memory
> > region should be passed in as a resource rather than being embedded in
> > the driver.

> Since it is a SoC device, the address will not change at all. But yes, the
> right way is to use the platform_device resource pointer for this.

That doesn't follow at all - while the address won't change for a
particular SoC the same IP may be used in multiple SoCs.

> > This is going to loop infinitely if the bus locks up for some reason.
> > There should be some limit on how long we try for.  It also looks like
> > we're busy waiting here which isn't terribly good.

> Can add a udelay here, and a loop count.

udelay() still busy waits, and I2C transactions take a *long* time.
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux