public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Initialisation sequencing.
@ 2005-03-02 23:32 Ian Molton
  2005-03-03  2:43 ` Jamey Hicks
  0 siblings, 1 reply; 2+ messages in thread
From: Ian Molton @ 2005-03-02 23:32 UTC (permalink / raw)
  To: Kernel Mailing List

Hi.

I have a problem. It affects both modular and non modular builds, and I 
dont see an obviously correct solution.

The problem is that I have a video chip which supports some GPIOs and an 
LCD display.

some LCD functions are controlled via the GPIOs, like backlighting.

so the driver is split into a video driver which exports three GPIO 
related functions, and a backlight driver which requires them to work. 
Both are on the platform bus.

the problem occurs when the backlight driver gets probed before the 
video driver. it tries to access the GPIO functions, which try to write 
to random locations as the memory hasnt been ioremap()ed by the as yet 
unprobed video driver, and it all predictably falls over in a gibbering 
heap.

I cant spin at this point without deadlocking the video driver and 
ending up never being able to call the gpio functions, for obvious reasons.

I've tried making the backlight driver a child of the video driver, 
hoping the probe functions are called in 'bus order', ie. parents first. 
This failed.

I could make the backlight driver initialise late, but that seems like a 
hack. scheduling work risks deadlock.

what is the correct solution? does one exist?

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-03-03  2:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-02 23:32 Initialisation sequencing Ian Molton
2005-03-03  2:43 ` Jamey Hicks

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox