[LEDE-DEV] [PATCH] ramips: Add I2C driver to the default kernel config

Daniel Golle daniel at makrotopia.org
Thu Jan 12 19:23:29 PST 2017


Just a thought:
Isn't there a way to simply have a hotplug handler which calls
/sbin/hwclock instead of forcing RTC modules to be built-in?

Cheers

Daniel

On Thu, Jan 12, 2017 at 07:05:00PM -0800, Rosen Penev wrote:
> 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 <rosenp at gmail.com>
> ---
>  target/linux/ramips/image/mt7621.mk   | 12 +++++-------
>  target/linux/ramips/mt7621/config-4.4 |  2 ++
>  2 files changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk
> index 6d9a727..fd28e19 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/mt7621/config-4.4 b/target/linux/ramips/mt7621/config-4.4
> index 73c3b39..383370b 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
> -- 
> 2.9.3
> 
> 
> _______________________________________________
> Lede-dev mailing list
> Lede-dev at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev



More information about the Lede-dev mailing list