<HTML dir=ltr><HEAD>
<META http-equiv=Content-Type content="text/html; charset=unicode">
<META content="MSHTML 6.00.2900.2180" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial color=#000000 size=2>
<DIV><FONT face=Arial color=#000000 size=2>Hi,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#000000 size=2>I am looking for an information to write a device driver to access EEPROM IC M24C02-WBN6.<BR>The EEPROM IC M24C02-WBN is present on the 'ppc440' evaluation board for boot strap purpose.</FONT></DIV>
<DIV><FONT face=Arial color=#000000 size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#000000 size=2>I have refferred materials available on:<BR>1. some of the material available on <A href="https://mail.alphion.com/exchweb/bin/redir.asp?URL=http://www.lm-sensors.org" target=_blank>www.lm-sensors.org</A> site<BR>2. Device Driver code for EEPOM IC available on <A href="https://mail.alphion.com/exchweb/bin/redir.asp?URL=http://lists.lm-sensors.org/pipermail/lm-sensors/2005-July/013021.html" target=_blank>http://lists.lm-sensors.org/pipermail/lm-sensors/2005-July/013021.html</A><BR>3. The documents available in "/usr/src/linux/Documentation/i2c" directory.<BR>4. I2C Drivers, Part I&nbsp; --&gt; <A href="https://mail.alphion.com/exchweb/bin/redir.asp?URL=http://www.linuxjournal.com/node/7136/print" target=_blank>http://www.linuxjournal.com/node/7136/print</A><BR>&nbsp;&nbsp; I2C Drivers, Part II&nbsp; --&gt; <A href="https://mail.alphion.com/exchweb/bin/redir.asp?URL=http://www.linuxjournal.com/node/7252/print" target=_blank>http://www.linuxjournal.com/node/7252/print</A><BR>5. Data sheet of IC M24C02-WBN6</FONT></DIV>
<DIV><FONT face=Arial size=2>6. I2C protocol document (Philips)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#000000 size=2>But I am not getting a proper link which can help me to write a device driver.</FONT></DIV>
<DIV><FONT face=Arial color=#000000 size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#000000 size=2>Could you&nbsp; give me answer to my (silly) queries?</FONT></DIV>
<DIV><FONT face=Arial color=#000000 size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#000000 size=2>Q1. Which way is more appropiate to access a EEPOM chip?<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ---- a. Accessing through Adapter device driver (adpter driver in turn will acess the chip device driver)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ---- b. Or a /dev/ character device file node for the EEPROM IC (by registering a charcter device driver)</FONT></DIV>
<DIV><FONT face=Arial color=#000000 size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; As the IC is laying on the I2C bus with the Read (0xA0) and write(0xA1) address, I have to access it through Adapter device driver only. </FONT></DIV><FONT face=Arial color=#000000 size=2>
<DIV><BR>Q2. As there are two address available for read and Write operation, at which address location the the i2c_probe() will find the device?</DIV>
<DIV><BR>Q3. Can I use i2c_smbus_XXXXXXX functions to do interaction with the EEPROM I2C?</DIV>
<DIV>&nbsp;&nbsp;&nbsp; ---- As per my understanding it should&nbsp; work as SMB is subset of I2C.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Q4. Where I can get the purpose of 'command' argument in 'i2c_smbus_XXXX' functions from 'i2c.h'?</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; extern s32 i2c_smbus_read_byte_data(struct i2c_client * client, u8 command);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; extern s32 i2c_smbus_write_byte_data(struct i2c_client * client, u8 command, u8 value);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; extern s32 i2c_smbus_read_word_data(struct i2c_client * client, u8 command);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;extern s32 i2c_smbus_write_word_data(struct i2c_client * client, u8 command, u16 value);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; extern s32 i2c_smbus_write_block_data(struct i2c_client * client, u8 command, u8 length, u8 *values);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; extern s32 i2c_smbus_read_i2c_block_data(struct i2c_client * client,&nbsp; u8 command, u8 *values);</DIV>
<DIV>&nbsp;</DIV>
<DIV>Q4. Is there any guide available on Net for writing a <STRONG>I2C EEMPROM Chip</STRONG> device driver?</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>Regards,<BR>Sachin Rane</DIV>
<DIV><BR>Links that I have gone through:</DIV>
<DIV><A href="https://mail.alphion.com/exchweb/bin/redir.asp?URL=http://www.lm-sensors.org/browser/lm-sensors/trunk/doc" target=_blank>http://www.lm-sensors.org/browser/lm-sensors/trunk/doc</A><BR><A href="https://mail.alphion.com/exchweb/bin/redir.asp?URL=http://www.lm-sensors.org/browser/lm-sensors/trunk" target=_blank>http://www.lm-sensors.org/browser/lm-sensors/trunk</A><BR><A href="https://mail.alphion.com/exchweb/bin/redir.asp?URL=http://www.lm-sensors.org/browser/lm-sensors/trunk/doc/developers" target=_blank>http://www.lm-sensors.org/browser/lm-sensors/trunk/doc/developers</A><BR><A href="https://mail.alphion.com/exchweb/bin/redir.asp?URL=http://www.lm-sensors.org/browser/lm-sensors/trunk/doc/chips/adm1024" target=_blank>http://www.lm-sensors.org/browser/lm-sensors/trunk/doc/chips/adm1024</A><BR><A href="https://mail.alphion.com/exchweb/bin/redir.asp?URL=http://www.lm-sensors.org/browser/lm-sensors/trunk/doc/developers" target=_blank>http://www.lm-sensors.org/browser/lm-sensors/trunk/doc/developers</A><BR><A href="https://mail.alphion.com/exchweb/bin/redir.asp?URL=http://www.lm-sensors.org/browser/lm-sensors/trunk/doc/developers/new_drivers" target=_blank>http://www.lm-sensors.org/browser/lm-sensors/trunk/doc/developers/new_drivers</A><BR><A href="https://mail.alphion.com/exchweb/bin/redir.asp?URL=http://www.lm-sensors.org/browser/lm-sensors/trunk/doc/FAQ" target=_blank>http://www.lm-sensors.org/browser/lm-sensors/trunk/doc/FAQ</A><BR><A href="https://mail.alphion.com/exchweb/bin/redir.asp?URL=http://www.lm-sensors.org/browser/lm-sensors/trunk/prog" target=_blank>http://www.lm-sensors.org/browser/lm-sensors/trunk/prog</A><BR><A href="https://mail.alphion.com/exchweb/bin/redir.asp?URL=http://www.lm-sensors.org/browser/lm-sensors/trunk/prog/doc" target=_blank>http://www.lm-sensors.org/browser/lm-sensors/trunk/prog/doc</A><BR><A href="https://mail.alphion.com/exchweb/bin/redir.asp?URL=http://www.lm-sensors.org/browser/lm-sensors/trunk/prog/eeprom" target=_blank>http://www.lm-sensors.org/browser/lm-sensors/trunk/prog/eeprom</A><BR><A href="https://mail.alphion.com/exchweb/bin/redir.asp?URL=http://www.lm-sensors.org/browser/lm-sensors/trunk/prog/eeprom/ddcmon" target=_blank>http://www.lm-sensors.org/browser/lm-sensors/trunk/prog/eeprom/ddcmon</A><BR><A href="https://mail.alphion.com/exchweb/bin/redir.asp?URL=http://www.lm-sensors.org/browser/lm-sensors/trunk/prog/eepromer" target=_blank>http://www.lm-sensors.org/browser/lm-sensors/trunk/prog/eepromer</A><BR><A href="https://mail.alphion.com/exchweb/bin/redir.asp?URL=http://www.lm-sensors.org/browser/lm-sensors/trunk/prog/eepromer/24cXX.c" target=_blank>http://www.lm-sensors.org/browser/lm-sensors/trunk/prog/eepromer/24cXX.c</A><BR><A href="https://mail.alphion.com/exchweb/bin/redir.asp?URL=http://www.lm-sensors.org/browser/lm-sensors/trunk/prog/eepromer/eeprom.c" target=_blank>http://www.lm-sensors.org/browser/lm-sensors/trunk/prog/eepromer/eeprom.c</A><BR><A href="https://mail.alphion.com/exchweb/bin/redir.asp?URL=http://www.lm-sensors.org/browser/lm-sensors/trunk/prog/eepromer/README" target=_blank>http://www.lm-sensors.org/browser/lm-sensors/trunk/prog/eepromer/README</A><BR><A href="https://mail.alphion.com/exchweb/bin/redir.asp?URL=http://www.lm-sensors.org/browser/lm-sensors/trunk/prog/eepromer/README.eeprom" target=_blank>http://www.lm-sensors.org/browser/lm-sensors/trunk/prog/eepromer/README.eeprom</A><BR><A href="https://mail.alphion.com/exchweb/bin/redir.asp?URL=http://www.lm-sensors.org/wiki/Devices" target=_blank>http://www.lm-sensors.org/wiki/Devices</A><BR><A href="https://mail.alphion.com/exchweb/bin/redir.asp?URL=http://www.lm-sensors.org/wiki/Documentation" target=_blank>http://www.lm-sensors.org/wiki/Documentation</A></DIV></FONT></FONT></DIV></BODY></HTML>