Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: thermal: thermal-idle: Fix example paths

The reference by path (&{/cpus/cpu@101/thermal-idle}) in the example causes
an error with new version of dtc:

FATAL ERROR: Can't generate fixup for reference to path &{/cpus/cpu@100/thermal-idle}

This is because the examples are built as an overlay and absolute paths
are not valid as references must be by label. The path was also not
resolvable because, by default, examples are placed under 'example-N'
nodes.

As the example contains top-level nodes, the root node must be explicit for
the example to be extracted as-is. This changes the indentation for the
whole example, but the existing indentation is a mess of of random amounts.
Clean this up to be 4 spaces everywhere.

Link: https://lore.kernel.org/r/20221111162729.3381835-1-robh@kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>

+75 -69
+75 -69
Documentation/devicetree/bindings/thermal/thermal-idle.yaml
··· 48 48 49 49 examples: 50 50 - | 51 - #include <dt-bindings/thermal/thermal.h> 51 + /{ 52 + #include <dt-bindings/thermal/thermal.h> 52 53 53 - // Example: Combining idle cooling device on big CPUs with cpufreq cooling device 54 - cpus { 54 + compatible = "foo"; 55 + model = "foo"; 56 + #address-cells = <1>; 57 + #size-cells = <1>; 58 + 59 + // Example: Combining idle cooling device on big CPUs with cpufreq cooling device 60 + cpus { 55 61 #address-cells = <2>; 56 62 #size-cells = <0>; 57 63 58 64 /* ... */ 59 65 60 - cpu_b0: cpu@100 { 61 - device_type = "cpu"; 62 - compatible = "arm,cortex-a72"; 63 - reg = <0x0 0x100>; 64 - enable-method = "psci"; 65 - capacity-dmips-mhz = <1024>; 66 - dynamic-power-coefficient = <436>; 67 - #cooling-cells = <2>; /* min followed by max */ 68 - cpu-idle-states = <&CPU_SLEEP>, <&CLUSTER_SLEEP>; 69 - thermal-idle { 70 - #cooling-cells = <2>; 71 - duration-us = <10000>; 72 - exit-latency-us = <500>; 73 - }; 66 + cpu_b0: cpu@100 { 67 + device_type = "cpu"; 68 + compatible = "arm,cortex-a72"; 69 + reg = <0x0 0x100>; 70 + enable-method = "psci"; 71 + capacity-dmips-mhz = <1024>; 72 + dynamic-power-coefficient = <436>; 73 + #cooling-cells = <2>; /* min followed by max */ 74 + cpu-idle-states = <&CPU_SLEEP>, <&CLUSTER_SLEEP>; 75 + cpu_b0_therm: thermal-idle { 76 + #cooling-cells = <2>; 77 + duration-us = <10000>; 78 + exit-latency-us = <500>; 74 79 }; 80 + }; 75 81 76 - cpu_b1: cpu@101 { 77 - device_type = "cpu"; 78 - compatible = "arm,cortex-a72"; 79 - reg = <0x0 0x101>; 80 - enable-method = "psci"; 81 - capacity-dmips-mhz = <1024>; 82 - dynamic-power-coefficient = <436>; 83 - #cooling-cells = <2>; /* min followed by max */ 84 - cpu-idle-states = <&CPU_SLEEP>, <&CLUSTER_SLEEP>; 85 - thermal-idle { 86 - #cooling-cells = <2>; 87 - duration-us = <10000>; 88 - exit-latency-us = <500>; 89 - }; 90 - }; 82 + cpu_b1: cpu@101 { 83 + device_type = "cpu"; 84 + compatible = "arm,cortex-a72"; 85 + reg = <0x0 0x101>; 86 + enable-method = "psci"; 87 + capacity-dmips-mhz = <1024>; 88 + dynamic-power-coefficient = <436>; 89 + #cooling-cells = <2>; /* min followed by max */ 90 + cpu-idle-states = <&CPU_SLEEP>, <&CLUSTER_SLEEP>; 91 + cpu_b1_therm: thermal-idle { 92 + #cooling-cells = <2>; 93 + duration-us = <10000>; 94 + exit-latency-us = <500>; 95 + }; 96 + }; 91 97 92 - /* ... */ 98 + /* ... */ 93 99 94 - }; 100 + }; 95 101 96 - /* ... */ 102 + /* ... */ 97 103 98 - thermal_zones { 99 - cpu_thermal: cpu { 104 + thermal_zones { 105 + cpu_thermal: cpu { 100 106 polling-delay-passive = <100>; 101 107 polling-delay = <1000>; 102 108 103 109 /* ... */ 104 110 105 111 trips { 106 - cpu_alert0: cpu_alert0 { 107 - temperature = <65000>; 108 - hysteresis = <2000>; 109 - type = "passive"; 110 - }; 112 + cpu_alert0: cpu_alert0 { 113 + temperature = <65000>; 114 + hysteresis = <2000>; 115 + type = "passive"; 116 + }; 111 117 112 - cpu_alert1: cpu_alert1 { 113 - temperature = <70000>; 114 - hysteresis = <2000>; 115 - type = "passive"; 116 - }; 118 + cpu_alert1: cpu_alert1 { 119 + temperature = <70000>; 120 + hysteresis = <2000>; 121 + type = "passive"; 122 + }; 117 123 118 - cpu_alert2: cpu_alert2 { 119 - temperature = <75000>; 120 - hysteresis = <2000>; 121 - type = "passive"; 122 - }; 124 + cpu_alert2: cpu_alert2 { 125 + temperature = <75000>; 126 + hysteresis = <2000>; 127 + type = "passive"; 128 + }; 123 129 124 - cpu_crit: cpu_crit { 125 - temperature = <95000>; 126 - hysteresis = <2000>; 127 - type = "critical"; 128 - }; 130 + cpu_crit: cpu_crit { 131 + temperature = <95000>; 132 + hysteresis = <2000>; 133 + type = "critical"; 134 + }; 129 135 }; 130 136 131 137 cooling-maps { 132 - map0 { 133 - trip = <&cpu_alert1>; 134 - cooling-device = <&{/cpus/cpu@100/thermal-idle} 0 15 >, 135 - <&{/cpus/cpu@101/thermal-idle} 0 15>; 136 - }; 138 + map0 { 139 + trip = <&cpu_alert1>; 140 + cooling-device = <&cpu_b0_therm 0 15 >, 141 + <&cpu_b1_therm 0 15>; 142 + }; 137 143 138 - map1 { 139 - trip = <&cpu_alert2>; 140 - cooling-device = 141 - <&cpu_b0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, 142 - <&cpu_b1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; 143 - }; 144 + map1 { 145 + trip = <&cpu_alert2>; 146 + cooling-device = <&cpu_b0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, 147 + <&cpu_b1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; 148 + }; 144 149 }; 145 - }; 150 + }; 151 + }; 146 152 };