scripts/dtc/dt_to_config
Source file repositories/reference/linux-study-clean/scripts/dtc/dt_to_config
File Facts
- System
- Linux kernel
- Corpus path
scripts/dtc/dt_to_config- Extension
[no extension]- Size
- 41789 bytes
- Lines
- 1213
- Domain
- Support Tooling And Documentation
- Bucket
- scripts
- Inferred role
- Support Tooling And Documentation: scripts
- Status
- atlas-only
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
function usagefunction set_flagfunction print_flagsfunction print_nodefunction handle_compatiblefunction read_dtsfunction read_config_filefunction cmd_line_err
Annotated Snippet
if ($compatible_cnt > 1) {
&set_flag(\$pr_flags, $pr_flag_pos_mcompatible);
}
if ($config_cnt > 1) {
&set_flag(\$pr_flags, $pr_flag_pos_mconfig);
}
if ($driver_cnt >= 1) {
&set_flag(\$pr_flags, $pr_flag_pos_driver);
}
if ($driver_cnt > 1) {
&set_flag(\$pr_flags, $pr_flag_pos_mdriver);
}
# These strings are the same way the linux kernel tests.
# The ePapr lists of values is slightly different.
if (!(
($node_enabled eq "") ||
($node_enabled eq "ok") ||
($node_enabled eq "okay")
)) {
&set_flag(\$pr_flags, $pr_flag_pos_node_not_enabled);
}
if ($white_list) {
&set_flag(\$pr_flags, $pr_flag_pos_white_list);
}
if (exists($driver_hard_code_list{$compat}) ||
(exists($driver_config_hard_code_list{$driver}) &&
($driver ne "no_driver"))) {
&set_flag(\$pr_flags, $pr_flag_pos_hard_coded);
}
my @configs = split(' && ', $config);
for $configs (@configs) {
$not = $configs =~ /^!/;
$configs =~ s/^!//;
if (($configs ne "no_config") && ($configs ne "no_makefile")) {
&set_flag(\$pr_flags, $pr_flag_pos_config);
}
if (($config_cnt >= 1) &&
($configs !~ /CONFIG_/) &&
(($configs ne "no_config") && ($configs ne "no_makefile"))) {
&set_flag(\$pr_flags, $pr_flag_pos_config_hard_coded);
}
my $existing_config = $existing_config{$configs};
if ($existing_config eq "m") {
&set_flag(\$pr_flags, $pr_flag_pos_config_m);
# Possible fail, depends on whether built in or
# module is desired.
&set_flag(\$pr_flags, $pr_flag_pos_config_test_fail);
} elsif ($existing_config eq "y") {
&set_flag(\$pr_flags, $pr_flag_pos_config_y);
if ($not) {
&set_flag(\$pr_flags, $pr_flag_pos_config_test_fail);
}
} elsif (($config_file) && ($configs =~ /CONFIG_/)) {
&set_flag(\$pr_flags, $pr_flag_pos_config_none);
if (!$not) {
&set_flag(\$pr_flags, $pr_flag_pos_config_test_fail);
}
}
}
Annotation
- Detected declarations: `function usage`, `function set_flag`, `function print_flags`, `function print_node`, `function handle_compatible`, `function read_dts`, `function read_config_file`, `function cmd_line_err`.
- Atlas domain: Support Tooling And Documentation / scripts.
- Implementation status: atlas-only.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.