From: albertd <alb...@sy...> - 2005-03-10 04:20:33
|
I think David has it right: There is one /dev/i2c-? node per i2c *bus* and an ioctl is used to select the slave unit on the bus to connect to. I have trivially adjusted my devices to build only 3 of the nodes since that is all I expect to ever need even if I resort to bitbanging a couple with GPIOs Index: sources/device_table.txt =================================================================== --- sources/device_table.txt (revision 422) +++ sources/device_table.txt (working copy) @@ -68,7 +68,7 @@ /dev/ttyS c 666 0 0 4 64 0 1 4 /dev/fb c 640 0 5 29 0 0 32 4 /dev/rfcomm c 666 0 0 216 0 0 1 4 -/dev/i2c- c 666 0 0 89 0 0 1 255 +/dev/i2c- c 666 0 0 89 0 0 1 2 #/dev/ttySA c 666 0 0 204 5 0 1 3 #/dev/psaux c 666 0 0 10 1 0 0 - #/dev/ppp c 666 0 0 108 0 - - - On the side: has anyone got a i2c real time clock they would recommend? I would prefer one with battery backup on a semi-independant board rather than one I would have to build up from components. Albert. David Farrell wrote: >--- Craig Hughes <cr...@hu...> wrote: > > >>On Mar 8, 2005, at 7:50 PM, David Farrell >>wrote: >> >> >> >>>I2C looks disabled, well enough... >>> >>>I know this was added some time ago but why >>> >>> >>are >> >> >>>there so many I2C devices? >>> >>> >>I think because in theory you could have that >>many. >> >>C >> >> > >I'm a litle confused. In the kernel >documentation (dev-interface) it seems to >indicate the -0 is the host, not the device. You >need ioctl to specify device address. It is only >the i2c kernel module i2c-dev that is used right? > >David. > |