depends on tristate logic (was: [PATCH] rfkill: Regulator consumerdriver for rfkill)

From: Johannes Berg
Date: Thu Apr 07 2011 - 06:42:22 EST


[trimming distribution list, changing subject]

> > > Boolean operators for tristate logic isn't intuitive at all IMHO.
> >
> > *shrug*. You're free to propose patches to the kconfig system to make it
> > more intuitive. :-)
>
> FullACK;-)
> But no intuitive tristate logic operators come to my mind (otherwise I
> would have mentioned them above).
> And there are more logic implications in "depends on RFKILL".

Yes, of course. And you have to consider four basic possibilities:

bool BFOO1
depends on BBAR
bool BFOO2
depends on TBAR

and

tristate TFOO1
depends on BBAR
tristate TFOO2
depends on TBAR

(where the first letter indicates bool vs. tristate)


Then, you get a number of restrictions like this (iirc):

XBAR = n => YFOON = n
(8 restrictions for the different values of X, Y, N)

TBAR = m => TFOO2 = m || TFOO2 = n

And those should be all restrictions there are, I think?

johannes

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/