[i2c] How to probe EEPROM IC?

Sachin Rane SRane at alphion.com
Thu Sep 28 13:37:42 CEST 2006


Hi,
 
I am trying to write a I2C Device driver for EEPROM I2C IC M24C02-WBN6.
I am using ppc440 evaluation board and Timesys 2.6 Kernel.
On the evaluation board this EEPROM basically is being used for boot strapping.
 
 
In the "PPC440GX® Evaluation Board User's Manual", I found two statements which deals with bootstrapping and address: 

1.	IIC0 slave address that will respond with boot data when serial device is enabled --> 0x54  or 0x50 
2.	Primary Boot Strap PROM at 0xA0(Write) and 0xA1(Read)

As per my understanding the first one is the I2C Adapter address and next line gives the I2C EEPROM address.
 
If I use 0xA0 or 0xA1 as one of the parameter for i2c_probe(), then it returns with error. This haapens because the 'i2c_probe()' calls 'i2c_probe_address()' and the i2c_probe_address() returns a error for (addr < 0x03 || addr > 0x77). 
 
 
So which address I have to pass as an argument to i2c_probe() to detect the EEPROM IC?
 
Regards,
Sachin Rane
 
8<---------------------------------------------------------------
static int i2c_probe_address(struct i2c_adapter *adapter, int addr, int kind,
        int (*found_proc) (struct i2c_adapter *, int, int))
{
 int err;
 /* Make sure the address is valid */
 if (addr < 0x03 || addr > 0x77) {
  dev_warn(&adapter->dev, "Invalid probe address 0x%02x\n",
    addr);
  return -EINVAL;
 :
 :

 }
8<--------------------------------------------------------------- 
 
 
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.lm-sensors.org/pipermail/i2c/attachments/20060928/06c0fc08/attachment.html 


More information about the i2c mailing list