Re: pcf module problem

From: John Baldwin <jhb_at_freebsd.org>
Date: Fri, 14 Oct 2005 14:59:01 -0400
On Friday 14 October 2005 12:51 am, Milan Obuch wrote:
> On Thursday 13 October 2005 21:51, John Baldwin wrote:
> > On Thursday 06 October 2005 07:21 am, Milan Obuch wrote:
>
> ...
>
> > > Then I checked pcf module and found the same behavior. If you have no
> > > 'device iicbus' in kernel configuration, issuing 'kldload pcf' gives
> > > link_elf: symbol iicbus_intr undefined
> > > kldload: can't load pcf: No such file or directory.
> > >
> > > Adding 'device iibus' into kernel configuration and rebuilding kernel
> > > fixes this, so it looks like symbol is just not exported.
>
> ...
>
> > > Anyway, is anybody out there using pcf? There is some work done in this
> > > area, but not yet linked into main tree. I have not pcf hardware, so I
> > > can not test anything in this area, but it would be good to make the
> > > transition from older i386/isa/pcf.c to new dev/pcf/...
> >
> > Sounds like it is missing a 'MODULE_DEPEND(iicbus, 1, 1, 1);' line.  Can
> > you try adding one and seeing if it fixes the kldload of pcf?
>
> Bingo!
>
> Actually, it is 'MODULE_DEPEND(pcf_isa, iicbus, 1, 1, 1);', at least with
> 6.0-RC1, after looking elsewhere I added 'MODULE_VERSION(pcf_isa, 1);' as
> well. Those ones are not written literally at other places, but
> nevertheless, this works.

I don't think you need the MODULE_VERSION line, just the one depend, and yes, 
you would need the pcf_isa part.

> Still, transition from 'sys/i386/isa/pcf.c' to '/sys/dev/pcf/*' solves this
> isue as well, because there it is already fixed.

Ah, I thought you were referring to moving the driver earlier, not that it was 
in both places.  It looks like joerg_at_ is the person to ask about that 
actually as he was in charge of moving the driver over.  Joerg, is there any 
reason we can't just switch over to sys/dev/pcf and remove sys/i386/isa/pcf.c 
at this point?

>
> With Makefile changed to
>
> .PATH:          ${.CURDIR}/../../../../dev/pcf
> KMOD            = pcf
> SRCS            = device_if.h bus_if.h iicbus_if.h isa_if.h \
>                   pcf.c pcf_isa.c
>
> .include <bsd.kmod.mk>
>
> it just works. I changed directly Makefile
> in /sr/src/sys/modules/i2c/controllers/pcf, just for test, so maybe this is
> not enough, however, it works.
>
> So, the question remains - is anybody out there using pcf devices to
> confirm this really works? For me it compiles and kldloads, but I have no
> real device to test real functionality.
>
> And the other question - is anybody out there using i2c devices at all? If
> so, I would like to hear about their experiences. This area seems to be not
> covered anywhere. Googling for 'freebsd i2c' and similar does not reveal
> anything interesting for me...

-- 
John Baldwin <jhb_at_FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve"  =  http://www.FreeBSD.org
Received on Fri Oct 14 2005 - 17:30:23 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:45 UTC