tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Changing the return value of xxx_attach() from void to int.
Hello,
On Fri, 1 Jul 2016 04:05:05 +0000 (UTC)
mlelstv%serpens.de@localhost (Michael van Elst) wrote:
> uebayasi%gmail.com@localhost (Masao Uebayashi) writes:
>
> >I agree. And I always have a question: if dependencies are kept in
> >the autoconf tree, why do you have to manually call config_defer()?
>
> Apparently that's not treated as a dependency. Only the driver
> knows if and what needs to be deferred. Would exposing this
> information make things easier?
I have several drivers that depend on other drivers which attach at
completely different points. Some examples:
- valkyriefb attaches at mainbus, its pixel clock generator is
controlled through an iic bus which in turn is controlled by CUDA
( think powermac microcontroller )
- the snapper audio driver. DMA machinery drives an i2s bus which part
of the macio goop and attaches there, at the other end of the i2s bus
there's an audio codec which is controlled via iic again. Some macppc
boxes also have an external iic-controlled mixer behind their awacs
chips.
- many SoCs have video output circuitry separate from possibly external
HDMI transmitters
- speaking of SoCs, the iic bus used to talk to a monitor probably
doesn't attach anywhere near the video DMA machinery ( example:
Cubietruck, the VGA output uses awiniic4 or somesuch )
So, ways to express something like 'defer attaching driver A until
<condition>' would be nice, with <condition> being things like 'trying
to attach B', 'successfully attaching B', 'successfully attaching one
or more of B, C, D' etc. in a more generic way instead of hacking it
into every driver that needs it would be nice.
have fun
Michael
Home |
Main Index |
Thread Index |
Old Index