From 9c0c52cd7086d79289ea89d7fa061894bbcdc975 Mon Sep 17 00:00:00 2001 From: Evan Benn Date: Wed, 21 Aug 2024 04:46:44 +0000 Subject: [PATCH] ramips: mt7621: (APP-3302, PR #286) Move PWM LED from kmod to kernel builtin The status LED is now driven by the PWM driver. When the driver is built as a kmod module, it is loaded after the preinit state is set. This means the diag.sh script cannot set the color and flashing pattern. Making the driver built in means the LED can be controlled at preinit stage. Approved-by: James Haggerty Approved-by: Sophronia Koilpillai --- target/linux/ramips/image/mt7621.mk | 2 +- target/linux/ramips/mt7621/config-5.15 | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 69cd3e90e7..1fdf0afa20 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -1684,7 +1684,7 @@ define Device/morse_artini # If $1=squashfs remove, likewise with $2=sysupgrade.bin, for simpler names. # So a 'normal' Artini image will look like openwrt-morse-2.7.0-artini.bin DEVICE_IMG_NAME = $(VERSION_DIST_SANITIZED)-$$(IMG_PREFIX_VERCODE)$$(call sanitize,$$(DEVICE_MODEL))$$(if $$(filter-out squashfs,$$(1)),-$$(1),'')$$(if $$(filter-out sysupgrade.bin, $$(2)),-$$(2),.bin) - DEVICE_PACKAGES := kmod-mmc-mt7620 kmod-mt7603 kmod-pwm-gpio kmod-leds-pwm-multicolor \ + DEVICE_PACKAGES := kmod-mmc-mt7620 kmod-mt7603 \ kmod-morse netifd-morse endef TARGET_DEVICES += morse_artini diff --git a/target/linux/ramips/mt7621/config-5.15 b/target/linux/ramips/mt7621/config-5.15 index 05e4c1ce87..a7fc382368 100644 --- a/target/linux/ramips/mt7621/config-5.15 +++ b/target/linux/ramips/mt7621/config-5.15 @@ -104,6 +104,7 @@ CONFIG_IRQ_DOMAIN_HIERARCHY=y CONFIG_IRQ_FORCED_THREADING=y CONFIG_IRQ_MIPS_CPU=y CONFIG_IRQ_WORK=y +CONFIG_LEDS_PWM_MULTICOLOR=y CONFIG_LED_TRIGGER_PHY=y CONFIG_LIBFDT=y CONFIG_LOCK_DEBUGGING_SUPPORT=y @@ -221,6 +222,10 @@ CONFIG_POWER_RESET=y CONFIG_POWER_RESET_GPIO=y CONFIG_POWER_SUPPLY=y CONFIG_PTP_1588_CLOCK_OPTIONAL=y +CONFIG_PWM=y +CONFIG_PWM_GPIO=y +# CONFIG_PWM_MEDIATEK_RAMIPS is not set +CONFIG_PWM_SYSFS=y CONFIG_QUEUED_RWLOCKS=y CONFIG_QUEUED_SPINLOCKS=y CONFIG_RALINK=y