--- Theo de Raadt <[EMAIL PROTECTED]> wrote: > > On iic bus 0, you have a sch5017 chip at address 0x2e for which we do > not have a driver yet: > > http://ftp.smsc.com/main/datasheets/5017.pdf > start at page 230 > > Your other iic bus appears has the same chip, or maybe it is two iic > busses wired together. >
Thanks. I started to dig in /usr/src/sys/dev/i2c, and, I think, I found the function that is resulting in my dmesg dump for iic. The result seems to be coming from /usr/src/sys/dev/i2c/i2c_scan.c (function icc_dump). If I am following the source code correctly, it looks like the setup for iic is: pci->iic->individual iic drivers. Looks like the drivers have a parent/child relationship. Each driver writes to the following structures: cfattach (which contains the malloc size of struct xx_softc) cfdriver which are a part of cfdata and the drivers also write to struct sensor. The drivers also contain the registers per their docs. It looks like reads are performed on the register using iic_exec() at the address of the device, which is passed down from the parent as a parameter (void *aux). In this case, I guess the driver for all iic devices. The drivers look to contain match, attach, and refresh functions. Where I seem to be lost is how the driver data coming from the calls to iic_exec ends up in sysctl. And if I were to write a driver based on the previous drivers all ready in /usr/src/sys/dev/i2c, how would I debug it? And I still am not sure how I would add it to the kernel since I have all ways used GENERIC. I guess I can dig through the config man pages. I have never written a driver, so I am clueless. I guess I'll keep digging, but thanks for the help. Cheers, Brian Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com