summaryrefslogtreecommitdiff
path: root/scripts/kconfig/tests/savedefconfig_range/Kconfig
blob: d879870a5267500f6112a94b3fcce9c2074db05e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# SPDX-License-Identifier: GPL-2.0

# Static default and range values

config INT_DEFAULT_ABOVE_RANGE
	int
	range 1 1
	default 16

config INT_DEFAULT_BELOW_RANGE
	int
	range 4 8
	default 2

# Default and range values determined by other options

config RANGE_UPPER_BOUND
	int
	default 3

config INT_DYNAMIC_RANGE
	int
	range 0 RANGE_UPPER_BOUND
	default 4

# Hex

config HEX_DEFAULT_ABOVE_RANGE
	hex
	range 0x10 0x20
	default 0x40

# Implicit default value of 0

config INT_IMPLICIT_DEFAULT_ZERO
	int
	range 1 4

# Conditional range

config USE_FIRST_RANGE
	bool
	default y

config INT_CONDITIONAL_RANGE
	int
	range 1 2 if USE_FIRST_RANGE
	range 3 4 if !USE_FIRST_RANGE
	default 3

# Conditional default

config USE_DEFAULT
	bool
	default y

config INT_CONDITIONAL_DEFAULT
	int
	range 1 2
	default 3 if USE_DEFAULT

# Default outside of the range of a symbol with a prompt

config INT_PROMPT_DEFAULT_ABOVE_RANGE
	int "int with prompt"
	range 1 4
	default 8