* [PATCH] leds: Add more product/board names for PC Engines APU2
@ 2018-02-15 10:21 Timothy Redaelli
2018-02-17 21:16 ` Pavel Machek
2018-02-17 22:06 ` Jacek Anaszewski
0 siblings, 2 replies; 3+ messages in thread
From: Timothy Redaelli @ 2018-02-15 10:21 UTC (permalink / raw)
To: linux-leds; +Cc: Pavel Machek, Jacek Anaszewski, Richard Purdie
PC Engines "legacy" coreboot 4.0.8 changed the product/board name from "APU2"
to "apu2".
PC Engines "mainline" coreboot uses, instead, "PC Engines apu2" as
product/board name.
This commit adds the 2 variants ("apu2" and "PC Engines apu2") of product/board
name to be compatible with all the APU2 BIOSes.
Fixes: 3faee9423ce0 ("leds: Add driver for PC Engines APU/APU2 LEDs")
Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
---
drivers/leds/leds-apu.c | 26 ++++++++++++++++++++++++--
1 file changed, 24 insertions(+), 2 deletions(-)
diff --git a/drivers/leds/leds-apu.c b/drivers/leds/leds-apu.c
index 74820aab9497..311e98b1823f 100644
--- a/drivers/leds/leds-apu.c
+++ b/drivers/leds/leds-apu.c
@@ -110,6 +110,7 @@ static const struct dmi_system_id apu_led_dmi_table[] __initconst = {
DMI_MATCH(DMI_PRODUCT_NAME, "APU")
}
},
+ /* PC Engines APU2 with "Legacy" bios < 4.0.8 */
{
.ident = "apu2",
.matches = {
@@ -117,6 +118,22 @@ static const struct dmi_system_id apu_led_dmi_table[] __initconst = {
DMI_MATCH(DMI_BOARD_NAME, "APU2")
}
},
+ /* PC Engines APU2 with "Legacy" bios >= 4.0.8 */
+ {
+ .ident = "apu2",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "PC Engines"),
+ DMI_MATCH(DMI_BOARD_NAME, "apu2")
+ }
+ },
+ /* PC Engines APU2 with "Mainline" bios */
+ {
+ .ident = "apu2",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "PC Engines"),
+ DMI_MATCH(DMI_BOARD_NAME, "PC Engines apu2")
+ }
+ },
{}
};
MODULE_DEVICE_TABLE(dmi, apu_led_dmi_table);
@@ -211,7 +228,9 @@ static int __init apu_led_probe(struct platform_device *pdev)
apu_led->platform = APU1_LED_PLATFORM;
apu_led->num_led_instances = ARRAY_SIZE(apu1_led_profile);
apu_led->iosize = APU1_IOSIZE;
- } else if (dmi_match(DMI_BOARD_NAME, "APU2")) {
+ } else if (dmi_match(DMI_BOARD_NAME, "APU2") ||
+ dmi_match(DMI_BOARD_NAME, "apu2") ||
+ dmi_match(DMI_BOARD_NAME, "PC Engines apu2")) {
apu_led->profile = apu2_led_profile;
apu_led->platform = APU2_LED_PLATFORM;
apu_led->num_led_instances = ARRAY_SIZE(apu2_led_profile);
@@ -237,7 +256,10 @@ static int __init apu_led_init(void)
pr_err("No PC Engines board detected\n");
return -ENODEV;
}
- if (!(dmi_match(DMI_PRODUCT_NAME, "APU") || dmi_match(DMI_PRODUCT_NAME, "APU2"))) {
+ if (!(dmi_match(DMI_PRODUCT_NAME, "APU") ||
+ dmi_match(DMI_PRODUCT_NAME, "APU2") ||
+ dmi_match(DMI_PRODUCT_NAME, "apu2") ||
+ dmi_match(DMI_PRODUCT_NAME, "PC Engines apu2"))) {
pr_err("Unknown PC Engines board: %s\n",
dmi_get_system_info(DMI_PRODUCT_NAME));
return -ENODEV;
--
2.14.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] leds: Add more product/board names for PC Engines APU2
2018-02-15 10:21 [PATCH] leds: Add more product/board names for PC Engines APU2 Timothy Redaelli
@ 2018-02-17 21:16 ` Pavel Machek
2018-02-17 22:06 ` Jacek Anaszewski
1 sibling, 0 replies; 3+ messages in thread
From: Pavel Machek @ 2018-02-17 21:16 UTC (permalink / raw)
To: Timothy Redaelli; +Cc: linux-leds, Jacek Anaszewski, Richard Purdie
[-- Attachment #1: Type: text/plain, Size: 696 bytes --]
On Thu 2018-02-15 11:21:36, Timothy Redaelli wrote:
> PC Engines "legacy" coreboot 4.0.8 changed the product/board name from "APU2"
> to "apu2".
> PC Engines "mainline" coreboot uses, instead, "PC Engines apu2" as
> product/board name.
>
> This commit adds the 2 variants ("apu2" and "PC Engines apu2") of product/board
> name to be compatible with all the APU2 BIOSes.
>
> Fixes: 3faee9423ce0 ("leds: Add driver for PC Engines APU/APU2 LEDs")
> Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Acked-by: Pavel Machek <pavel@ucw.cz>
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] leds: Add more product/board names for PC Engines APU2
2018-02-15 10:21 [PATCH] leds: Add more product/board names for PC Engines APU2 Timothy Redaelli
2018-02-17 21:16 ` Pavel Machek
@ 2018-02-17 22:06 ` Jacek Anaszewski
1 sibling, 0 replies; 3+ messages in thread
From: Jacek Anaszewski @ 2018-02-17 22:06 UTC (permalink / raw)
To: Timothy Redaelli, linux-leds; +Cc: Pavel Machek, Richard Purdie
Hi Timothy,
Thank you for the patch.
On 02/15/2018 11:21 AM, Timothy Redaelli wrote:
> PC Engines "legacy" coreboot 4.0.8 changed the product/board name from "APU2"
> to "apu2".
> PC Engines "mainline" coreboot uses, instead, "PC Engines apu2" as
> product/board name.
>
> This commit adds the 2 variants ("apu2" and "PC Engines apu2") of product/board
> name to be compatible with all the APU2 BIOSes.
>
> Fixes: 3faee9423ce0 ("leds: Add driver for PC Engines APU/APU2 LEDs")
> Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
> ---
> drivers/leds/leds-apu.c | 26 ++++++++++++++++++++++++--
> 1 file changed, 24 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/leds/leds-apu.c b/drivers/leds/leds-apu.c
> index 74820aab9497..311e98b1823f 100644
> --- a/drivers/leds/leds-apu.c
> +++ b/drivers/leds/leds-apu.c
> @@ -110,6 +110,7 @@ static const struct dmi_system_id apu_led_dmi_table[] __initconst = {
> DMI_MATCH(DMI_PRODUCT_NAME, "APU")
> }
> },
> + /* PC Engines APU2 with "Legacy" bios < 4.0.8 */
> {
> .ident = "apu2",
> .matches = {
> @@ -117,6 +118,22 @@ static const struct dmi_system_id apu_led_dmi_table[] __initconst = {
> DMI_MATCH(DMI_BOARD_NAME, "APU2")
> }
> },
> + /* PC Engines APU2 with "Legacy" bios >= 4.0.8 */
> + {
> + .ident = "apu2",
> + .matches = {
> + DMI_MATCH(DMI_SYS_VENDOR, "PC Engines"),
> + DMI_MATCH(DMI_BOARD_NAME, "apu2")
> + }
> + },
> + /* PC Engines APU2 with "Mainline" bios */
> + {
> + .ident = "apu2",
> + .matches = {
> + DMI_MATCH(DMI_SYS_VENDOR, "PC Engines"),
> + DMI_MATCH(DMI_BOARD_NAME, "PC Engines apu2")
> + }
> + },
> {}
> };
> MODULE_DEVICE_TABLE(dmi, apu_led_dmi_table);
> @@ -211,7 +228,9 @@ static int __init apu_led_probe(struct platform_device *pdev)
> apu_led->platform = APU1_LED_PLATFORM;
> apu_led->num_led_instances = ARRAY_SIZE(apu1_led_profile);
> apu_led->iosize = APU1_IOSIZE;
> - } else if (dmi_match(DMI_BOARD_NAME, "APU2")) {
> + } else if (dmi_match(DMI_BOARD_NAME, "APU2") ||
> + dmi_match(DMI_BOARD_NAME, "apu2") ||
> + dmi_match(DMI_BOARD_NAME, "PC Engines apu2")) {
> apu_led->profile = apu2_led_profile;
> apu_led->platform = APU2_LED_PLATFORM;
> apu_led->num_led_instances = ARRAY_SIZE(apu2_led_profile);
> @@ -237,7 +256,10 @@ static int __init apu_led_init(void)
> pr_err("No PC Engines board detected\n");
> return -ENODEV;
> }
> - if (!(dmi_match(DMI_PRODUCT_NAME, "APU") || dmi_match(DMI_PRODUCT_NAME, "APU2"))) {
> + if (!(dmi_match(DMI_PRODUCT_NAME, "APU") ||
> + dmi_match(DMI_PRODUCT_NAME, "APU2") ||
> + dmi_match(DMI_PRODUCT_NAME, "apu2") ||
> + dmi_match(DMI_PRODUCT_NAME, "PC Engines apu2"))) {
> pr_err("Unknown PC Engines board: %s\n",
> dmi_get_system_info(DMI_PRODUCT_NAME));
> return -ENODEV;
>
Applied to the for-next branch of linux-leds.git.
--
Best regards,
Jacek Anaszewski
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-02-17 22:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-15 10:21 [PATCH] leds: Add more product/board names for PC Engines APU2 Timothy Redaelli
2018-02-17 21:16 ` Pavel Machek
2018-02-17 22:06 ` Jacek Anaszewski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).