[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: odd dmesg
- To: misc_(_at_)_openbsd_(_dot_)_org
- Subject: Re: odd dmesg
- From: Brian <bwaichu_(_at_)_yahoo_(_dot_)_com>
- Date: Tue, 4 Apr 2006 12:39:58 -0700 (PDT)
--- Theo de Raadt <deraadt_(_at_)_cvs_(_dot_)_openbsd_(_dot_)_org> wrote:
> On iic bus 0, you have a sch5017 chip at address 0x2e for which we do
> not have a driver yet:
> 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
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)
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
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.
Tired of spam? Yahoo! Mail has the best spam protection around
Visit your host, monkey.org