| 1 |
config MODULES |
| 2 |
bool "modules" |
| 3 |
|
| 4 |
# bool/tristate and optional |
| 5 |
|
| 6 |
choice BOOL |
| 7 |
bool "bool" |
| 8 |
config B_1 |
| 9 |
tristate "B_1" |
| 10 |
config B_2 |
| 11 |
tristate "B_2" |
| 12 |
endchoice |
| 13 |
|
| 14 |
choice BOOL_OPT |
| 15 |
bool "bool optional" |
| 16 |
optional |
| 17 |
config BO_1 |
| 18 |
tristate "BO_1" |
| 19 |
config BO_2 |
| 20 |
tristate "BO_2" |
| 21 |
endchoice |
| 22 |
|
| 23 |
choice TRISTATE |
| 24 |
tristate "tristate" |
| 25 |
config T_1 |
| 26 |
tristate "T_1" |
| 27 |
config T_2 |
| 28 |
tristate "T_2" |
| 29 |
endchoice |
| 30 |
|
| 31 |
choice TRISTATE_OPT |
| 32 |
tristate "tristate optional" |
| 33 |
optional |
| 34 |
config TO_1 |
| 35 |
tristate "TO_1" |
| 36 |
config TO_2 |
| 37 |
tristate "TO_2" |
| 38 |
endchoice |
| 39 |
|
| 40 |
# m-visibility |
| 41 |
|
| 42 |
choice BOOL_M |
| 43 |
bool "bool m" if m |
| 44 |
config BM_1 |
| 45 |
tristate "BM_1" |
| 46 |
config BM_2 |
| 47 |
tristate "BM_2" |
| 48 |
endchoice |
| 49 |
|
| 50 |
choice TRISTATE_M |
| 51 |
tristate "tristate m" if m |
| 52 |
config TM_1 |
| 53 |
tristate "TM_1" |
| 54 |
config TM_2 |
| 55 |
tristate "TM_2" |
| 56 |
endchoice |
| 57 |
|
| 58 |
# Defaults |
| 59 |
|
| 60 |
config TRISTATE_SYM |
| 61 |
tristate "tristate" |
| 62 |
|
| 63 |
choice DEFAULTS |
| 64 |
bool "defaults" |
| 65 |
default OPT_1 if n |
| 66 |
default OPT_2 if TRISTATE_SYM |
| 67 |
default OPT_4 |
| 68 |
config OPT_1 |
| 69 |
tristate "OPT_1" |
| 70 |
config OPT_2 |
| 71 |
tristate "OPT_2" |
| 72 |
config OPT_3 |
| 73 |
tristate "OPT_3" |
| 74 |
config OPT_4 |
| 75 |
tristate "OPT_4" |
| 76 |
endchoice |
| 77 |
|
| 78 |
choice DEFAULTS_NOT_VISIBLE |
| 79 |
bool "defaults not visible" |
| 80 |
# Skipped due to condition |
| 81 |
default OPT_6 if n |
| 82 |
# Skipped because OPT_7 is not visible |
| 83 |
default OPT_7 |
| 84 |
# This one should apply |
| 85 |
default OPT_8 |
| 86 |
config OPT_5 |
| 87 |
tristate "OPT_5" |
| 88 |
config OPT_6 |
| 89 |
tristate "OPT_6" |
| 90 |
config OPT_7 |
| 91 |
tristate "OPT_7" if n |
| 92 |
config OPT_8 |
| 93 |
tristate "OPT_8" |
| 94 |
config OPT_9 |
| 95 |
tristate "OPT_9" |
| 96 |
endchoice |
| 97 |
|
| 98 |
# Choices without an explicitly specified type should get the type of the first |
| 99 |
# symbol with a type |
| 100 |
|
| 101 |
choice NO_TYPE_BOOL |
| 102 |
prompt "no type bool" |
| 103 |
config NTB_1 |
| 104 |
bool "NTB_1" |
| 105 |
config NTB_2 |
| 106 |
tristate "NTB_2" |
| 107 |
endchoice |
| 108 |
|
| 109 |
choice NO_TYPE_TRISTATE |
| 110 |
prompt "no type tristate" |
| 111 |
config NTT_1 |
| 112 |
config NTT_2 |
| 113 |
tristate "NTB_2" |
| 114 |
config NTT_3 |
| 115 |
bool "NTT_3" |
| 116 |
endchoice |
| 117 |
|
| 118 |
# Choice items without an explicitly specified type should get the type of the |
| 119 |
# choice |
| 120 |
|
| 121 |
choice MISSING_MEMBER_TYPES_1 |
| 122 |
bool "missing member types" |
| 123 |
config MMT_1 |
| 124 |
config MMT_2 |
| 125 |
config MMT_3 |
| 126 |
tristate |
| 127 |
endchoice |
| 128 |
|
| 129 |
choice MISSING_MEMBER_TYPES_2 |
| 130 |
config MMT_4 |
| 131 |
config MMT_5 |
| 132 |
bool |
| 133 |
endchoice |
| 134 |
|
| 135 |
# Choice where the default selection (the first symbol) depends on another |
| 136 |
# symbol. If that symbol becomes 'n', the default selection should change to |
| 137 |
# the first visible symbol in the choice. |
| 138 |
|
| 139 |
choice DEFAULT_WITH_DEP |
| 140 |
bool "default with dep" |
| 141 |
|
| 142 |
config A |
| 143 |
bool "A" |
| 144 |
depends on DEP |
| 145 |
|
| 146 |
config B |
| 147 |
bool "B" |
| 148 |
|
| 149 |
endchoice |
| 150 |
|
| 151 |
config DEP |
| 152 |
bool "dep" |
| 153 |
|
| 154 |
# Choice with symbols that shouldn't be considered choice symbols because they |
| 155 |
# depend on the preceding symbol. This might be a kconfig bug, but some things |
| 156 |
# use it, so we need to emulate it. |
| 157 |
|
| 158 |
choice WEIRD_SYMS |
| 159 |
bool "weird symbols that aren't considered part of the choice" |
| 160 |
|
| 161 |
# Only WS1 is part of the choice |
| 162 |
config WS1 |
| 163 |
bool "WS1" |
| 164 |
|
| 165 |
config WS2 |
| 166 |
bool "WS2" |
| 167 |
depends on WS1 |
| 168 |
|
| 169 |
config WS3 |
| 170 |
bool |
| 171 |
depends on WS2 |
| 172 |
|
| 173 |
config WS4 |
| 174 |
bool |
| 175 |
depends on WS1 |
| 176 |
|
| 177 |
config WS5 |
| 178 |
bool "WS5" if WS1 |
| 179 |
|
| 180 |
# 'if' has the same effect, so only WS6 is part of the choice |
| 181 |
config WS6 |
| 182 |
bool "WS6" |
| 183 |
|
| 184 |
if WS6 |
| 185 |
|
| 186 |
config WS7 |
| 187 |
bool |
| 188 |
|
| 189 |
config WS8 |
| 190 |
bool "WS8" |
| 191 |
|
| 192 |
endif |
| 193 |
|
| 194 |
# Should also be part of the choice |
| 195 |
config WS9 |
| 196 |
bool "WS9" |
| 197 |
|
| 198 |
endchoice |