x86: support kernel 5.10
[openwrt/staging/pepe2k.git] / target / linux / x86 / patches-5.10 / 300-pcengines_apu1_led.patch
1 From: Andreas Eberlein <foodeas@aeberlein.de>
2 Subject: x86: add LED support for PC Engines APU1 with mainline bios
3
4 This adds support for the LEDs on PC Engines APU1 with the mainline bios.
5
6 Signed-off-by: Andreas Eberlein <foodeas@aeberlein.de>
7 ---
8 --- a/drivers/leds/leds-apu.c
9 +++ b/drivers/leds/leds-apu.c
10 @@ -83,6 +83,7 @@ static const struct apu_led_profile apu1
11 };
12
13 static const struct dmi_system_id apu_led_dmi_table[] __initconst = {
14 + /* PC Engines APU with "Legacy" bios < 4.0.8 */
15 {
16 .ident = "apu",
17 .matches = {
18 @@ -90,6 +91,14 @@ static const struct dmi_system_id apu_le
19 DMI_MATCH(DMI_PRODUCT_NAME, "APU")
20 }
21 },
22 + /* PC Engines APU with "Mainline" bios >= 4.0.8 */
23 + {
24 + .ident = "apu",
25 + .matches = {
26 + DMI_MATCH(DMI_SYS_VENDOR, "PC Engines"),
27 + DMI_MATCH(DMI_PRODUCT_NAME, "apu1")
28 + }
29 + },
30 {}
31 };
32 MODULE_DEVICE_TABLE(dmi, apu_led_dmi_table);
33 @@ -173,7 +182,7 @@ static int __init apu_led_init(void)
34 int err;
35
36 if (!(dmi_match(DMI_SYS_VENDOR, "PC Engines") &&
37 - dmi_match(DMI_PRODUCT_NAME, "APU"))) {
38 + (dmi_match(DMI_PRODUCT_NAME, "APU") || dmi_match(DMI_PRODUCT_NAME, "apu1")))) {
39 pr_err("No PC Engines APUv1 board detected. For APUv2,3 support, enable CONFIG_PCENGINES_APU2\n");
40 return -ENODEV;
41 }