[LEDE-DEV] [RFC 2/6 v2] x86: Add LED & GPIO drivers for the PC Engines APU2 board
Felix Fietkau
nbd at nbd.name
Sun Oct 23 05:18:52 PDT 2016
On 2016-10-22 19:39, Chris Blake wrote:
> This patch adds the following drivers to the x86 target:
>
> leds-apu2 - A driver that enables usage of the onboard LEDs and Reset
> button wired to the chipset. This driver uses DMI to only enable on the
> APU2 board.
> gpio-nct5104d - A driver that allows for usage of the SuperIO GPIO chip
> on the PC Engines APU boards.
>
> Signed-off-by: Chris Blake <chrisrblake93 at gmail.com>
> ---
> .../linux/x86/files/drivers/gpio/gpio-nct5104d.c | 432 +++++++++++++++++++++
> target/linux/x86/files/drivers/leds/leds-apu2.c | 374 ++++++++++++++++++
> target/linux/x86/modules.mk | 21 +
> .../x86/patches-4.4/800-add-apu2-led-driver.patch | 29 ++
> .../patches-4.4/801-add-nct5104d-gpio-driver.patch | 27 ++
> 5 files changed, 883 insertions(+)
> create mode 100644 target/linux/x86/files/drivers/gpio/gpio-nct5104d.c
> create mode 100644 target/linux/x86/files/drivers/leds/leds-apu2.c
> create mode 100644 target/linux/x86/modules.mk
> create mode 100644 target/linux/x86/patches-4.4/800-add-apu2-led-driver.patch
> create mode 100644 target/linux/x86/patches-4.4/801-add-nct5104d-gpio-driver.patch
>
> diff --git a/target/linux/x86/modules.mk b/target/linux/x86/modules.mk
> new file mode 100644
> index 0000000..1fc5ce5
> --- /dev/null
> +++ b/target/linux/x86/modules.mk
> @@ -0,0 +1,21 @@
> +#
> +# Copyright (C) 2016 OpenWrt.org
> +#
> +# This is free software, licensed under the GNU General Public License v2.
> +# See /LICENSE for more information.
> +#
> +
> +define KernelPackage/gpio-nct5104d
> + SUBMENU:=$(OTHER_MENU)
> + TITLE:=nct5104d GPIO Support
> + DEPENDS:=@TARGET_x86 @GPIO_SUPPORT
> + KCONFIG:=CONFIG_GPIO_NCT5104D
> + FILES:=$(LINUX_DIR)/drivers/gpio/gpio-nct5104d.ko
> + AUTOLOAD:=$(call AutoLoad,60,gpio-nct5104d)
> +endef
> +
> +define KernelPackage/gpio-nct5104d/description
> + Kernel module for the nct5104d Super I/O chip on PC Engine APU boards.
> +endef
> +
> +$(eval $(call KernelPackage,gpio-nct5104d))
Please enable this in the x86/64 kernel config instead of packaging it.
- Felix
More information about the Lede-dev
mailing list