【RK3399 Android10, 支持温控风扇】

2024-02-06 16:20

本文主要是介绍【RK3399 Android10, 支持温控风扇】,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

文章目录

  • 【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 <liangji@keenon.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 <liangji@keenon.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.c
+++ b/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.h
+++ b/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 <liangji@keenon.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 <liangji@keenon.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.h
+++ b/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 <liangji@keenon.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 <liangji@keenon.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.txt
+++ b/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, and
+			  each item consists of temperature in millicelsius and
+			  pwm cooling state. This depends on CONFIG_ROCKCHIP_SYSTEM_MONITOR.
+			  If add the property the fan cooling state will be changed
+			  by 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.c
+++ b/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 255+struct 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);
+		else
+			ctx->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 <liangji@keenon.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 <liangji@keenon.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.dtsi
+++ b/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   1
+                60000   2
+                70000   3
+                80000   4
+                100000   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.dts
+++ b/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_defconfig
+++ b/arch/arm64/configs/keenon_tablet_w3s_defconfig
@@ -27,6 +27,7 @@ CONFIG_NAMESPACES=y# CONFIG_PID_NS is not setCONFIG_SCHED_TUNE=yCONFIG_BLK_DEV_INITRD=y
+CONFIG_SENSORS_PWM_FAN=y# 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.c
+++ b/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

这篇关于【RK3399 Android10, 支持温控风扇】的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/684878

相关文章

Golang支持平滑升级的HTTP服务

前段时间用Golang在做一个HTTP的接口,因编译型语言的特性,修改了代码需要重新编译可执行文件,关闭正在运行的老程序,并启动新程序。对于访问量较大的面向用户的产品,关闭、重启的过程中势必会出现无法访问的情况,从而影响用户体验。 使用Golang的系统包开发HTTP服务,是无法支持平滑升级(优雅重启)的,本文将探讨如何解决该问题。 一、平滑升级(优雅重启)的一般思路 一般情况下,要实现平滑

sqlite不支持中文排序,采用java排序

方式一 不支持含有重复字段进行排序 /*** sqlite不支持中文排序,改用java排序* 根据指定的对象属性字段,排序对象集合,顺序* @param list* @param field* @return*/public static List sortListByField(List<?> list,String field){List temp = new ArrayList(

一款支持同一个屏幕界面同时播放多个视频的视频播放软件

GridPlayer 是一款基于 VLC 的免费开源跨平台多视频同步播放工具,支持在一块屏幕上同时播放多个视频。其主要功能包括: 多视频播放:用户可以在一个窗口中同时播放任意数量的视频,数量仅受硬件性能限制。支持多种格式和流媒体:GridPlayer 支持所有由 VLC 支持的视频格式以及流媒体 URL(如 m3u8 链接)。自定义网格布局:用户可以配置播放器的网格布局,以适应不同的观看需求。硬

Science Robotics 首尔国立大学研究团队推出BBEX外骨骼,实现多维力量支持!

重复性举起物体可能会对脊柱和背部肌肉造成损伤,由此引发的腰椎损伤是工业环境等工作场所中一个普遍且令人关注的问题。为了减轻这类伤害,有研究人员已经研发出在举起任务中为工人提供辅助的背部支撑装置。然而,现有的这类装置通常无法在非对称性的举重过程中提供多维度的力量支持。此外,针对整个人体脊柱的设备安全性验证也一直是一个缺失的环节。 据探索前沿科技边界,传递前沿科技成果的X-robot投稿,来自首尔国立

超级 密码加密 解密 源码,支持表情,符号,数字,字母,加密

超级 密码加密 解密 源码,支持表情,符号,数字,字母,加密 可以将表情,动物,水果,表情,手势,猫语,兽语,狗语,爱语,符号,数字,字母,加密和解密 可以将文字、字母、数字、代码、标点符号等内容转换成新的文字形式,通过简单的文字以不同的排列顺序来表达不同的内容 源码截图: https://www.httple.net/152649.html

Android rk3399 UAC(USB Audio)开发笔记

一、UAC有1.0和2.0,因Windows对2.0支持不好,我使用的是UAC1.0驱动 内核配置:CONFIG_USB_CONFIGFS_F_UAC1          ---这个宏配置无需物理codec,使用虚拟 alsa codec  驱动路径:"kernel\drivers\usb\gadget\function\f_uac1.c" 内核配置:CONFIG_USB_CONFIGFS_

QtC++截图支持窗口获取

介绍 在截图工具中你会发现,接触到窗口后会自动圈出目标窗口,个别强大一点的还能进行元素识别可以自动圈出元素,那么今天简单分析一下QTc++如何获取窗口并圈出当前鼠标下的窗口。 介绍1.如何获取所有窗口2.比较函数3.实现窗口判断 结尾 1.如何获取所有窗口 1.我们需要调用windows接口EnumWindowsProc回调函数来获取所有顶级窗口,需要包含windows.

Nacos Config 配置中心支持配置共享

文章目录 一、什么是配置中心二、Nacos Config2.1 Nacos Config 工作原理 (★)2.2 Nacos Config 的使用2.3 动态刷新2.4 配置共享2.4.1 同一个微服务的不同环境之间共享配置2.4.2 不同微服务中间共享配置 一、什么是配置中心 微服务架构下关于配置文件的存在以下问题: 配置文件相对分散。在一个微服务架构下,配置文件会随

spring笔记 多线程的支持

spring的工作机制 136  属性编辑器 140 spring事件的体系结构 168 Bean间的关系 109 继承 依赖 引用     Bean的继承          1 为了简化初始化的属性注入;          2 子Bean和父Bean相同的属性值,使用子Bean的     Bean的依赖 Srping控制相互依赖的Bean之间,属性注入的顺序,防止出错  depend-on

PageOfficeCtrl支持直接打开服务器磁盘文件

一般来说,PageOfficeCtrl控件的WebOpen方法的第一个参数是待打开文档的URL,此URL可以是相对于当前页面的相对URL,也可以是相对于整个网站根的相对URL,还可以是http开头的完整URL,但是这个URL必须是当前网站的URL,不能跨域。 现在为了更加方便开发者编程,WebOpen支持打开服务器磁盘文件。也就是说,第一个参数可以写成服务器文件的绝对磁盘路径。例如: P