linux-mips
[Top] [All Lists]

Re: [PATCH] MIPS: Octeon: Register EEPROM device on the I2C bus

To: Yang Shi <yang.shi@windriver.com>
Subject: Re: [PATCH] MIPS: Octeon: Register EEPROM device on the I2C bus
From: Jean Delvare <khali@linux-fr.org>
Date: Fri, 5 Mar 2010 09:50:40 +0100
Cc: Wolfram Sang <w.sang@pengutronix.de>, ddaney@caviumnetworks.com, ben-linux@fluff.org, ralf@linux-mips.org, linux-mips@linux-mips.org, linux-i2c@vger.kernel.org, Konstantin Lazarev <klazarev@sbcglobal.net>
In-reply-to: <4B90B888.6060005@windriver.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1267772895-25409-1-git-send-email-yang.shi@windriver.com> <20100305071130.GB21925@pengutronix.de> <4B90B341.9000601@windriver.com> <20100305074155.GD21925@pengutronix.de> <4B90B888.6060005@windriver.com>
Sender: linux-mips-bounce@linux-mips.org
Hi Yang, Wolfram,

On Fri, 05 Mar 2010 15:53:44 +0800, Yang Shi wrote:
> Wolfram Sang 写道:
> >>> Is the use of 'eeprom' instead of 'at24' intentional?
> >>>   
> >>>       
> >> Unfortunately, at24 driver can't work on this board, I must use legacy
> >> eeprom.
> >>     
> >
> > Well, you are of course free to choose here :)
> >
> > I'd just be interested if there is a software limitation which prevents you 
> > from
> > using AT24. Because, it _should_ work with all kind of eeproms the legacy 
> > driver
> > deals with. Otherwise it is probably a bug which needs to be fixed.
> >   
> 
> Thanks to point out this. Let me take a look at this.

One limitation of the at24 driver is that it needs the underlying
controller to support either raw I2C access or at least I2C block
transactions. Konstantin Lazarev complained about that one month ago
already.

I am currently working on improving the at24 driver so that it falls
back to byte transactions when block transactions are not available. I
might also add word transaction support (as the eeprom driver has) as
it is often the best performance/compatibility trade-off. I'll post the
patch when I'm done.

I'm not yet sure what will happen to the legacy eeprom driver in the
long run, but I would prefer new designs to not rely on it.

-- 
Jean Delvare

<Prev in Thread] Current Thread [Next in Thread>