Atlas - Kchoice

Home / ext / kconfiglib / tests Lines: 1 | Size: 3251 bytes [Download] [Show on GitHub] [Search similar files] [Raw] [Raw (proxy)]
[FILE BEGIN]
1config MODULES 2 bool "modules" 3 4# bool/tristate and optional 5 6choice BOOL 7 bool "bool" 8config B_1 9 tristate "B_1" 10config B_2 11 tristate "B_2" 12endchoice 13 14choice BOOL_OPT 15 bool "bool optional" 16 optional 17config BO_1 18 tristate "BO_1" 19config BO_2 20 tristate "BO_2" 21endchoice 22 23choice TRISTATE 24 tristate "tristate" 25config T_1 26 tristate "T_1" 27config T_2 28 tristate "T_2" 29endchoice 30 31choice TRISTATE_OPT 32 tristate "tristate optional" 33 optional 34config TO_1 35 tristate "TO_1" 36config TO_2 37 tristate "TO_2" 38endchoice 39 40# m-visibility 41 42choice BOOL_M 43 bool "bool m" if m 44config BM_1 45 tristate "BM_1" 46config BM_2 47 tristate "BM_2" 48endchoice 49 50choice TRISTATE_M 51 tristate "tristate m" if m 52config TM_1 53 tristate "TM_1" 54config TM_2 55 tristate "TM_2" 56endchoice 57 58# Defaults 59 60config TRISTATE_SYM 61 tristate "tristate" 62 63choice DEFAULTS 64 bool "defaults" 65 default OPT_1 if n 66 default OPT_2 if TRISTATE_SYM 67 default OPT_4 68config OPT_1 69 tristate "OPT_1" 70config OPT_2 71 tristate "OPT_2" 72config OPT_3 73 tristate "OPT_3" 74config OPT_4 75 tristate "OPT_4" 76endchoice 77 78choice 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 86config OPT_5 87 tristate "OPT_5" 88config OPT_6 89 tristate "OPT_6" 90config OPT_7 91 tristate "OPT_7" if n 92config OPT_8 93 tristate "OPT_8" 94config OPT_9 95 tristate "OPT_9" 96endchoice 97 98# Choices without an explicitly specified type should get the type of the first 99# symbol with a type 100 101choice NO_TYPE_BOOL 102 prompt "no type bool" 103config NTB_1 104 bool "NTB_1" 105config NTB_2 106 tristate "NTB_2" 107endchoice 108 109choice NO_TYPE_TRISTATE 110 prompt "no type tristate" 111config NTT_1 112config NTT_2 113 tristate "NTB_2" 114config NTT_3 115 bool "NTT_3" 116endchoice 117 118# Choice items without an explicitly specified type should get the type of the 119# choice 120 121choice MISSING_MEMBER_TYPES_1 122 bool "missing member types" 123config MMT_1 124config MMT_2 125config MMT_3 126 tristate 127endchoice 128 129choice MISSING_MEMBER_TYPES_2 130config MMT_4 131config MMT_5 132 bool 133endchoice 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 139choice DEFAULT_WITH_DEP 140 bool "default with dep" 141 142config A 143 bool "A" 144 depends on DEP 145 146config B 147 bool "B" 148 149endchoice 150 151config 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 158choice WEIRD_SYMS 159 bool "weird symbols that aren't considered part of the choice" 160 161# Only WS1 is part of the choice 162config WS1 163 bool "WS1" 164 165config WS2 166 bool "WS2" 167 depends on WS1 168 169config WS3 170 bool 171 depends on WS2 172 173config WS4 174 bool 175 depends on WS1 176 177config WS5 178 bool "WS5" if WS1 179 180# 'if' has the same effect, so only WS6 is part of the choice 181config WS6 182 bool "WS6" 183 184if WS6 185 186config WS7 187 bool 188 189config WS8 190 bool "WS8" 191 192endif 193 194# Should also be part of the choice 195config WS9 196 bool "WS9" 197 198endchoice 199
[FILE END]
(C) 2025 0x4248 (C) 2025 4248 Media and 4248 Systems, All part of 0x4248 See LICENCE files for more information. Not all files are by 0x4248 always check Licencing.