注册thermal zone设备
thermal_zone_device_register
函数申明:
#include <linux/thermal.h>
函数定义:thermal_core.c
struct thermal_zone_device*
thermal_zone_device_register(
const char *type,
int trips,
int mask,
void *devdata,
struct thermal_zone_device_ops *ops,
struct thermal_zone_params *tzp,
int polling_delay)
函数使用
功能描述
- 注册一个thermal zone device
- 在/sys/class/thermal 目录下面创建 thermal_zone[0-*]. 设备节点
- 创建对应的thermal_zone* 下面对应的文件节点,定义读写函数回调相关tz的ops方法
- 尝试绑定所有的cool device 到该tz
- 创建一个工作队列,定时获取温度并采取策略
参数说明
* @type: tz设备类型,用来标识不同tz的字符串
* @trips: tz设