Skip to content

Commit

Permalink
leds: apu: extend support for PC Engines APU1 with newer firmware
Browse files Browse the repository at this point in the history
The DMI_PRODUCT_NAME entry on current firmware of PC Engines APU1 changed
from "APU" to "apu1"

This modification adds the missing DMI data and thereby the LED support for
the PC Engines APU1 with firmware versions >= 4.6.8.

Signed-off-by: Andreas Eberlein <[email protected]>
Tested-by: Zbyněk Kocur <[email protected]>
Signed-off-by: Pavel Machek <[email protected]>
  • Loading branch information
FooDeas authored and pavelmachek committed Feb 19, 2021
1 parent 6039b7e commit 1b40faf
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion drivers/leds/leds-apu.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,22 @@ static const struct apu_led_profile apu1_led_profile[] = {
};

static const struct dmi_system_id apu_led_dmi_table[] __initconst = {
/* PC Engines APU with factory bios "SageBios_PCEngines_APU-45" */
{
.ident = "apu",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "PC Engines"),
DMI_MATCH(DMI_PRODUCT_NAME, "APU")
}
},
/* PC Engines APU with "Mainline" bios >= 4.6.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);
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 1b40faf

Please sign in to comment.