Thanks for the clarification. As far I2C device driver, my question was really "can i write a I2C driver for a specific device with ioctl support and submit it for review ?" I don't see any existing I2C device driver with ioctl support and hence the question.
On Tue, Feb 5, 2013 at 1:59 PM, Paul Goyette <[email protected]> wrote: > The existing ioctl mechanism is for access to the i2c bus itself. For an > example of how to use the existing i2c ioctl interface, please take a look > at $SRCDIR/usr.sbin/i2cscan/i2cscan.c > > Note that this is really different from providing an ioctl for accessing > your specific i2c device. The existing mechanism accesses the i2c bus > itself. Your device driver would need to have its own routines. > > Please feel free to submit your completed driver to us for review. > > > > On Tue, 5 Feb 2013, Rohan Akela wrote: > >> Hello >> >> I am in the process of implementing driver for I2C device and need to >> read/write to device from user space. I was thinking of using usual >> ioctl based mechanism to do it.I don't see any issues in implementing >> ioctls for I2C device. But this email thread >> http://osdir.com/ml/os.netbsd.devel.embedded/2006-05/msg00008.html >> seems to suggest that I2c drivers in NetBSD should not use ioctl. I am >> not sure if the observations in thread are still relevant. >> >> What is the issue in implementing ioctl for I2C device ? >> >> If I submit I2C driver to NetBSD,will it accepted or rejected ? >> >> Thanks >> >> !DSPAM:51117ee3145151234514069! >> >> > > ------------------------------------------------------------------------- > | Paul Goyette | PGP Key fingerprint: | E-mail addresses: | > | Customer Service | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com | > | Network Engineer | 0786 F758 55DE 53BA 7731 | pgoyette at juniper.net | > | Kernel Developer | | pgoyette at netbsd.org | > -------------------------------------------------------------------------
