kernel: add phtotnicat2 power management driver
This add the photonicat2 power management driver and the necessary device trees nodes to monitor battery, charging status and pwmfan. Then mount them to sysfs. The c files was imported from the photonocat official openwrt sdk patchfile and lack detailed commit message. Signed-off-by: Jason Zou <jasonforhise@outlook.com>
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=photonicat-pm
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_LICENSE:=GPL-2.0-or-later
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define KernelPackage/photonicat-pm
|
||||
SUBMENU:=Other modules
|
||||
TITLE:=Photonicat Power Manager
|
||||
FILES:=$(PKG_BUILD_DIR)/photonicat-pm.ko
|
||||
AUTOLOAD:=$(call AutoLoad,60,photonicat-pm,1)
|
||||
DEPENDS:= @TARGET_rockchip_armv8 +kmod-hwmon-core +kmod-thermal
|
||||
KCONFIG:=
|
||||
endef
|
||||
|
||||
define KernelPackage/photonicat-pm/description
|
||||
Power manager for photonicat board.
|
||||
Unless you have the platform, you will want to say 'N'.
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
$(KERNEL_MAKE) M="$(PKG_BUILD_DIR)" modules
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,photonicat-pm))
|
||||
@@ -0,0 +1 @@
|
||||
obj-m += photonicat-pm.o
|
||||
File diff suppressed because it is too large
Load Diff
@@ -981,6 +981,9 @@
|
||||
charger {
|
||||
monitored-battery = <&battery>;
|
||||
};
|
||||
|
||||
fan {
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user