All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] leds: add APU3 dmi information to leds-apu
@ 2018-07-30  9:11 ` Florian Eckert
  0 siblings, 0 replies; 4+ messages in thread
From: Florian Eckert @ 2018-07-30  9:11 UTC (permalink / raw)
  Cc: jacek.anaszewski, pavel, linux-leds, linux-kernel, Eckert.Florian

This driver should also get loaded if this is a APU3 from PC Engines.
It has the same pin layout for leds.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
---
 drivers/leds/leds-apu.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/leds/leds-apu.c b/drivers/leds/leds-apu.c
index 8c93d68964c7..1ed1c5a5dc77 100644
--- a/drivers/leds/leds-apu.c
+++ b/drivers/leds/leds-apu.c
@@ -134,6 +134,14 @@ static const struct dmi_system_id apu_led_dmi_table[] __initconst = {
 			DMI_MATCH(DMI_BOARD_NAME, "PC Engines apu2")
 		}
 	},
+	/* PC Engines APU3 with "Legancy" bios >= 4.0.7 */
+	{
+		.ident = "apu3",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "PC Engines"),
+			DMI_MATCH(DMI_BOARD_NAME, "APU3")
+		}
+	},
 	{}
 };
 MODULE_DEVICE_TABLE(dmi, apu_led_dmi_table);
@@ -229,6 +237,7 @@ static int __init apu_led_probe(struct platform_device *pdev)
 		apu_led->num_led_instances = ARRAY_SIZE(apu1_led_profile);
 		apu_led->iosize = APU1_IOSIZE;
 	} else if (dmi_match(DMI_BOARD_NAME, "APU2") ||
+		   dmi_match(DMI_BOARD_NAME, "APU3") ||
 		   dmi_match(DMI_BOARD_NAME, "apu2") ||
 		   dmi_match(DMI_BOARD_NAME, "PC Engines apu2")) {
 		apu_led->profile = apu2_led_profile;
@@ -258,6 +267,7 @@ static int __init apu_led_init(void)
 	}
 	if (!(dmi_match(DMI_PRODUCT_NAME, "APU") ||
 	      dmi_match(DMI_PRODUCT_NAME, "APU2") ||
+	      dmi_match(DMI_PRODUCT_NAME, "APU3") ||
 	      dmi_match(DMI_PRODUCT_NAME, "apu2") ||
 	      dmi_match(DMI_PRODUCT_NAME, "PC Engines apu2"))) {
 		pr_err("Unknown PC Engines board: %s\n",
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] leds: add APU3 dmi information to leds-apu
@ 2018-07-30  9:11 ` Florian Eckert
  0 siblings, 0 replies; 4+ messages in thread
From: Florian Eckert @ 2018-07-30  9:11 UTC (permalink / raw)
  Cc: jacek.anaszewski, pavel, linux-leds, linux-kernel, Eckert.Florian

This driver should also get loaded if this is a APU3 from PC Engines.
It has the same pin layout for leds.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
---
 drivers/leds/leds-apu.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/leds/leds-apu.c b/drivers/leds/leds-apu.c
index 8c93d68964c7..1ed1c5a5dc77 100644
--- a/drivers/leds/leds-apu.c
+++ b/drivers/leds/leds-apu.c
@@ -134,6 +134,14 @@ static const struct dmi_system_id apu_led_dmi_table[] __initconst = {
 			DMI_MATCH(DMI_BOARD_NAME, "PC Engines apu2")
 		}
 	},
+	/* PC Engines APU3 with "Legancy" bios >= 4.0.7 */
+	{
+		.ident = "apu3",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "PC Engines"),
+			DMI_MATCH(DMI_BOARD_NAME, "APU3")
+		}
+	},
 	{}
 };
 MODULE_DEVICE_TABLE(dmi, apu_led_dmi_table);
