[openwrt/openwrt] sunxi: add modules for AC100 MFD and RTC

LEDE Commits lede-commits at lists.infradead.org
Fri Aug 11 09:22:04 PDT 2023


wigyori pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/dc122f4d9e44adfd73c27111b00210ad2c0c3555

commit dc122f4d9e44adfd73c27111b00210ad2c0c3555
Author: Zoltan HERPAI <wigyori at uid0.hu>
AuthorDate: Sun Jan 17 23:26:33 2021 +0100

    sunxi: add modules for AC100 MFD and RTC
    
    The X-Powers AC100 is a multi-function IC used to provide RTC
    and audio codec via RSB (reduced serial bus, an Allwinner-
    speciality). On some boards using the A80/A83T SoCs, aside
    from the RTC functionality, the RTC is used as a clocksource
    for the Ampak WiFi/BT modules.
    
    Add modules for the core MFD support and the RTC.
    
    Signed-off-by: Zoltan HERPAI <wigyori at uid0.hu>
---
 target/linux/sunxi/modules.mk | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/target/linux/sunxi/modules.mk b/target/linux/sunxi/modules.mk
index 8bbafe98a7..28ed86ba4c 100644
--- a/target/linux/sunxi/modules.mk
+++ b/target/linux/sunxi/modules.mk
@@ -2,6 +2,40 @@
 #
 # Copyright (C) 2013-2016 OpenWrt.org
 
+define KernelPackage/mfd-ac100
+    SUBMENU:=$(OTHER_MENU)
+    TITLE:=X-Powers AC100 MFD support
+    DEPENDS:=@TARGET_sunxi
+    KCONFIG:= \
+	CONFIG_MFD_AC100
+    FILES:=$(LINUX_DIR)/drivers/mfd/ac100.ko
+    AUTOLOAD:=$(call AutoLoad,50,ac100)
+endef
+
+define KernelPackage/mfd-ac100/description
+ Support for the X-Powers AC100 RTC/audio chip
+endef
+
+$(eval $(call KernelPackage,mfd-ac100))
+
+define KernelPackage/rtc-ac100
+    SUBMENU:=$(OTHER_MENU)
+    TITLE:=X-Powers AC100 RTC support
+    DEPENDS:=@TARGET_sunxi +kmod-mfd-ac100
+    $(call AddDepends/rtc)
+    KCONFIG:= \
+	CONFIG_RTC_DRV_AC100 \
+	CONFIG_RTC_CLASS=y
+    FILES:=$(LINUX_DIR)/drivers/rtc/rtc-ac100.ko
+    AUTOLOAD:=$(call AutoLoad,50,rtc-ac100)
+endef
+
+define KernelPackage/rtc-ac100/description
+ Support for the X-Powers AC100 RTC
+endef
+
+$(eval $(call KernelPackage,rtc-ac100))
+
 define KernelPackage/rtc-sunxi
     SUBMENU:=$(OTHER_MENU)
     TITLE:=Sunxi SoC built-in RTC support




More information about the lede-commits mailing list