[Top] [All Lists]

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

To: Yang Shi <>
Subject: Re: [PATCH] MIPS: Octeon: Register EEPROM device on the I2C bus
From: Jean Delvare <>
Date: Fri, 5 Mar 2010 11:52:13 +0100
Cc: Michael Lawnick <>, Wolfram Sang <>,,,,,, Konstantin Lazarev <>
In-reply-to: <>
Original-recipient: rfc822;
References: <> <> <> <> <> <20100305095040.6ab4612c@hyperion.delvare> <> <>
On Fri, 05 Mar 2010 18:39:04 +0800, Yang Shi wrote:
> Hi guys,
> Thanks for you guys kind advice. I think I find the cause. I coded a 
> wrong eeprom type, "at24" can't work here, it should be "24c64". It 
> works with AT24 eeprom driver, but I'm not sure if this is the right type.

Actually, "at24" can work but you have to provide extra parameters
detailing the size, page size etc. of the EEPROM. All the "24cXX" names
are shortcuts with predefined sizes.

> So, a possible correct to the patch is that:
> +{
> +    I2C_BOARD_INFO("24c64",·0x50),
> +},

Well, what EEPROM type do you have exactly? 24c64 is for 64 kbit (8
kByte) EEPROMs using 16-bit addressing. You must use the correct type,
otherwise the at24 driver will misbehave. I am a little surprised
because originally you went for "eeprom" which is not compatible with
"24c64" (8-bit vs. 16-bit addressing).

Also note that you may want to provide specific page size if you have
tight control over what hardware is used and you intend to write to the
EEPROM on a regular basis. The driver defaults to safe but slow

OTOH, if you do _not_ want to write to the EEPROM, you want to provide
the AT24_FLAG_READONLY flag.

Jean Delvare

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