On Thursday 20 November 2008, Lopez Cruz, Misael wrote:
> > On Thursday 20 November 2008, [EMAIL PROTECTED] wrote:
> > > +       tristate "SoC Audio support for Texas Instruments SDP3430"
> > > +       depends on SND_OMAP_SOC && MACH_OMAP_3430SDP
> > > +       select SND_OMAP_SOC_MCBSP
> > > +       select SND_SOC_TWL4030
> > 
> > depends also on TWL4030_CORE, yes?
> The machine driver itself doesn't depend on TWL4030_CORE, but
> TWL4030 SoC codec driver does (sound/soc/codecs/Kconfig) 
> 
> config SND_SOC_TWL4030
>         tristate
>         depends on TWL4030_CORE
> 
> Although that dependency is overridden by _select_ statement.

No it isn't.  Reverse dependencies don't work like you might
expect ... even when there's no ambiguity in walking up a
chain of them, *no* additional dependencies are flagged.

So as you've written it, SND_SOC_TWL4030 will be active,
but not TWL4030_CORE on which it depends.


If you fix that in Kconfig, you'd make a lot of folk
fairly happy ... but there'd be fun ambiguities to cope
with.  Example:

        config X
                select D
        config D
                depends on (A && B) || C

It's not clear whether to enable both A and B; just C;
or all of them...

Probably asking the user to resolve such issues would be
necessary.  Coming up with all the solutions would be a bit
more complex than a Prolog interpreter, since Kconfig uses
tristate logic not boolean.


> What should be the best way to handle this dependency? Directly
> in kconfig entry for each TWL4030-related machine driver? 

The least error-prone answer involves no "select" statements
at all, ever.  That is, least error-prone in terms of the
output of Kconfig being a valid configuration ... in terms
of minimizing user error, I suggest just adding the single
dependency I mentioned.

- Dave

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to