public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
* multiple slave addresses for single I2C chip
@ 2012-09-05  4:50 Zheng, Lv
       [not found] ` <1AE640813FDE7649BE1B193DEA596E88B9367A-0J0gbvR4kThpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Zheng, Lv @ 2012-09-05  4:50 UTC (permalink / raw)
  To: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org

I'm new to Linux I2C community. So let me say "Hello!" here.

We are trying to drive some sensors on Linux. The sensors are connected to the board as I2C slaves.
I noticed the i2c_board_info can be used to register i2c slaves for the embedded platforms.
I noticed there's also "address_list" member in the i2c_driver which can be used to detect the I2C slaves.
The first question is: Which one shall I use to draft my sensor codes?

If i2c_board_info is used to register platform i2c slaves, there is another issue for me:
One of the sensors has 2 slave addresses. I noticed only one slave address can be declared in one i2c_board_info.
The second question is: Shall I register the sensor's resource using 2 i2c_board_info? By doing this, shall I draft a single .c file containing 2 "i2c_driver" for them?

Best regards/Lv Zheng

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-09-06  3:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-05  4:50 multiple slave addresses for single I2C chip Zheng, Lv
     [not found] ` <1AE640813FDE7649BE1B193DEA596E88B9367A-0J0gbvR4kThpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2012-09-05  6:40   ` Jean Delvare
     [not found]     ` <20120905084018.464d72c8-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
2012-09-06  3:48       ` Zheng, Lv

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox