Lines Matching +full:dts +full:- +full:node

2 # SPDX-License-Identifier: GPL-2.0-only
19 # ----- constants for print_flags()
21 # Position in string $pr_flags. Range of 0..($num_pr_flags - 1).
39 # expessions to work for --include_flags and --exclude_flags.
45 "multiple compatibles found for this node",
50 "node is not enabled",
61 # -----
70 # ----- magic compatibles, do not have a driver
77 'simple-bus' => '1',
94 'gpio-keys' => ['drivers/input/keyboard/gpio_keys.c'],
95 'i2c-gpio' => ['drivers/i2c/busses/i2c-gpio.c'],
96 'isa' => ['arch/mips/mti-malta/malta-dt.c',
102 'mtd-ram' => ['drivers/mtd/maps/physmap_of.c'],
103 'pwm-backlight' => ['drivers/video/backlight/pwm_bl.c'],
118 # drivers/usb/host/ehci-ppc-of.c
119 # drivers/usb/host/ehci-xilinx-of.c
121 # drivers/usb/host/ehci-hcd.c
123 # ehci-hcd.c wraps the includes with ifdef CONFIG_USB_EHCI_HCD_..._OF
125 # similar model for ohci-hcd.c (but no ohci-xilinx-of.c)
127 # similarly, uhci-hcd.c includes uhci-platform.c
129 'drivers/usb/host/ehci-ppc-of.c' => ['CONFIG_USB_EHCI_HCD',
131 'drivers/usb/host/ohci-ppc-of.c' => ['CONFIG_USB_OHCI_HCD',
134 'drivers/usb/host/ehci-xilinx-of.c' => ['CONFIG_USB_EHCI_HCD',
137 'drivers/usb/host/uhci-platform.c' => ['CONFIG_USB_UHCI_HCD',
142 'arch/arm/mach-imx/platsmp.c' => ['CONFIG_SOC_IMX6 && CONFIG_SMP',
155 # kvm no longer a problem after commit 503a62862e8f in 4.7-rc1
164 Usage: $script_name [options] device-tree...
166 device_tree is: dts_file | dtb_file | proc_device-tree
170 -c FILE Read kernel config options from FILE
171 --config FILE synonym for 'c'
172 --config-format config file friendly output format
173 --exclude-flag FLAG exclude entries with a matching flag
174 -h Display this message and exit
175 --help synonym for 'h'
176 --black-list-driver use driver black list
177 --white-list-config use config white list
178 --white-list-driver use driver white list
179 --include-flag FLAG include only entries with a matching flag
180 --include-suspect include only entries with an uppercase flag
181 --short-name do not show the path portion of the node name
182 --show-lists report of white and black lists
183 --version Display program version and exit
196 An alternate format can be selected by --config-format. This will
199 multiple lines. The first line reports flags, the node path, compatible
205 If a large number of drivers or config options is listed for a node,
206 …and the '$pr_flag_value[$pr_flag_pos_hard_coded]' flag is set consider using --white-list-config a…
207 --white-list-driver. If the white list option suppresses the correct
216 a fully automated process -- human involvement may still be
252 --white-list-config and --white-list-driver are not specified.
257 --white-list-config and --white-list-driver may not be accurate if this
259 Use the --show-lists option to report the values in the list.
269 dt_to_config arch/arm/boot/dts/my_dts_file.dts
274 --config \${KBUILD_OUTPUT}/.config \\
275 arch/\${ARCH}/boot/dts/my_dts_file.dts
279 dt_to_config --include-suspect \\
280 --config \${KBUILD_OUTPUT}/.config \\
281 arch/\${ARCH}/boot/dts/my_dts_file.dts
283 Report of node / compatible string / driver tuples that should
284 be further investigated. A node may have multiple compatible
289 dt_to_config --include-suspect --config-format \\
290 --config ${KBUILD_OUTPUT}/.config \\
291 arch/\${ARCH}/boot/dts/my_dts_file.dts
293 Report of node / compatible string / driver tuples that should
295 the config options to select the desired tuple for a given node.
296 A node may have multiple compatible strings. A compatible string
324 my $compat = $pn_arg_ref->{compat};
325 my $compatible_cnt = $pn_arg_ref->{compatible_cnt};
326 my $config = $pn_arg_ref->{config};
327 my $config_cnt = $pn_arg_ref->{config_cnt};
328 my $driver = $pn_arg_ref->{driver};
329 my $driver_cnt = $pn_arg_ref->{driver_cnt};
330 my $full_node = $pn_arg_ref->{full_node};
331 my $node = $pn_arg_ref->{node};
332 my $node_enabled = $pn_arg_ref->{node_enabled};
333 my $white_list = $pn_arg_ref->{white_list};
335 my $pr_flags = '-' x $num_pr_flags;
338 # ----- set flags in $pr_flags
410 # ----- include / exclude filters
437 my $compat = $pn_arg_ref->{compat};
438 my $compatible_cnt = $pn_arg_ref->{compatible_cnt};
439 my $config = $pn_arg_ref->{config};
440 my $config_cnt = $pn_arg_ref->{config_cnt};
441 my $driver = $pn_arg_ref->{driver};
442 my $driver_cnt = $pn_arg_ref->{driver_cnt};
443 my $full_node = $pn_arg_ref->{full_node};
444 my $node = $pn_arg_ref->{node};
445 my $node_enabled = $pn_arg_ref->{node_enabled};
446 my $white_list = $pn_arg_ref->{white_list};
456 print "$node";
469 # check for /-m/, /-y/, or /-objs/
534 # ----- Find Kconfig symbols that enable driver
539 if (! -r $makefile) {
542 if (! -r $makefile) {
583 # ----- condition ... else ... endif
592 …ll, $ifeq_config, $ifeq_config_val ) = $line =~ /^([ ]\s*|)ifeq\b.*\b(CONFIG_[A-Za-z0-9_]*)(.*)/;
593 …l, $ifneq_config, $ifneq_config_val) = $line =~ /^([ ]\s*|)ifneq\b.*\b(CONFIG_[A-Za-z0-9_]*)(.*)/;
594 …$null, $ifdef_config) = $line =~ /^([ ]\s*|)ifdef\b.*\b(CONFIG_[A-Za-z0-9_]*)/;
595 …null, $ifndef_config) = $line =~ /^([ ]\s*|)ifndef\b.*\b(CONFIG_[A-Za-z0-9_]*)/;
645 # ----- simple CONFIG_* = *.[co] or xxx [+:?]*= *.[co]
649 ($config) = $line =~ /(CONFIG_[A-Za-z0-9_]+).*\b$base.[co]\b/;
651 # ----- match a make variable instead of *.[co]
658 if ($make_var =~ /[a-zA-Z0-9]+-[ym]/) {
660 } elsif ($make_var =~ /[a-zA-Z0-9]+-objs/) {
670 ($config) = $line =~ /(CONFIG_[A-Za-z0-9_]+).*\b$make_var\b/;
682 # ----- next if no config found
733 my $node = shift;
741 return if (!$node or !$compatible);
743 # Do not process compatible property of root node,
745 return if ($node eq "/");
748 $pn_arg{node} = $node;
774 # ----- if compat previously seen, use cached info
798 # ----- Find drivers (source files that contain compatible)
805 my $drivers = `git grep -l '"$compat"' -- $files`;
825 # ----- if driver previously seen, use cached info
843 # ----- Find Kconfig symbols that enable driver
851 # Each node may report several compatibles.
865 my $node = "";
868 if (! -r $file) {
873 if (!open(DT_FILE, "-|", "$dtx_diff $file")) {
887 &handle_compatible($full_node, $node, $compatible,
890 while ($end_node_count-- > 0) {
894 $full_node = @full_node[-1];
896 $node = $line;
897 $node =~ s/^\s*(.*)\s+\{.*/$1/;
898 $node =~ s/.*: //;
899 if ($node eq '/' ) {
902 $full_node = $full_node . '/' . $node;
904 $full_node = '/' . $node;
937 &handle_compatible($full_node, $node, $compatible, $node_enabled);
945 if (! -r $config_file) {
978 print STDERR " For help, type '$script_name --help'\n";
983 # -----------------------------------------------------------------------------
991 "config-format" => \$config_format,
992 "exclude-flag=s" => \@exclude_flag,
995 "black-list-driver" => \$black_list_driver,
996 "white-list-config" => \$white_list_config,
997 "white-list-driver" => \$white_list_driver,
998 "include-flag=s" => \@include_flag,
999 "include-suspect" => \$include_suspect,
1000 "short-name" => \$short_name,
1001 "show-lists" => \$show_lists,
1050 print " " x ($max_compat_len - length $compat);
1076 print " " x ($max_driver_len - length $driver);
1131 &cmd_line_err("invalid value for FLAG in --exclude-flag\n");
1144 &cmd_line_err("invalid value for FLAG in --include-flag\n");
1152 $include_flag_pattern = "[" . $include_flag_pattern . "A-Z]";
1156 …&cmd_line_err("the same flag appears in both --exclude-flag and --include-flag or --include-suspec…
1161 # ($#ARGV < 0) is valid for --help, --version
1163 &cmd_line_err("device-tree... is required");
1200 if (-x "scripts/dtc/dtx_diff") {