From a9ddc7432abae1105d9f2385d13edd931d48720b Mon Sep 17 00:00:00 2001 From: George Oldfort Date: Tue, 26 Nov 2024 15:04:45 +0100 Subject: generic: backport support for KTD2026/7 rgb(w) led controller This commit adds the Linux kernel mainline driver "leds-ktd202x" for the KinetIC KTD2026 and KTD2027 RGB/RBGW controller with I2C interface that was introduced in kernel version 6.7, last changed in mainline on 2024-05-31. At least the Acer Connect Vero W6m (a variant of the Acer Predator Connect W6 without 2.5G eth1 port, usb3 port, and the 6 on-board gpio RGB LEDs) is equipped with a KTD2026 (and a single RGB LED attached to it used by the stock firmware as status LED), and maybe other router devices also are. Signed-off-by: George Oldfort Link: https://github.com/openwrt/openwrt/pull/16860 Signed-off-by: Hauke Mehrtens (cherry picked from commit 56d97fff55f3d384eeb00b021c43fecb380a5bdd) --- package/kernel/linux/modules/leds.mk | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'package/kernel/linux/modules') diff --git a/package/kernel/linux/modules/leds.mk b/package/kernel/linux/modules/leds.mk index 8b24cb0ef88..0c42895bb2f 100644 --- a/package/kernel/linux/modules/leds.mk +++ b/package/kernel/linux/modules/leds.mk @@ -147,6 +147,24 @@ endef $(eval $(call KernelPackage,leds-apu)) +define KernelPackage/leds-ktd202x + SUBMENU:=LED modules + TITLE:=LED support for KTD202x Chips + DEPENDS:=+kmod-i2c-core +kmod-regmap-i2c + KCONFIG:=CONFIG_LEDS_KTD202X + FILES:= $(LINUX_DIR)/drivers/leds/rgb/leds-ktd202x.ko + AUTOLOAD:=$(call AutoProbe,leds-ktd202x,1) +endef + +define KernelPackage/leds-ktd202x/description + This option enables support for the Kinetic KTD2026/KTD2027 + RGB/White LED driver found in different BQ mobile phones. + It is a 3 or 4 channel LED driver programmed via an I2C interface. +endef + +$(eval $(call KernelPackage,leds-ktd202x)) + + define KernelPackage/leds-mlxcpld SUBMENU:=$(LEDS_MENU) TITLE:=LED support for the Mellanox boards -- cgit v1.2.3