File: test.dts.fold

package info (click to toggle)
kf6-syntax-highlighting 6.13.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 47,568 kB
  • sloc: xml: 197,750; cpp: 12,850; python: 3,023; sh: 955; perl: 546; ruby: 488; pascal: 393; javascript: 161; php: 150; jsp: 132; lisp: 131; haskell: 124; ada: 119; ansic: 107; makefile: 96; f90: 94; ml: 85; cobol: 81; yacc: 71; csh: 62; erlang: 54; sql: 51; java: 47; objc: 37; awk: 31; asm: 30; tcl: 29; fortran: 18; cs: 10
file content (64 lines) | stat: -rw-r--r-- 1,773 bytes parent folder | download
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
<beginfold id='1'>/*</beginfold id='1'>
 * DTS file test
 *
 * SPDX-FileCopyrightText: 2025 Artur Weber <knuxify@gmail.com>
 *
 * SPDX-License-Identifier: MIT
 <endfold id='1'>*/</endfold id='1'>

/dts-v1/;

#include <gpio.h>
#include "test.dtsi"

// TODO comment FIXME comment

/delete-node/ &bad_node;

/ <beginfold id='2'>{</beginfold id='2'>
	#address-cells = <1>;
	#size-cells = <1>;

	compatible = "foo,bar", "baz,quox";

	memory@80000000 <beginfold id='2'>{</beginfold id='2'> reg = <0x80000000 0x10000000>; <endfold id='2'>}</endfold id='2'>;

	soc <beginfold id='2'>{</beginfold id='2'>
		i2c1: i2c@4000 <beginfold id='2'>{</beginfold id='2'>
			compatible = "foo,i2c-controller";
			reg = <0x00004000 0x1c0>;
			foo,int-property = <32>; // Side comment
			foo,boolean;

			#address-cells = <1>;
			#size-cells = <0>;
		<endfold id='2'>}</endfold id='2'>;

		pwm: pwm@6c00 <beginfold id='2'>{</beginfold id='2'>
			reg = <0x00006c00 0x8a>;
		<endfold id='2'>}</endfold id='2'>;

		gpio: gpio@7000 <beginfold id='2'>{</beginfold id='2'>
			reg = <0x00007000 0x200>;
			gpio-controller;
			#gpio-cells = <2>;
		<endfold id='2'>}</endfold id='2'>;
	<endfold id='2'>}</endfold id='2'>;
<endfold id='2'>}</endfold id='2'>;

&i2c1 <beginfold id='2'>{</beginfold id='2'>
	sensor@10 <beginfold id='2'>{</beginfold id='2'>
		compatible = "baz,sensor";
		reg = <0x10>;
		gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
		foo,u8-property = /bits/ 8 <0x1>;
		foo,ref-property = <&pwm>;
		foo,prop-with-macro = "a", 0x00, MY_MACRO(0x5a, 2, "test");

		named-subnode <beginfold id='2'>{</beginfold id='2'>
			foo,str-property = "test";
			foo,multiline = "a", "b",
					"c", "d";
		<endfold id='2'>}</endfold id='2'>;
	<endfold id='2'>}</endfold id='2'>;
<endfold id='2'>}</endfold id='2'>;