From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wei Liang Subject: I2C device driver to simutaneously support 2 devices Date: Wed, 14 May 2008 23:18:46 -0700 (PDT) Message-ID: <213411.97989.qm@web30304.mail.mud.yahoo.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2756282725842624599==" Return-path: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: i2c-bounces-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org Errors-To: i2c-bounces-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org To: i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org List-Id: linux-i2c@vger.kernel.org --===============2756282725842624599== Content-Type: multipart/alternative; boundary="0-1960046990-1210832326=:97989" --0-1960046990-1210832326=:97989 Content-Type: text/plain; charset=us-ascii Hi, I received this email address from Gregg Koah-Hartman. I am writing to seek your advise on writing a I2C device driver. I am currently writing a device driver based on the sample code by Gregg in Linux Journal (http://www.linuxjournal.com/article/7252). I am new to linux device driver development and am currently attempting to modify the code to enable it to simultaneously support 2 I2C devices - both devices resides on different addresses. I have tried adding another i2c_add_driver function in 'static int __init tiny_init(void)' and subsequently reduplicate all functions involved in registering a new driver (e.g. static struct i2c_driver, i2c_detect, etc). However, the code didn't seem to start. I have scoured through I2C documentations in the Linux kernel and also the book Linux Device Driver (O'Reilly) but have yet to come across any reference for the above-mentioned task. I am hoping that you could provide a few pointers on how best to proceed. Thanks in advance. Cheers, Wei Liang --0-1960046990-1210832326=:97989 Content-Type: text/html; charset=us-ascii
Hi,

I received this email address from Gregg Koah-Hartman.  I am writing to seek your advise  on writing a I2C device driver. 

I am currently writing a device driver based on the sample code by Gregg in Linux Journal (http://www.linuxjournal.com/article/7252).   I am new to linux device driver development and am currently attempting to modify the code to enable it to simultaneously support 2 I2C devices - both devices resides on different addresses. 

I have tried adding another i2c_add_driver function in 'static int __init tiny_init(void)' and subsequently reduplicate all functions involved in registering a new driver (e.g. static struct i2c_driver, i2c_detect, etc).  However, the code didn't seem to start.   I have scoured through I2C documentations in the Linux kernel  and also the book Linux Device Driver (O'Reilly) but have yet to come  across any reference for the above-mentioned task. 

I am hoping that you could provide a few pointers on how best to proceed.  Thanks in advance.

Cheers,
Wei Liang

--0-1960046990-1210832326=:97989-- --===============2756282725842624599== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ i2c mailing list i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org http://lists.lm-sensors.org/mailman/listinfo/i2c --===============2756282725842624599==--