Subject: Re: Ordering device probes
To: None <tech-kern@netbsd.org>
From: Valeriy E. Ushakov <uwe@ptc.spbu.ru>
List: tech-kern
Date: 02/20/2006 18:05:04
On Mon, Feb 20, 2006 at 08:29:19 -0600, Peter Seebach wrote:

> On some systems, it may be necessary to probe one device after
> another.  The PCI bus-ordering hack isn't sufficient, because some
> devices may be configurable only after a device on a whole different
> bus.  The config_defer code is able to do this, but would result in
> a generic driver having special magic, and a callback function, used
> only on some platforms some of the time.

HPC ports have (underdocumented) config_hook infrastructure.  Looking
for config_hook.* in sys/arch/hpc* might provide some examples.

E.g. HD64461 companion chip in SH3 based PDAs.  It provides LCD
controller.  However the LCD panel itself (power, brightness,
contrast) is controlled via CPUs integrated pin function controller
(i.e. gpio).  You might take a look how hpcsh/dev/hd64461/hd64461video.c
and hpcsh/dev/j6x0lcd.c use config_hook infrastructure to work
together.


SY, Uwe
-- 
uwe@ptc.spbu.ru                         |       Zu Grunde kommen
http://snark.ptc.spbu.ru/~uwe/          |       Ist zu Grunde gehen