That's a great solution. What should the command line interface look like?
owfs /dev/i2c-?/address -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Christoph Scheurer Sent: Friday, March 10, 2006 7:25 AM To: owfs-developers@lists.sourceforge.net Subject: Re: [Owfs-developers] w1 changes > > > Sorry, that was too unspecific. What I mean is: one could just use an empty > > > I2C-slave module with only the basic I2C communication support that > > > recognizes the DS2482 and move all the W1 specific functions to OWFS. > > > > > Besides having only a brief look into the w1 kernel code, I think handling the > > remote chips is a userspace task, like with RS232 host adapter interface in > > kernelspace and modem/terminal control by a userspace program. > That is exactly what I had in mind. The DS2482 is an I2C slave, so you have > a kernel module for the DS2482 which only recognizes the chip as an I2C slave > and attaches it to the I2C master (whatever that is in your application: > on-board, in-chip, parallel, serial, ...). Then you can communicate to the > DS2482 through opening the /dev/i2c-? that represents the I2C-bus on which > your DS2482 is attached the same way as you talk to a serial 1-wire adapter > through /dev/ttyS? . The only complication (which is more like the USB case) > is that now you have to explicitly include the I2C-address of your DS2482 > since there can be multiple DS2482 on any I2C-bus. You can even go one step further and completely eliminate the module for the DS2482 if I understand kernel-src/Documentation/i2c/dev-interface correctly. You just open the correct /dev/i2c-? , use ioctl(file,I2C_SLAVE,long addr) to set the (known) address of your DS2482 and use read() and write() to communicate with the DS2482. This is complete user-space access as far as the 1-wire functionality is concerned and kernel modules are only used for the I2C (master-) adapters. Christoph -- Christoph Scheurer GnuPG key Id: 0x6128C6B6 http://scheurer-clark.net ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ Owfs-developers mailing list Owfs-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/owfs-developers ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642 _______________________________________________ Owfs-developers mailing list Owfs-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/owfs-developers