[source] kernel: allow selecting RTC drivers on targets without explicit RTC support
LEDE Commits
lede-commits at lists.infradead.org
Thu Dec 14 09:44:01 PST 2017
jow pushed a commit to source.git, branch lede-17.01:
https://git.lede-project.org/98588273b10457bea0a47a0ba8e2a07a6f99af0d
commit 98588273b10457bea0a47a0ba8e2a07a6f99af0d
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Wed Apr 12 09:15:38 2017 +0200
kernel: allow selecting RTC drivers on targets without explicit RTC support
Keep them disabled by default to avoid pulling in extra kernel bloat
Signed-off-by: Felix Fietkau <nbd at nbd.name>
(cherry picked from commit 5afe9a054cbcb1630a42200f3ac799432522a87d)
---
package/kernel/linux/modules/other.mk | 23 +++++++++++++++--------
target/Config.in | 3 ++-
2 files changed, 17 insertions(+), 9 deletions(-)
diff --git a/package/kernel/linux/modules/other.mk b/package/kernel/linux/modules/other.mk
index 017a94c..5e31ec2 100644
--- a/package/kernel/linux/modules/other.mk
+++ b/package/kernel/linux/modules/other.mk
@@ -469,7 +469,8 @@ $(eval $(call KernelPackage,bcma))
define KernelPackage/rtc-ds1307
SUBMENU:=$(OTHER_MENU)
TITLE:=Dallas/Maxim DS1307 (and compatible) RTC support
- DEPENDS:=@RTC_SUPPORT +kmod-i2c-core
+ DEFAULT:=m if ALL_KMODS && RTC_SUPPORT
+ DEPENDS:=+kmod-i2c-core
KCONFIG:=CONFIG_RTC_DRV_DS1307 \
CONFIG_RTC_CLASS=y
FILES:=$(LINUX_DIR)/drivers/rtc/rtc-ds1307.ko
@@ -487,7 +488,8 @@ $(eval $(call KernelPackage,rtc-ds1307))
define KernelPackage/rtc-ds1374
SUBMENU:=$(OTHER_MENU)
TITLE:=Dallas/Maxim DS1374 RTC support
- DEPENDS:=@RTC_SUPPORT +kmod-i2c-core
+ DEFAULT:=m if ALL_KMODS && RTC_SUPPORT
+ DEPENDS:=+kmod-i2c-core
KCONFIG:=CONFIG_RTC_DRV_DS1374 \
CONFIG_RTC_DRV_DS1374_WDT=n \
CONFIG_RTC_CLASS=y
@@ -505,7 +507,8 @@ $(eval $(call KernelPackage,rtc-ds1374))
define KernelPackage/rtc-ds1672
SUBMENU:=$(OTHER_MENU)
TITLE:=Dallas/Maxim DS1672 RTC support
- DEPENDS:=@RTC_SUPPORT +kmod-i2c-core
+ DEFAULT:=m if ALL_KMODS && RTC_SUPPORT
+ DEPENDS:=+kmod-i2c-core
KCONFIG:=CONFIG_RTC_DRV_DS1672 \
CONFIG_RTC_CLASS=y
FILES:=$(LINUX_DIR)/drivers/rtc/rtc-ds1672.ko
@@ -522,7 +525,8 @@ $(eval $(call KernelPackage,rtc-ds1672))
define KernelPackage/rtc-isl1208
SUBMENU:=$(OTHER_MENU)
TITLE:=Intersil ISL1208 RTC support
- DEPENDS:=@RTC_SUPPORT +kmod-i2c-core
+ DEFAULT:=m if ALL_KMODS && RTC_SUPPORT
+ DEPENDS:=+kmod-i2c-core
KCONFIG:=CONFIG_RTC_DRV_ISL1208 \
CONFIG_RTC_CLASS=y
FILES:=$(LINUX_DIR)/drivers/rtc/rtc-isl1208.ko
@@ -539,7 +543,8 @@ $(eval $(call KernelPackage,rtc-isl1208))
define KernelPackage/rtc-pcf8563
SUBMENU:=$(OTHER_MENU)
TITLE:=Philips PCF8563/Epson RTC8564 RTC support
- DEPENDS:=@RTC_SUPPORT +kmod-i2c-core
+ DEFAULT:=m if ALL_KMODS && RTC_SUPPORT
+ DEPENDS:=+kmod-i2c-core
KCONFIG:=CONFIG_RTC_DRV_PCF8563 \
CONFIG_RTC_CLASS=y
FILES:=$(LINUX_DIR)/drivers/rtc/rtc-pcf8563.ko
@@ -557,7 +562,7 @@ $(eval $(call KernelPackage,rtc-pcf8563))
define KernelPackage/rtc-pcf2123
SUBMENU:=$(OTHER_MENU)
TITLE:=Philips PCF2123 RTC support
- DEPENDS:=@RTC_SUPPORT
+ DEFAULT:=m if ALL_KMODS && RTC_SUPPORT
KCONFIG:=CONFIG_RTC_DRV_PCF2123 \
CONFIG_RTC_CLASS=y
FILES:=$(LINUX_DIR)/drivers/rtc/rtc-pcf2123.ko
@@ -573,7 +578,8 @@ $(eval $(call KernelPackage,rtc-pcf2123))
define KernelPackage/rtc-pt7c4338
SUBMENU:=$(OTHER_MENU)
TITLE:=Pericom PT7C4338 RTC support
- DEPENDS:=@RTC_SUPPORT +kmod-i2c-core
+ DEFAULT:=m if ALL_KMODS && RTC_SUPPORT
+ DEPENDS:=+kmod-i2c-core
KCONFIG:=CONFIG_RTC_DRV_PT7C4338 \
CONFIG_RTC_CLASS=y
FILES:=$(LINUX_DIR)/drivers/rtc/rtc-pt7c4338.ko
@@ -589,7 +595,8 @@ $(eval $(call KernelPackage,rtc-pt7c4338))
define KernelPackage/rtc-rs5c372a
SUBMENU:=$(OTHER_MENU)
TITLE:=Ricoh R2025S/D, RS5C372A/B, RV5C386, RV5C387A
- DEPENDS:=@RTC_SUPPORT +kmod-i2c-core
+ DEFAULT:=m if ALL_KMODS && RTC_SUPPORT
+ DEPENDS:=+kmod-i2c-core
KCONFIG:=CONFIG_RTC_DRV_RS5C372 \
CONFIG_RTC_CLASS=y
FILES:=$(LINUX_DIR)/drivers/rtc/rtc-rs5c372.ko
diff --git a/target/Config.in b/target/Config.in
index 9ff7096..cb876c6 100644
--- a/target/Config.in
+++ b/target/Config.in
@@ -34,7 +34,8 @@ config USB_GADGET_SUPPORT
bool
config RTC_SUPPORT
- bool
+ tristate
+ depends on m
config BIG_ENDIAN
bool
More information about the lede-commits
mailing list