khali at linux-fr.org
Fri Oct 3 09:56:47 CEST 2008
On Thu, 2 Oct 2008 18:03:35 -0400, naitik amin wrote:
> I was trying to use the i2c-stub driver.
> What I did was I hardcoded the address to 0x23 and inserted the i2c-stub.ko
Hard-coded? How, and why? The address is supposed to be passed as a
modprobe i2c-stub chip_addr=0x23
> I then inserted ds1682.ko also part of the 2.6 kernel.
Which kernel version exactly?
> I was hoping to see that the probe function for ds1682.ko to be called but
> it didn't. Can someone comment on what I maybe missing.
The ds1682 driver is a new-style driver, it doesn't scan the adapters
for devices. Instead, kernel code must explicitly instantiate the
devices. Alternatively, we could add a mechanism to instantiate devices
from user-space, but it's not there yet.
I don't think you will get it to work anyway, because the ds1682 driver
makes use of I2C block transactions, which i2c-stub doesn't support
yet. So you would have to add support for I2C block transactions first.
> Oh and BTW I did change the i2c_board_info by calling
> i2c_register_board_info in machine level init. The parameters that I had
> here were "ds1362" for driver name and 0x23 for address.
"ds1362"? The only device supported by the ds1682 driver is "ds1682".
But the way I2C devices are matched changed recently, so it really
depends on what exact kernel version you are using.
Anyway, what are you trying to achieve in the first place?
More information about the i2c