From b1047108bf070bad39c212806f30e10ecb0ebc58 Mon Sep 17 00:00:00 2001 From: Josef Schlehofer <josef.schlehofer@nic.cz> Date: Fri, 14 Oct 2022 00:13:44 +0200 Subject: [PATCH] patches/openwrt: Turris 1.x: add LEDs driver: manually add io.h Fixes: drivers/leds/leds-turris-1x.c: In function 'turris1x_hwtrig_activate': drivers/leds/leds-turris-1x.c:58:8: error: implicit declaration of function 'readb' [-Werror=implicit-function-declaration] val = readb(leds->regs + TURRIS1X_LED_SW_OVERRIDE_REG); ^~~~~ drivers/leds/leds-turris-1x.c:60:2: error: implicit declaration of function 'writeb'; did you mean 'wrtee'? [-Werror=implicit-function-declaration] writeb(val, leds->regs + TURRIS1X_LED_SW_OVERRIDE_REG); ^~~~~~ wrtee cc1: some warnings being treated as errors make[6]: *** [scripts/Makefile.build:286: drivers/leds/leds-turris-1x.o] Error 1 make[5]: *** [scripts/Makefile.build:503: drivers/leds] Error 2 --- patches/openwrt/backport/0002-Turris1X-leds.patch | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/patches/openwrt/backport/0002-Turris1X-leds.patch b/patches/openwrt/backport/0002-Turris1X-leds.patch index 8e9da8f97..00f477633 100644 --- a/patches/openwrt/backport/0002-Turris1X-leds.patch +++ b/patches/openwrt/backport/0002-Turris1X-leds.patch @@ -17,7 +17,7 @@ new file mode 100644 index 0000000000..3db219ad76 --- /dev/null +++ b/target/linux/mpc85xx/patches-5.10/0001-leds-Add-support-for-Turris-1.x-LEDs.patch -@@ -0,0 +1,584 @@ +@@ -0,0 +1,585 @@ +From 6e751295894f291e13f3cf06ecbd40e3658dd53a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Pali=20Roh=C3=A1r?= <pali@kernel.org> +Date: Tue, 5 Jul 2022 17:59:29 +0200 @@ -124,13 +124,14 @@ index 0000000000..3db219ad76 +index 000000000000..cf7567b64306 +--- /dev/null ++++ b/drivers/leds/leds-turris-1x.c -+@@ -0,0 +1,474 @@ ++@@ -0,0 +1,475 @@ ++// SPDX-License-Identifier: GPL-2.0 ++// (C) 2022 Pali Rohár <pali@kernel.org> ++// ++// CZ.NIC's Turris 1.x LEDs driver, controlled by CPLD firmware: ++// https://gitlab.nic.cz/turris/hw/turris_cpld/-/blob/master/CZ_NIC_Router_CPLD.v ++ +++#include <linux/io.h> ++#include <linux/i2c.h> ++#include <linux/led-class-multicolor.h> ++#include <linux/module.h> -- GitLab