@@ -229,6 +237,7 @@ static int __init apu_led_probe(struct platform_device *pdev)
 		apu_led->num_led_instances = ARRAY_SIZE(apu1_led_profile);
 		apu_led->iosize = APU1_IOSIZE;
 	} else if (dmi_match(DMI_BOARD_NAME, "APU2") ||
+		   dmi_match(DMI_BOARD_NAME, "APU3") ||
 		   dmi_match(DMI_BOARD_NAME, "apu2") ||
 		   dmi_match(DMI_BOARD_NAME, "PC Engines apu2")) {
 		apu_led->profile = apu2_led_profile;
@@ -258,6 +267,7 @@ static int __init apu_led_init(void)
 	}
 	if (!(dmi_match(DMI_PRODUCT_NAME, "APU") ||
 	      dmi_match(DMI_PRODUCT_NAME, "APU2") ||
+	      dmi_match(DMI_PRODUCT_NAME, "APU3") ||
 	      dmi_match(DMI_PRODUCT_NAME, "apu2") ||
 	      dmi_match(DMI_PRODUCT_NAME, "PC Engines apu2"))) {
 		pr_err("Unknown PC Engines board: %s\n",
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] leds: add APU3 dmi information to leds-apu
  2018-07-30  9:11 ` Florian Eckert
  (?)
@ 2018-07-30 14:14 ` Pavel Machek
  -1 siblings, 0 replies; 4+ messages in thread
From: Pavel Machek @ 2018-07-30 14:14 UTC (permalink / raw)
  To: Florian Eckert; +Cc: jacek.anaszewski, linux-leds, linux-kernel, Eckert.Florian

[-- Attachment #1: Type: text/plain, Size: 401 bytes --]

On Mon 2018-07-30 11:11:08, Florian Eckert wrote:
> This driver should also get loaded if this is a APU3 from PC Engines.
> It has the same pin layout for leds.
> 
> Signed-off-by: Florian Eckert <fe@dev.tdt.de>

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] 4+ messages in thread

* Re: [PATCH] leds: add APU3 dmi information to leds-apu
  2018-07-30  9:11 ` Florian Eckert
  (?)
  (?)
@ 2018-07-31 11:06 ` Jacek Anaszewski
  -1 siblings, 0 replies; 4+ messages in thread
From: Jacek Anaszewski @ 2018-07-31 11:06 UTC (permalink / raw)
  To: Florian Eckert; +Cc: pavel, linux-leds, linux-kernel, Eckert.Florian

Hi Florian,

Thank you for the patch.

Please check the patch, which is in linux-next already:

https://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds.git/commit/?h=for-next&id=8cb21086cc6359c6d4f003a788050308afb211ad

It seems to have added the support you want.

Best regards,
Jacek Anaszewski

On 07/30/2018 11:11 AM, Florian Eckert wrote:
> This driver should also get loaded if this is a APU3 from PC Engines.
> It has the same pin layout for leds.
> 
> Signed-off-by: Florian Eckert <fe@dev.tdt.de>
> ---
>  drivers/leds/leds-apu.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/drivers/leds/leds-apu.c b/drivers/leds/leds-apu.c
> index 8c93d68964c7..1ed1c5a5dc77 100644
> --- a/drivers/leds/leds-apu.c
> +++ b/drivers/leds/leds-apu.c
> @@ -134,6 +134,14 @@ static const struct dmi_system_id apu_led_dmi_table[] __initconst = {
>  			DMI_MATCH(DMI_BOARD_NAME, "PC Engines apu2")
>  		}
>  	},
> +	/* PC Engines APU3 with "Legancy" bios >= 4.0.7 */
> +	{
> +		.ident = "apu3",
> +		.matches = {
> +			DMI_MATCH(DMI_SYS_VENDOR, "PC Engines"),
> +			DMI_MATCH(DMI_BOARD_NAME, "APU3")
> +		}
> +	},
>  	{}
>  };
>  MODULE_DEVICE_TABLE(dmi, apu_led_dmi_table);
> @@ -229,6 +237,7 @@ static int __init apu_led_probe(struct platform_device *pdev)
>  		apu_led->num_led_instances = ARRAY_SIZE(apu1_led_profile);
>  		apu_led->iosize = APU1_IOSIZE;
>  	} else if (dmi_match(DMI_BOARD_NAME, "APU2") ||
> +		   dmi_match(DMI_BOARD_NAME, "APU3") ||
>  		   dmi_match(DMI_BOARD_NAME, "apu2") ||
>  		   dmi_match(DMI_BOARD_NAME, "PC Engines apu2")) {
>  		apu_led->profile = apu2_led_profile;
> @@ -258,6 +267,7 @@ static int __init apu_led_init(void)
>  	}
>  	if (!(dmi_match(DMI_PRODUCT_NAME, "APU") ||
>  	      dmi_match(DMI_PRODUCT_NAME, "APU2") ||
> +	      dmi_match(DMI_PRODUCT_NAME, "APU3") ||
>  	      dmi_match(DMI_PRODUCT_NAME, "apu2") ||
>  	      dmi_match(DMI_PRODUCT_NAME, "PC Engines apu2"))) {
>  		pr_err("Unknown PC Engines board: %s\n",
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-07-31 11:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-30  9:11 [PATCH] leds: add APU3 dmi information to leds-apu Florian Eckert
2018-07-30  9:11 ` Florian Eckert
2018-07-30 14:14 ` Pavel Machek
2018-07-31 11:06 ` Jacek Anaszewski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.