Subject: [PATCH] platform: x86: pcengines-apuv2: detect apuv4 board

GPIO stuff on APUv4 seems to be the same as on APUv2, so we just
need to match on DMI data.

Fixes: f8eb0235f65989fc5521c40c78d1261e7f25cdbe
Signed-off-by: Enrico Weigelt, metux IT consult <[email protected]>
---
drivers/platform/x86/pcengines-apuv2.c | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)

diff --git a/drivers/platform/x86/pcengines-apuv2.c b/drivers/platform/x86/pcengines-apuv2.c
index 48b112b4f0b0..49f25bffce3c 100644
--- a/drivers/platform/x86/pcengines-apuv2.c
+++ b/drivers/platform/x86/pcengines-apuv2.c
@@ -189,6 +189,33 @@ static const struct dmi_system_id apu_gpio_dmi_table[] __initconst = {
},
.driver_data = (void *)&board_apu2,
},
+ /* APU4 w/ legacy bios < 4.0.8 */
+ {
+ .ident = "apu4",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "PC Engines"),
+ DMI_MATCH(DMI_BOARD_NAME, "APU4")
+ },
+ .driver_data = (void *)&board_apu2,
+ },
+ /* APU4 w/ legacy bios >= 4.0.8 */
+ {
+ .ident = "apu4",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "PC Engines"),
+ DMI_MATCH(DMI_BOARD_NAME, "apu4")
+ },
+ .driver_data = (void *)&board_apu2,
+ },
+ /* APU4 w/ mainline bios */
+ {
+ .ident = "apu4",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "PC Engines"),
+ DMI_MATCH(DMI_BOARD_NAME, "PC Engines apu4")
+ },
+ .driver_data = (void *)&board_apu2,
+ },
{}
};

--
2.11.0


2019-11-25 12:13:28

by Andy Shevchenko

[permalink] [raw]
Subject: Re: [PATCH] platform: x86: pcengines-apuv2: detect apuv4 board

On Thu, Nov 21, 2019 at 5:58 PM Enrico Weigelt, metux IT consult
<[email protected]> wrote:
>
> GPIO stuff on APUv4 seems to be the same as on APUv2, so we just
> need to match on DMI data.
>
> Fixes: f8eb0235f65989fc5521c40c78d1261e7f25cdbe

The Fixes tag format is wrong.
You are not first time contributor...

Also the question why do you have it here? Do we have any regression
(something worked and stopped working)?

--
With Best Regards,
Andy Shevchenko