diff options
author | Andreas Eberlein <foodeas@aeberlein.de> | 2020-06-23 22:59:26 +0200 |
---|---|---|
committer | Paul Spooren <mail@aparcar.org> | 2021-02-20 00:29:18 -1000 |
commit | a3e6521c1a7d4c78d825833e224272ec89a38bf2 (patch) | |
tree | 2bfbf9baf5438634193d3801642944bb3ac34697 /target/linux/x86/patches-5.4 | |
parent | 09e66112f1ea9f5838ce80533f3850523dc30230 (diff) | |
download | upstream-a3e6521c1a7d4c78d825833e224272ec89a38bf2.tar.gz upstream-a3e6521c1a7d4c78d825833e224272ec89a38bf2.tar.bz2 upstream-a3e6521c1a7d4c78d825833e224272ec89a38bf2.zip |
x86: add led driver for PC Engines APU1
This driver adds the LED support for the PC Engines APU1.
This integrates the Linux kernel driver and includes a patch to support
newer firmware versions. Also the default LED configuration is updated
to use the correct devices.
Signed-off-by: Andreas Eberlein <foodeas@aeberlein.de>
Diffstat (limited to 'target/linux/x86/patches-5.4')
-rw-r--r-- | target/linux/x86/patches-5.4/300-pcengines_apu1_led.patch | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/target/linux/x86/patches-5.4/300-pcengines_apu1_led.patch b/target/linux/x86/patches-5.4/300-pcengines_apu1_led.patch new file mode 100644 index 0000000000..9d1e4ab9c2 --- /dev/null +++ b/target/linux/x86/patches-5.4/300-pcengines_apu1_led.patch @@ -0,0 +1,41 @@ +From: Andreas Eberlein <foodeas@aeberlein.de> +Subject: x86: add LED support for PC Engines APU1 with mainline bios + +This adds support for the LEDs on PC Engines APU1 with the mainline bios. + +Signed-off-by: Andreas Eberlein <foodeas@aeberlein.de> +--- +--- a/drivers/leds/leds-apu.c ++++ b/drivers/leds/leds-apu.c +@@ -83,6 +83,7 @@ static const struct apu_led_profile apu1 + }; + + static const struct dmi_system_id apu_led_dmi_table[] __initconst = { ++ /* PC Engines APU with "Legacy" bios < 4.0.8 */ + { + .ident = "apu", + .matches = { +@@ -90,6 +91,14 @@ static const struct dmi_system_id apu_le + DMI_MATCH(DMI_PRODUCT_NAME, "APU") + } + }, ++ /* PC Engines APU with "Mainline" bios >= 4.0.8 */ ++ { ++ .ident = "apu", ++ .matches = { ++ DMI_MATCH(DMI_SYS_VENDOR, "PC Engines"), ++ DMI_MATCH(DMI_PRODUCT_NAME, "apu1") ++ } ++ }, + {} + }; + MODULE_DEVICE_TABLE(dmi, apu_led_dmi_table); +@@ -173,7 +182,7 @@ static int __init apu_led_init(void) + int err; + + if (!(dmi_match(DMI_SYS_VENDOR, "PC Engines") && +- dmi_match(DMI_PRODUCT_NAME, "APU"))) { ++ (dmi_match(DMI_PRODUCT_NAME, "APU") || dmi_match(DMI_PRODUCT_NAME, "apu1")))) { + pr_err("No PC Engines APUv1 board detected. For APUv2,3 support, enable CONFIG_PCENGINES_APU2\n"); + return -ENODEV; + } |