kernel: apu leds: add more id's
authorArne Fitzenreiter <arne_f@ipfire.org>
Fri, 22 Feb 2019 17:02:45 +0000 (18:02 +0100)
committerArne Fitzenreiter <arne_f@ipfire.org>
Fri, 22 Feb 2019 17:02:45 +0000 (18:02 +0100)
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
src/patches/linux/linux-4.14-apu_leds.patch

index dc63fd2..7013f6e 100644 (file)
@@ -1,6 +1,6 @@
-diff -Naur linux-4.14.101.org/arch/x86/Kconfig linux-4.14.101/arch/x86/Kconfig
---- linux-4.14.101.org/arch/x86/Kconfig        2019-02-15 09:08:56.000000000 +0100
-+++ linux-4.14.101/arch/x86/Kconfig    2019-02-18 22:24:00.682722072 +0100
+diff -Naur linux-4.14.102.org/arch/x86/Kconfig linux-4.14.102/arch/x86/Kconfig
+--- linux-4.14.102.org/arch/x86/Kconfig        2019-02-20 10:20:56.000000000 +0100
++++ linux-4.14.102/arch/x86/Kconfig    2019-02-22 17:56:37.185202293 +0100
 @@ -2715,6 +2715,7 @@
           - AC adapter status updates
           - Battery status updates
@@ -28,10 +28,10 @@ diff -Naur linux-4.14.101.org/arch/x86/Kconfig linux-4.14.101/arch/x86/Kconfig
  config AMD_NB
        def_bool y
        depends on CPU_SUP_AMD && PCI
-diff -Naur linux-4.14.101.org/arch/x86/platform/apu/apu2-led.c linux-4.14.101/arch/x86/platform/apu/apu2-led.c
---- linux-4.14.101.org/arch/x86/platform/apu/apu2-led.c        1970-01-01 01:00:00.000000000 +0100
-+++ linux-4.14.101/arch/x86/platform/apu/apu2-led.c    2019-02-18 22:30:08.503059825 +0100
-@@ -0,0 +1,183 @@
+diff -Naur linux-4.14.102.org/arch/x86/platform/apu/apu2-led.c linux-4.14.102/arch/x86/platform/apu/apu2-led.c
+--- linux-4.14.102.org/arch/x86/platform/apu/apu2-led.c        1970-01-01 01:00:00.000000000 +0100
++++ linux-4.14.102/arch/x86/platform/apu/apu2-led.c    2019-02-22 17:58:52.795665744 +0100
+@@ -0,0 +1,185 @@
 +/*
 + * LEDs driver for PCEngines apu2/3/4
 + *
@@ -178,7 +178,9 @@ diff -Naur linux-4.14.101.org/arch/x86/platform/apu/apu2-led.c linux-4.14.101/ar
 +      if (!product || ( strcmp(product, "PC Engines apu2") &&
 +                        strcmp(product, "PC Engines apu3") &&
 +                        strcmp(product, "PC Engines apu4") &&
-+                        strcmp(product, "apu2") ) ) // apu2 on early bios relases
++                        strcmp(product, "apu2") &&
++                        strcmp(product, "apu3") &&
++                        strcmp(product, "apu4") ) )
 +                      goto out;
 +
 +      printk(KERN_INFO "%s: system is recognized as \"%s %s\"\n",
@@ -215,10 +217,10 @@ diff -Naur linux-4.14.101.org/arch/x86/platform/apu/apu2-led.c linux-4.14.101/ar
 +MODULE_AUTHOR("Arne Fitzenreiter");
 +MODULE_DESCRIPTION("PCEngines apu2/3/4 LED driver");
 +MODULE_LICENSE("GPL");
-diff -Naur linux-4.14.101.org/arch/x86/platform/apu/apu-led.c linux-4.14.101/arch/x86/platform/apu/apu-led.c
---- linux-4.14.101.org/arch/x86/platform/apu/apu-led.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-4.14.101/arch/x86/platform/apu/apu-led.c     2019-02-18 22:24:00.686721439 +0100
-@@ -0,0 +1,181 @@
+diff -Naur linux-4.14.102.org/arch/x86/platform/apu/apu-led.c linux-4.14.102/arch/x86/platform/apu/apu-led.c
+--- linux-4.14.102.org/arch/x86/platform/apu/apu-led.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-4.14.102/arch/x86/platform/apu/apu-led.c     2019-02-22 17:57:45.062504777 +0100
+@@ -0,0 +1,183 @@
 +/*
 + * LEDs driver for PCEngines apu
 + *
@@ -363,7 +365,9 @@ diff -Naur linux-4.14.101.org/arch/x86/platform/apu/apu-led.c linux-4.14.101/arc
 +              goto out;
 +
 +      product = dmi_get_system_info(DMI_PRODUCT_NAME);
-+      if (!product || strcmp(product, "APU"))
++      if (!product || ( strcmp(product, "APU") &&
++                        strcmp(product, "apu1") && 
++                        strcmp(product, "PC Engines apu1") ))
 +              goto out;
 +
 +      printk(KERN_INFO "%s: system is recognized as \"%s %s\"\n",
@@ -400,15 +404,15 @@ diff -Naur linux-4.14.101.org/arch/x86/platform/apu/apu-led.c linux-4.14.101/arc
 +MODULE_AUTHOR("Christian Herzog");
 +MODULE_DESCRIPTION("PCEngines apu LED driver");
 +MODULE_LICENSE("GPL");
-diff -Naur linux-4.14.101.org/arch/x86/platform/apu/Makefile linux-4.14.101/arch/x86/platform/apu/Makefile
---- linux-4.14.101.org/arch/x86/platform/apu/Makefile  1970-01-01 01:00:00.000000000 +0100
-+++ linux-4.14.101/arch/x86/platform/apu/Makefile      2019-02-18 22:24:00.686721439 +0100
+diff -Naur linux-4.14.102.org/arch/x86/platform/apu/Makefile linux-4.14.102/arch/x86/platform/apu/Makefile
+--- linux-4.14.102.org/arch/x86/platform/apu/Makefile  1970-01-01 01:00:00.000000000 +0100
++++ linux-4.14.102/arch/x86/platform/apu/Makefile      2019-02-22 17:56:37.185202293 +0100
 @@ -0,0 +1,2 @@
 +obj-$(CONFIG_APULED)          += apu-led.o
 +obj-$(CONFIG_APU2LED)         += apu2-led.o
-diff -Naur linux-4.14.101.org/arch/x86/platform/Makefile linux-4.14.101/arch/x86/platform/Makefile
---- linux-4.14.101.org/arch/x86/platform/Makefile      2019-02-15 09:08:56.000000000 +0100
-+++ linux-4.14.101/arch/x86/platform/Makefile  2019-02-18 22:24:00.686721439 +0100
+diff -Naur linux-4.14.102.org/arch/x86/platform/Makefile linux-4.14.102/arch/x86/platform/Makefile
+--- linux-4.14.102.org/arch/x86/platform/Makefile      2019-02-20 10:20:56.000000000 +0100
++++ linux-4.14.102/arch/x86/platform/Makefile  2019-02-22 17:56:37.185202293 +0100
 @@ -1,5 +1,6 @@
  # SPDX-License-Identifier: GPL-2.0
  # Platform specific code goes here