From: Rosen Penev Date: Fri, 13 Jan 2017 15:14:38 +0000 (-0800) Subject: ramips: Add I2C driver to the default kernel config X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=80768ddccd6275d1506badcf57ae31560ca19da2;p=openwrt%2Fstaging%2Fansuel.git ramips: Add I2C driver to the default kernel config I made a commit that added the RTC driver to the kernel config with the intent that it would fix hctosys. Unfortunately while the RTC driver is in there, it's connected through I2C, the driver for which comes in module form and is thus loaded late. After this commit, it works fine. Signed-off-by: Rosen Penev --- diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 6d9a7273d4..fd28e1918a 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -30,7 +30,7 @@ define Device/11acnas DTS := 11ACNAS IMAGE_SIZE := $(ralink_default_fw_size_16M) DEVICE_TITLE := WeVO 11AC NAS Router - DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport kmod-i2c-mt7621 kmod-mt76 + DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport kmod-mt76 endef TARGET_DEVICES += 11acnas @@ -83,7 +83,7 @@ define Device/newifi-d1 DTS := Newifi-D1 IMAGE_SIZE := $(ralink_default_fw_size_32M) DEVICE_TITLE := Newifi D1 - DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport kmod-i2c-mt7621 + DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport endef TARGET_DEVICES += newifi-d1 @@ -91,8 +91,7 @@ define Device/pbr-m1 DTS := PBR-M1 IMAGE_SIZE := $(ralink_default_fw_size_16M) DEVICE_TITLE := PBR-M1 - DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport kmod-ata-core kmod-ata-ahci \ - kmod-i2c-mt7621 + DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport kmod-ata-core kmod-ata-ahci endef TARGET_DEVICES += pbr-m1 @@ -157,7 +156,7 @@ define Device/w2914nsv2 DTS := W2914NSV2 IMAGE_SIZE := $(ralink_default_fw_size_16M) DEVICE_TITLE := WeVO W2914NS v2 - DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport kmod-i2c-mt7621 kmod-mt76 + DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport kmod-mt76 endef TARGET_DEVICES += w2914nsv2 @@ -179,8 +178,7 @@ define Device/witi DTS := WITI IMAGE_SIZE := $(ralink_default_fw_size_16M) DEVICE_TITLE := MQmaker WiTi - DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport kmod-ata-core kmod-ata-ahci \ - kmod-i2c-mt7621 + DEVICE_PACKAGES := kmod-usb3 kmod-usb-ledtrig-usbport kmod-ata-core kmod-ata-ahci endef TARGET_DEVICES += witi diff --git a/target/linux/ramips/modules.mk b/target/linux/ramips/modules.mk index 99c5a9d0fc..c2b6f50624 100644 --- a/target/linux/ramips/modules.mk +++ b/target/linux/ramips/modules.mk @@ -58,22 +58,6 @@ endef $(eval $(call KernelPackage,i2c-ralink)) -I2C_MT7621_MODULES:= \ - CONFIG_I2C_MT7621:drivers/i2c/busses/i2c-mt7621 - -define KernelPackage/i2c-mt7621 - $(call i2c_defaults,$(I2C_MT7621_MODULES),59) - TITLE:=MT7621 I2C Controller - DEPENDS:=kmod-i2c-core \ - @(TARGET_ramips_mt7621||TARGET_ramips_mt7628||TARGET_ramips_mt7688) -endef - -define KernelPackage/i2c-mt7621/description - Kernel modules for enable mt7621 i2c controller. -endef - -$(eval $(call KernelPackage,i2c-mt7621)) - define KernelPackage/dma-ralink SUBMENU:=Other modules TITLE:=Ralink GDMA Engine diff --git a/target/linux/ramips/mt7621/config-4.4 b/target/linux/ramips/mt7621/config-4.4 index 73c3b39f48..383370b86e 100644 --- a/target/linux/ramips/mt7621/config-4.4 +++ b/target/linux/ramips/mt7621/config-4.4 @@ -115,6 +115,8 @@ CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y CONFIG_HIGHMEM=y CONFIG_HW_HAS_PCI=y CONFIG_HZ_PERIODIC=y +CONFIG_I2C=y +CONFIG_I2C_MT7621=y # CONFIG_IMG_MDC_DMA is not set CONFIG_INITRAMFS_SOURCE="" CONFIG_IRQCHIP=y