# 定制

Source: [https://docs.qualcomm.com/doc/80-70014-30Y/topic/customize.html](https://docs.qualcomm.com/doc/80-70014-30Y/topic/customize.html)

要使产品或应用程序达到最佳性能，定制和控制其温控行为至关重要。您可以为新添加的外部热敏电阻配置新的 thermal zone，以控制平台的表面温度。

以下示例代码演示了如何使用设备树配置 thermal zone。

在此示例中，监视 50°C 的温度门限，并在 CPU cooling device 上应用调节操作。
Note: 默认情况下已配置 stepwise 温控调节器。

## 配置新的 thermal zone

[index: kernel/git/torvalds/linux.git](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/thermal/thermal-zones.yaml?h=v6.6) 中说明了特定于 thermal zone 的参数。

    thermal-zones {<thermal zone name> {	polling-delay-passive = <2000>;	polling-delay = <0>;	thermal-sensors = < thermal sensor phandle and sensor specifier used to monitor this thermal zone>;	trips {		trip0: apc-trip {			temperature = <50000>;	/*Threshold to trigger thermal mitigation */			hysteresis = <2000>;	/*The offset of clear threshold, the clear threshold is 48000 */		};	};	cooling-maps {		map0 { 			 trip = <&apc_trip>;			 cooling-device = <&cpufreq-cpu4 THERMAL_NO_LIMIT 5>; /* Reduce Gold cluster CPU fmax freq by 5 levels */ 		};	};
        };
    };
    
    Copy to clipboard

**Parent Topic:** [温控](https://docs.qualcomm.com/doc/80-70014-30Y/topic/thermalmanagement.html)

Last Published: Aug 20, 2024

[Previous Topic
向用户空间发送通知](https://docs.qualcomm.com/bundle/publicresource/80-70014-30Y/topics/notificationtouserspace.md) [Next Topic
调试](https://docs.qualcomm.com/bundle/publicresource/80-70014-30Y/topics/thermal-debug.md)