* Fwd: Using select in boolean dependents of a tristate symbol
[not found] <d120d5000607131232i74dfdb9t1a132dfc5dd32bc4@mail.gmail.com>
@ 2006-07-13 19:35 ` Dmitry Torokhov
2006-07-13 22:58 ` Roman Zippel
0 siblings, 1 reply; 9+ messages in thread
From: Dmitry Torokhov @ 2006-07-13 19:35 UTC (permalink / raw)
To: Roman Zippel; +Cc: linux-kernel
[Argh.. resending to correct LKML address]
Roman,
Question for you as Kconfig maintainer - I have a module (HID) that
has a few sub-options. Now HID can be built as a module but
sub-options are suimple booleans. Some of these sub-options will
depend on a common code which is moved out of HID driver. Now I want
to use "select" like this:
config THRUSTMASTER_FF
bool "ThrustMaster FireStorm Dual Power 2 support (EXPERIMENTAL)"
depends on HID_FF && EXPERIMENTAL
+ select INPUT_FF_MEMLESS
help
Say Y here if you have a THRUSTMASTER FireStore Dual Power 2,
and want to enable force feedback support for it.
Unfortunately this forces INPUT_FF_MEMLESS to always be built-in,
although if HID is a module it could be a module as well. Do you have
any suggestions as to how allow INPUT_FF_MEMLESS to be compiled as a
module?
Thanks!
--
Dmitry
--
Dmitry
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Fwd: Using select in boolean dependents of a tristate symbol
2006-07-13 19:35 ` Fwd: Using select in boolean dependents of a tristate symbol Dmitry Torokhov
@ 2006-07-13 22:58 ` Roman Zippel
2006-07-14 2:31 ` Dmitry Torokhov
0 siblings, 1 reply; 9+ messages in thread
From: Roman Zippel @ 2006-07-13 22:58 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: linux-kernel
Hi,
On Thu, 13 Jul 2006, Dmitry Torokhov wrote:
> config THRUSTMASTER_FF
> bool "ThrustMaster FireStorm Dual Power 2 support (EXPERIMENTAL)"
> depends on HID_FF && EXPERIMENTAL
> + select INPUT_FF_MEMLESS
> help
> Say Y here if you have a THRUSTMASTER FireStore Dual Power 2,
> and want to enable force feedback support for it.
>
> Unfortunately this forces INPUT_FF_MEMLESS to always be built-in,
> although if HID is a module it could be a module as well. Do you have
> any suggestions as to how allow INPUT_FF_MEMLESS to be compiled as a
> module?
You need to directly include HID into the dependencies, only the direct
dependencies for config entry are used for the select.
bye, Roman
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Fwd: Using select in boolean dependents of a tristate symbol
2006-07-13 22:58 ` Roman Zippel
@ 2006-07-14 2:31 ` Dmitry Torokhov
2006-07-14 9:20 ` Roman Zippel
0 siblings, 1 reply; 9+ messages in thread
From: Dmitry Torokhov @ 2006-07-14 2:31 UTC (permalink / raw)
To: Roman Zippel; +Cc: linux-kernel
On Thursday 13 July 2006 18:58, Roman Zippel wrote:
> Hi,
>
> On Thu, 13 Jul 2006, Dmitry Torokhov wrote:
>
> > config THRUSTMASTER_FF
> > bool "ThrustMaster FireStorm Dual Power 2 support (EXPERIMENTAL)"
> > depends on HID_FF && EXPERIMENTAL
> > + select INPUT_FF_MEMLESS
> > help
> > Say Y here if you have a THRUSTMASTER FireStore Dual Power 2,
> > and want to enable force feedback support for it.
> >
> > Unfortunately this forces INPUT_FF_MEMLESS to always be built-in,
> > although if HID is a module it could be a module as well. Do you have
> > any suggestions as to how allow INPUT_FF_MEMLESS to be compiled as a
> > module?
>
> You need to directly include HID into the dependencies, only the direct
> dependencies for config entry are used for the select.
>
Oh, this indeed works, thanks a lot! And I was thinking I would need to
implement something like "select <expr> as <expr>" in kconfig ;)
--
Dmitry
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Fwd: Using select in boolean dependents of a tristate symbol
2006-07-14 2:31 ` Dmitry Torokhov
@ 2006-07-14 9:20 ` Roman Zippel
2006-07-19 20:17 ` Dmitry Torokhov
0 siblings, 1 reply; 9+ messages in thread
From: Roman Zippel @ 2006-07-14 9:20 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: linux-kernel
Hi,
On Thu, 13 Jul 2006, Dmitry Torokhov wrote:
> On Thursday 13 July 2006 18:58, Roman Zippel wrote:
> > Hi,
> >
> > On Thu, 13 Jul 2006, Dmitry Torokhov wrote:
> >
> > > config THRUSTMASTER_FF
> > > bool "ThrustMaster FireStorm Dual Power 2 support (EXPERIMENTAL)"
> > > depends on HID_FF && EXPERIMENTAL
> > > + select INPUT_FF_MEMLESS
> > > help
> > > Say Y here if you have a THRUSTMASTER FireStore Dual Power 2,
> > > and want to enable force feedback support for it.
> > >
> > > Unfortunately this forces INPUT_FF_MEMLESS to always be built-in,
> > > although if HID is a module it could be a module as well. Do you have
> > > any suggestions as to how allow INPUT_FF_MEMLESS to be compiled as a
> > > module?
> >
> > You need to directly include HID into the dependencies, only the direct
> > dependencies for config entry are used for the select.
> >
>
> Oh, this indeed works, thanks a lot! And I was thinking I would need to
> implement something like "select <expr> as <expr>" in kconfig ;)
What you could do is to use "select INPUT_FF_MEMLESS if HID" to make it
visible that this dependency is actually for select.
This point is a little subtle and I'm not completely happy with it, maybe
I'm going to split this into two select variations - one which includes
all the dependencies and one which only uses the config symbol to select.
bye, Roman
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Fwd: Using select in boolean dependents of a tristate symbol
2006-07-14 9:20 ` Roman Zippel
@ 2006-07-19 20:17 ` Dmitry Torokhov
2006-07-19 20:41 ` Valdis.Kletnieks
2006-07-27 0:42 ` Roman Zippel
0 siblings, 2 replies; 9+ messages in thread
From: Dmitry Torokhov @ 2006-07-19 20:17 UTC (permalink / raw)
To: Roman Zippel; +Cc: linux-kernel
On 7/14/06, Roman Zippel <zippel@linux-m68k.org> wrote:
>
> What you could do is to use "select INPUT_FF_MEMLESS if HID" to make it
> visible that this dependency is actually for select.
> This point is a little subtle and I'm not completely happy with it, maybe
> I'm going to split this into two select variations - one which includes
> all the dependencies and one which only uses the config symbol to select.
>
Roman,
Another question for you - what is the best way to describe
dependancy of a sub-option on a subsystem so you won't end up with the
subsystem as a module and user built in. Something like
config IBM_ASM
tristate "Device driver for IBM RSA service processor"
depends on X86 && PCI && EXPERIMENTAL
...
config IBM_ASM_INPUT
bool "Support for remote keyboard/mouse"
depends on IBM_ASM && (INPUT=y || INPUT=IMB_ASM)
But the above feels yucky. Could we have something like:
depends on matching(INPUT, IBM_ASM)
Thank you.
--
Dmitry
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Fwd: Using select in boolean dependents of a tristate symbol
2006-07-19 20:17 ` Dmitry Torokhov
@ 2006-07-19 20:41 ` Valdis.Kletnieks
2006-07-19 20:50 ` Dmitry Torokhov
2006-07-27 0:42 ` Roman Zippel
1 sibling, 1 reply; 9+ messages in thread
From: Valdis.Kletnieks @ 2006-07-19 20:41 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: Roman Zippel, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 796 bytes --]
On Wed, 19 Jul 2006 16:17:38 EDT, Dmitry Torokhov said:
> Another question for you - what is the best way to describe
> dependancy of a sub-option on a subsystem so you won't end up with the
> subsystem as a module and user built in. Something like
>
> config IBM_ASM
> tristate "Device driver for IBM RSA service processor"
> depends on X86 && PCI && EXPERIMENTAL
> ...
> config IBM_ASM_INPUT
> bool "Support for remote keyboard/mouse"
> depends on IBM_ASM && (INPUT=y || INPUT=IMB_ASM)
>
> But the above feels yucky. Could we have something like:
>
> depends on matching(INPUT, IBM_ASM)
What feels yucky is the dependency of a 'bool' on a tristate. Does the
ASM_INPUT get used in places where the source file can only be a builtin,
not a module?
[-- Attachment #2: Type: application/pgp-signature, Size: 226 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Fwd: Using select in boolean dependents of a tristate symbol
2006-07-19 20:41 ` Valdis.Kletnieks
@ 2006-07-19 20:50 ` Dmitry Torokhov
0 siblings, 0 replies; 9+ messages in thread
From: Dmitry Torokhov @ 2006-07-19 20:50 UTC (permalink / raw)
To: Valdis.Kletnieks@vt.edu; +Cc: Roman Zippel, linux-kernel
On 7/19/06, Valdis.Kletnieks@vt.edu <Valdis.Kletnieks@vt.edu> wrote:
> On Wed, 19 Jul 2006 16:17:38 EDT, Dmitry Torokhov said:
>
> > Another question for you - what is the best way to describe
> > dependancy of a sub-option on a subsystem so you won't end up with the
> > subsystem as a module and user built in. Something like
> >
> > config IBM_ASM
> > tristate "Device driver for IBM RSA service processor"
> > depends on X86 && PCI && EXPERIMENTAL
> > ...
> > config IBM_ASM_INPUT
> > bool "Support for remote keyboard/mouse"
> > depends on IBM_ASM && (INPUT=y || INPUT=IMB_ASM)
> >
> > But the above feels yucky. Could we have something like:
> >
> > depends on matching(INPUT, IBM_ASM)
>
> What feels yucky is the dependency of a 'bool' on a tristate. Does the
> ASM_INPUT get used in places where the source file can only be a builtin,
> not a module?
>
In this case ASM_INPUT enables an optional part of a bigger module
(IBM_ASM). Sometimes it is done because optional part is too small to
be split into a separately loadable module or because it is difficult
to implement "attaching" of the optional part at the later time if it
is compiled as a module.
--
Dmitry
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Fwd: Using select in boolean dependents of a tristate symbol
2006-07-19 20:17 ` Dmitry Torokhov
2006-07-19 20:41 ` Valdis.Kletnieks
@ 2006-07-27 0:42 ` Roman Zippel
2006-07-27 1:05 ` Dmitry Torokhov
1 sibling, 1 reply; 9+ messages in thread
From: Roman Zippel @ 2006-07-27 0:42 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: linux-kernel
Hi,
On Wed, 19 Jul 2006, Dmitry Torokhov wrote:
> Another question for you - what is the best way to describe
> dependancy of a sub-option on a subsystem so you won't end up with the
> subsystem as a module and user built in. Something like
>
> config IBM_ASM
> tristate "Device driver for IBM RSA service processor"
> depends on X86 && PCI && EXPERIMENTAL
> ...
> config IBM_ASM_INPUT
> bool "Support for remote keyboard/mouse"
> depends on IBM_ASM && (INPUT=y || INPUT=IMB_ASM)
>
> But the above feels yucky. Could we have something like:
>
> depends on matching(INPUT, IBM_ASM)
This is not really descriptive of what it does, is it?
Linus suggested a syntax like (IBM_ASM && IMB_ASM<=INPUT)
Another alternative which works now is to just disable the one invalid
case explicitely:
depends on IBM_ASM && INPUT
depends on !(IBM_ASM=y && INPUT=m)
bye, Roman
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Fwd: Using select in boolean dependents of a tristate symbol
2006-07-27 0:42 ` Roman Zippel
@ 2006-07-27 1:05 ` Dmitry Torokhov
0 siblings, 0 replies; 9+ messages in thread
From: Dmitry Torokhov @ 2006-07-27 1:05 UTC (permalink / raw)
To: Roman Zippel; +Cc: linux-kernel
On Wednesday 26 July 2006 20:42, Roman Zippel wrote:
> Hi,
>
> On Wed, 19 Jul 2006, Dmitry Torokhov wrote:
>
> > Another question for you - what is the best way to describe
> > dependancy of a sub-option on a subsystem so you won't end up with the
> > subsystem as a module and user built in. Something like
> >
> > config IBM_ASM
> > tristate "Device driver for IBM RSA service processor"
> > depends on X86 && PCI && EXPERIMENTAL
> > ...
> > config IBM_ASM_INPUT
> > bool "Support for remote keyboard/mouse"
> > depends on IBM_ASM && (INPUT=y || INPUT=IMB_ASM)
> >
> > But the above feels yucky. Could we have something like:
> >
> > depends on matching(INPUT, IBM_ASM)
>
> This is not really descriptive of what it does, is it?
> Linus suggested a syntax like (IBM_ASM && IMB_ASM<=INPUT)
> Another alternative which works now is to just disable the one invalid
> case explicitely:
>
> depends on IBM_ASM && INPUT
> depends on !(IBM_ASM=y && INPUT=m)
>
OK, then I'll be disabling invalid cases explicitly for now.
Thank you Roman.
--
Dmitry
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2006-07-27 1:05 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <d120d5000607131232i74dfdb9t1a132dfc5dd32bc4@mail.gmail.com>
2006-07-13 19:35 ` Fwd: Using select in boolean dependents of a tristate symbol Dmitry Torokhov
2006-07-13 22:58 ` Roman Zippel
2006-07-14 2:31 ` Dmitry Torokhov
2006-07-14 9:20 ` Roman Zippel
2006-07-19 20:17 ` Dmitry Torokhov
2006-07-19 20:41 ` Valdis.Kletnieks
2006-07-19 20:50 ` Dmitry Torokhov
2006-07-27 0:42 ` Roman Zippel
2006-07-27 1:05 ` Dmitry Torokhov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox