当前位置: 首页 > news >正文

中山市西区建设局网站ppt模板简洁大方

中山市西区建设局网站,ppt模板简洁大方,重庆市建筑工程信息网官网,无忧自助建站文章目录 【RK3399 Android10, 支持温控风扇】需求描述patch 【RK3399 Android10, 支持温控风扇】 需求描述 3399 Android10 的风扇#xff0c;希望能做成温度控制的风扇#xff0c;通过设置不同测温度阈值来实行不同的风速 patch kernel 0020-feat-rochchip-system-mon… 文章目录 【RK3399 Android10, 支持温控风扇】需求描述patch 【RK3399 Android10, 支持温控风扇】 需求描述 3399 Android10 的风扇希望能做成温度控制的风扇通过设置不同测温度阈值来实行不同的风速 patch kernel 0020-feat-rochchip-system-monitor-add-temperature-notifye.patch From 92116bdb9aa3efc280dd9c2699e8e82642860343 Mon Sep 17 00:00:00 2001 From: liangji liangjikeenon.com Date: Tue, 26 Dec 2023 15:50:42 0800 Subject: [PATCH 20/24] feat: rochchip system monitor add temperature notifyerChange-Id: I8a561b9fdcaf4d15a8ee9e827eb3a350e342f55c Signed-off-by: liangji liangjikeenon.com ---drivers/soc/rockchip/rockchip_system_monitor.c | 42 --include/soc/rockchip/rockchip_system_monitor.h | 26 2 files changed, 65 insertions(), 3 deletions(-)diff --git a/drivers/soc/rockchip/rockchip_system_monitor.c b/drivers/soc/rockchip/rockchip_system_monitor.c index 8a84d02..fcd980be 100644 --- a/drivers/soc/rockchip/rockchip_system_monitor.cb/drivers/soc/rockchip/rockchip_system_monitor.c-64,6 64,7 struct system_monitor {struct thermal_zone_device *tz;struct delayed_work thermal_work;int last_temp;int offline_cpus_temp;int temp_hysteresis;unsigned int delay;-84,6 85,7 static LIST_HEAD(monitor_dev_list);static struct system_monitor *system_monitor;static atomic_t monitor_in_suspend;static BLOCKING_NOTIFIER_HEAD(system_monitor_notifier_list);static BLOCKING_NOTIFIER_HEAD(system_status_notifier_list);int rockchip_register_system_status_notifier(struct notifier_block *nb)-1167,6 1169,31 void rockchip_system_monitor_unregister(struct monitor_dev_info *info)}EXPORT_SYMBOL(rockchip_system_monitor_unregister);int rockchip_system_monitor_register_notifier(struct notifier_block *nb) {return blocking_notifier_chain_register(system_monitor_notifier_list, nb); } EXPORT_SYMBOL(rockchip_system_monitor_register_notifier);void rockchip_system_monitor_unregister_notifier(struct notifier_block *nb) {blocking_notifier_chain_unregister(system_monitor_notifier_list, nb); } EXPORT_SYMBOL(rockchip_system_monitor_unregister_notifier);static int rockchip_system_monitor_temp_notify(int temp) {struct system_monitor_event_data event_data;int ret;event_data.temp temp;ret blocking_notifier_call_chain(system_monitor_notifier_list,SYSTEM_MONITOR_CHANGE_TEMP,(void *)event_data);return notifier_to_errno(ret); } static int rockchip_system_monitor_parse_dt(struct system_monitor *monitor){struct device_node *np monitor-dev-of_node;-1266,7 1293,7 static void rockchip_system_monitor_thermal_update(void){int temp, ret;struct monitor_dev_info *info; - static int last_temp INT_MAX;//static int last_temp INT_MAX;ret thermal_zone_get_temp(system_monitor-tz, temp);if (ret || temp THERMAL_TEMP_INVALID)-1274,9 1301,15 static void rockchip_system_monitor_thermal_update(void)dev_dbg(system_monitor-dev, temperature%d\n, temp);- if (temp last_temp last_temp - temp 2000)//if (temp last_temp last_temp - temp 2000)if (temp system_monitor-last_temp system_monitor-last_temp - temp 2000)goto out; - last_temp temp;//last_temp temp;system_monitor-last_temp temp;rockchip_system_monitor_temp_notify(temp); down_read(mdev_list_sem);list_for_each_entry(info, monitor_dev_list, node)-1379,6 1412,8 static int monitor_pm_notify(struct notifier_block *nb,if (system_monitor-tz)rockchip_system_monitor_thermal_update();atomic_set(monitor_in_suspend, 0);system_monitor-last_temp INT_MAX; break;default:break;-1532,6 1567,7 static int rockchip_system_monitor_probe(struct platform_device *pdev)rockchip_system_monitor_parse_dt(system_monitor);if (system_monitor-tz) {system_monitor-last_temp INT_MAX;INIT_DELAYED_WORK(system_monitor-thermal_work,rockchip_system_monitor_thermal_check);mod_delayed_work(system_freezable_wq, diff --git a/include/soc/rockchip/rockchip_system_monitor.h b/include/soc/rockchip/rockchip_system_monitor.h index 1f8bffc..bdc9a3f 100644 --- a/include/soc/rockchip/rockchip_system_monitor.hb/include/soc/rockchip/rockchip_system_monitor.h-6,11 6,23 #ifndef __SOC_ROCKCHIP_SYSTEM_MONITOR_H#define __SOC_ROCKCHIP_SYSTEM_MONITOR_H#include linux/pm_opp.h #include linux/pm_qos.h #include linux/regulator/consumer.h enum monitor_dev_type {MONITOR_TPYE_CPU 0, /* CPU */MONITOR_TPYE_DEV, /* GPU, NPU, DMC, and so on */};enum system_monitor_event_type {SYSTEM_MONITOR_CHANGE_TEMP 0, };struct system_monitor_event_data {int temp; }; struct volt_adjust_table {unsigned int min; /* Minimum frequency in MHz */unsigned int max; /* Maximum frequency in MHz */-127,6 139,8 int rockchip_monitor_dev_low_temp_adjust(struct monitor_dev_info *info,int rockchip_monitor_dev_high_temp_adjust(struct monitor_dev_info *info,bool is_high);int rockchip_monitor_suspend_low_temp_adjust(int cpu); int rockchip_system_monitor_register_notifier(struct notifier_block *nb); void rockchip_system_monitor_unregister_notifier(struct notifier_block *nb);introckchip_system_monitor_adjust_cdev_state(struct thermal_cooling_device *cdev,int temp, unsigned long *state);-177,6 191,18 static inline int rockchip_monitor_suspend_low_temp_adjust(int cpu)};static inline int rockchip_system_monitor_register_notifier(struct notifier_block *nb) {return 0; };static inline void rockchip_system_monitor_unregister_notifier(struct notifier_block *nb) { };static inline introckchip_system_monitor_adjust_cdev_state(struct thermal_cooling_device *cdev,int temp, unsigned long *state){ -- 2.7.4 0021-feat-rockchip-system-status-use-IS_REACHABLE.patch From a5b79acc99fe356dba8f3a51ee7918bfb885b679 Mon Sep 17 00:00:00 2001 From: liangji liangjikeenon.com Date: Tue, 26 Dec 2023 16:00:13 0800 Subject: [PATCH 21/24] feat: rockchip system status use IS_REACHABLEChange-Id: I62e6deba1e511d14a3c11431fd04fcfcde65d5c3 Signed-off-by: liangji liangjikeenon.com ---include/soc/rockchip/rockchip-system-status.h | 3 -1 file changed, 2 insertions(), 1 deletion(-)diff --git a/include/soc/rockchip/rockchip-system-status.h b/include/soc/rockchip/rockchip-system-status.h index 200b1ee..de639b9 100644 --- a/include/soc/rockchip/rockchip-system-status.hb/include/soc/rockchip/rockchip-system-status.h-6,7 6,8 #ifndef __SOC_ROCKCHIP_SYSTEM_STATUS_H#define __SOC_ROCKCHIP_SYSTEM_STATUS_H-#if IS_ENABLED(CONFIG_ROCKCHIP_SYSTEM_MONITOR) //#if IS_ENABLED(CONFIG_ROCKCHIP_SYSTEM_MONITOR) #if IS_REACHABLE(CONFIG_ROCKCHIP_SYSTEM_MONITOR)int rockchip_register_system_status_notifier(struct notifier_block *nb);int rockchip_unregister_system_status_notifier(struct notifier_block *nb);void rockchip_set_system_status(unsigned long status); -- 2.7.4 0022-feat-hwmon-pwm-fan-add-system-monitor-notifyer.patch From bf6df7f1173b10fadcd56ba8f9e3a357cf6613a0 Mon Sep 17 00:00:00 2001 From: liangji liangjikeenon.com Date: Tue, 26 Dec 2023 16:10:13 0800 Subject: [PATCH 22/24] feat: hwmon pwm fan add system monitor notifyerChange-Id: Iaf0483d68ed46000d6eb43b3d41a34f7b4b55f4e Signed-off-by: liangji liangjikeenon.com ---.../devicetree/bindings/hwmon/pwm-fan.txt | 5 drivers/hwmon/pwm-fan.c | 114 -2 files changed, 117 insertions(), 2 deletions(-)diff --git a/Documentation/devicetree/bindings/hwmon/pwm-fan.txt b/Documentation/devicetree/bindings/hwmon/pwm-fan.txt index c6d5332..282bca2 100644 --- a/Documentation/devicetree/bindings/hwmon/pwm-fan.txtb/Documentation/devicetree/bindings/hwmon/pwm-fan.txt-5,6 5,11 Required properties:- pwms : the PWM that is used to control the PWM fan- cooling-levels : PWM duty cycle values in a range from 0 to 255which correspond to thermal cooling states - rockchip,temp-trips : The property is an array of 2-tuples items, andeach item consists of temperature in millicelsius andpwm cooling state. This depends on CONFIG_ROCKCHIP_SYSTEM_MONITOR.If add the property the fan cooling state will be changedby system monitor. Otherwise, use the default thermal governor.Example:fan0: pwm-fan { diff --git a/drivers/hwmon/pwm-fan.c b/drivers/hwmon/pwm-fan.c index db0d15c..5ba1820 100644 --- a/drivers/hwmon/pwm-fan.cb/drivers/hwmon/pwm-fan.c-25,9 25,15 #include linux/pwm.h#include linux/sysfs.h#include linux/thermal.h #include soc/rockchip/rockchip_system_monitor.h#define MAX_PWM 255struct thermal_trips {int temp;int state; }; struct pwm_fan_ctx {struct mutex lock;struct pwm_device *pwm;-36,6 42,9 struct pwm_fan_ctx {unsigned int pwm_fan_max_state;unsigned int *pwm_fan_cooling_levels;struct thermal_cooling_device *cdev;struct notifier_block thermal_nb;struct thermal_trips *thermal_trips;bool thermal_notifier_is_ok;};static int __set_pwm(struct pwm_fan_ctx *ctx, unsigned long pwm)-205,6 214,95 static int pwm_fan_of_get_cooling_data(struct device *dev,return 0;}static int pwm_fan_get_thermal_trips(struct device *dev, char *porp_name,struct thermal_trips **trips) {struct device_node *np dev-of_node;struct thermal_trips *thermal_trips;const struct property *prop;int count, i;prop of_find_property(np, porp_name, NULL);if (!prop)return -EINVAL;if (!prop-value)return -ENODATA;count of_property_count_u32_elems(np, porp_name);if (count 0)return -EINVAL;if (count % 2)return -EINVAL;thermal_trips devm_kzalloc(dev,sizeof(*thermal_trips) * (count / 2 1),GFP_KERNEL);if (!thermal_trips)return -ENOMEM;for (i 0; i count / 2; i) {of_property_read_u32_index(np, porp_name, 2 * i,thermal_trips[i].temp);of_property_read_u32_index(np, porp_name, 2 * i 1,thermal_trips[i].state);}thermal_trips[i].temp 0;thermal_trips[i].state INT_MAX;*trips thermal_trips;return 0; }static int pwm_fan_temp_to_state(struct pwm_fan_ctx *ctx, int temp) {struct thermal_trips *trips ctx-thermal_trips;int i, state 0;for (i 0; trips[i].state ! INT_MAX; i) {if (temp trips[i].temp)state trips[i].state;}return state; }static int pwm_fan_thermal_notifier_call(struct notifier_block *nb,unsigned long event, void *data) {struct pwm_fan_ctx *ctx container_of(nb, struct pwm_fan_ctx, thermal_nb);struct system_monitor_event_data *event_data data;int state, ret;if (event ! SYSTEM_MONITOR_CHANGE_TEMP)return NOTIFY_OK;state pwm_fan_temp_to_state(ctx, event_data-temp);if (state ctx-pwm_fan_max_state)return NOTIFY_BAD;if (state ctx-pwm_fan_state)return NOTIFY_OK;ret __set_pwm(ctx, ctx-pwm_fan_cooling_levels[state]);if (ret)return NOTIFY_BAD;ctx-pwm_fan_state state;return NOTIFY_OK; }static int pwm_fan_register_thermal_notifier(struct device *dev,struct pwm_fan_ctx *ctx) {if (pwm_fan_get_thermal_trips(dev, rockchip,temp-trips,ctx-thermal_trips))return -EINVAL;ctx-thermal_nb.notifier_call pwm_fan_thermal_notifier_call;return rockchip_system_monitor_register_notifier(ctx-thermal_nb); }static int pwm_fan_probe(struct platform_device *pdev){struct thermal_cooling_device *cdev;-257,6 355,16 static int pwm_fan_probe(struct platform_device *pdev)goto err_pwm_disable;ctx-pwm_fan_state ctx-pwm_fan_max_state;if (IS_REACHABLE(CONFIG_ROCKCHIP_SYSTEM_MONITOR) of_find_property(dev-of_node, rockchip,temp-trips, NULL)) {ret pwm_fan_register_thermal_notifier(dev, ctx);if (ret)dev_err(dev, Failed to register thermal notifier: %d\n, ret);elsectx-thermal_notifier_is_ok true;return 0;} if (IS_ENABLED(CONFIG_THERMAL)) {cdev thermal_of_cooling_device_register(pdev-dev.of_node,pwm-fan, ctx,-299,7 407,8 static int pwm_fan_suspend(struct device *dev)pwm_get_args(ctx-pwm, args);- if (ctx-pwm_value) {//if (ctx-pwm_value) {if (ctx-pwm_value || ctx-thermal_notifier_is_ok) {ret pwm_config(ctx-pwm, 0, args.period);if (ret 0)return ret;-317,7 426,8 static int pwm_fan_resume(struct device *dev)unsigned long duty;int ret;- if (ctx-pwm_value 0)//if (ctx-pwm_value 0)if (ctx-pwm_value 0 !ctx-thermal_notifier_is_ok)return 0;pwm_get_args(ctx-pwm, pargs); -- 2.7.4 0023-feat-support-system-monitor-pwm-fan.patch From 1cf46863c45c54007f1b4b9acf541781f138b215 Mon Sep 17 00:00:00 2001 From: liangji liangjikeenon.com Date: Tue, 26 Dec 2023 16:59:57 0800 Subject: [PATCH 23/24] feat: support system monitor pwm fanChange-Id: Id40a42b3f2d185a9c6c5054125e4566b91c6c784 Signed-off-by: liangji liangjikeenon.com ---arch/arm64/boot/dts/rockchip/rk3399-keenon-common.dtsi | 14 arch/arm64/boot/dts/rockchip/rk3399-keenon-w3s.dts | 4 arch/arm64/configs/keenon_tablet_w3s_defconfig | 1 drivers/hwmon/pwm-fan.c | 6 ---4 files changed, 22 insertions(), 3 deletions(-)diff --git a/arch/arm64/boot/dts/rockchip/rk3399-keenon-common.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-keenon-common.dtsi index fae2f81..33a10a4 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-keenon-common.dtsib/arch/arm64/boot/dts/rockchip/rk3399-keenon-common.dtsi-254,6 254,20 compatible fake,battery;status okay;};fan: pwm-fan {compatible pwm-fan;#cooling-cells 2;pwms pwm3 0 50000 0;cooling-levels 0 50 100 150 200 255;rockchip,temp-trips 50000 160000 270000 380000 4100000 5;};};backlight { diff --git a/arch/arm64/boot/dts/rockchip/rk3399-keenon-w3s.dts b/arch/arm64/boot/dts/rockchip/rk3399-keenon-w3s.dts index 7a47c04..b8a2637 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-keenon-w3s.dtsb/arch/arm64/boot/dts/rockchip/rk3399-keenon-w3s.dts-18,6 18,10 status okay;};pwm3{status okay; }; backlight {enable-gpios gpio1 0 GPIO_ACTIVE_HIGH;pinctrl-names default; diff --git a/arch/arm64/configs/keenon_tablet_w3s_defconfig b/arch/arm64/configs/keenon_tablet_w3s_defconfig index 89c6e3c..db151c1 100644 --- a/arch/arm64/configs/keenon_tablet_w3s_defconfigb/arch/arm64/configs/keenon_tablet_w3s_defconfig-27,6 27,7 CONFIG_NAMESPACESy# CONFIG_PID_NS is not setCONFIG_SCHED_TUNEyCONFIG_BLK_DEV_INITRDy CONFIG_SENSORS_PWM_FANy# CONFIG_RD_BZIP2 is not set# CONFIG_RD_LZMA is not set# CONFIG_RD_XZ is not set diff --git a/drivers/hwmon/pwm-fan.c b/drivers/hwmon/pwm-fan.c index 5ba1820..0d3674d 100644 --- a/drivers/hwmon/pwm-fan.cb/drivers/hwmon/pwm-fan.c-356,10 356,10 static int pwm_fan_probe(struct platform_device *pdev)ctx-pwm_fan_state ctx-pwm_fan_max_state;if (IS_REACHABLE(CONFIG_ROCKCHIP_SYSTEM_MONITOR) - of_find_property(dev-of_node, rockchip,temp-trips, NULL)) { - ret pwm_fan_register_thermal_notifier(dev, ctx);of_find_property(pdev-dev.of_node, rockchip,temp-trips, NULL)) {ret pwm_fan_register_thermal_notifier(pdev-dev, ctx);if (ret) - dev_err(dev, Failed to register thermal notifier: %d\n, ret);dev_err(pdev-dev, Failed to register thermal notifier: %d\n, ret);elsectx-thermal_notifier_is_ok true;return 0; -- 2.7.4
http://www.pierceye.com/news/190619/

相关文章:

  • 房屋租赁网站开发意义做男鞋的网站
  • 网站负责人可以备案北京建设部网站 信息中心
  • 网站建设分录怎么开四川省城乡住房建设部网站首页
  • 刘家窑网站建设公司如何在网络上推广产品
  • 全球建站东莞市的网站公司哪家好
  • 地方网站发展怎么做链接推广产品
  • 上海制造网站公司网站优化做网站优化
  • vs2012做网站wordpress 页眉
  • 北网站建设重庆建设工程查询网站
  • 给我做网站的人老是给我留点尾巴太原本地网站搭建公司
  • 静态页面网站站标代码写进到静态页面了 怎么不显示呢?自助建站网
  • 免费在线代理网站微信会员卡管理系统
  • 和动物做的网站吗做网站销售怎么样
  • 宝塔面板做织梦网站深圳龙华大浪做网站公司
  • 阿里云建网站费用上海网站建设觉策动力
  • 电子商务网站的建设与维护方法h5第三方收款平台
  • 网站建设所需人力设计广告网站
  • php网站发送邮件动态倒计时网站模板
  • 温州建设网站制作wordpress调用文章简介
  • 大庆市建设局网站刘东科技公司做网站
  • 山东助企网站建设宁波百度关键词推广
  • 宜昌市夷陵区建设局网站培训推广 seo
  • 怎样做安居客网站用幽默的语言来形容网站开发
  • 宜昌网站建设选择宜昌慧享互动手机怎么防止网站跳转
  • 本地的上海网站建设公司汽车租赁网站设计
  • 在哪下载免费的英文版网站模板建站 网站程序有哪些
  • 网页前端做购物网站的实训报告网络营销推广是做什么的
  • 广东专业网站建设效果wordpress搜索框插件
  • 茂名建站模板搭建岳阳优化营商环境
  • shopify网站建设郑州机械网站制作