From 254e16714f91a6041f29b36ee547be98572643e5 Mon Sep 17 00:00:00 2001 From: Werner Sembach Date: Fri, 14 Apr 2023 20:19:08 +0200 Subject: [PATCH 01/11] Add check that enforces TUXEDO dmi string on the newest devices --- src/tuxedo_keyboard.c | 109 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 109 insertions(+) diff --git a/src/tuxedo_keyboard.c b/src/tuxedo_keyboard.c index fb1d097..cbb23c3 100644 --- a/src/tuxedo_keyboard.c +++ b/src/tuxedo_keyboard.c @@ -22,6 +22,9 @@ #include "clevo_keyboard.h" #include "uniwill_keyboard.h" #include +#include +#include +#include MODULE_AUTHOR("TUXEDO Computers GmbH "); MODULE_DESCRIPTION("TUXEDO Computers keyboard & keyboard backlight Driver"); @@ -158,9 +161,115 @@ void tuxedo_keyboard_remove_driver(struct tuxedo_keyboard_driver *tk_driver) } EXPORT_SYMBOL(tuxedo_keyboard_remove_driver); +static const struct x86_cpu_id skip_tuxedo_dmi_string_check_match[] __initconst = { + X86_MATCH_INTEL_FAM6_MODEL(CORE_YONAH, NULL), + X86_MATCH_INTEL_FAM6_MODEL(CORE2_MEROM, NULL), + X86_MATCH_INTEL_FAM6_MODEL(CORE2_MEROM_L, NULL), + X86_MATCH_INTEL_FAM6_MODEL(CORE2_PENRYN, NULL), + X86_MATCH_INTEL_FAM6_MODEL(CORE2_DUNNINGTON, NULL), + X86_MATCH_INTEL_FAM6_MODEL(NEHALEM, NULL), + X86_MATCH_INTEL_FAM6_MODEL(NEHALEM_G, NULL), + X86_MATCH_INTEL_FAM6_MODEL(NEHALEM_EP, NULL), + X86_MATCH_INTEL_FAM6_MODEL(NEHALEM_EX, NULL), + X86_MATCH_INTEL_FAM6_MODEL(WESTMERE, NULL), + X86_MATCH_INTEL_FAM6_MODEL(WESTMERE_EP, NULL), + X86_MATCH_INTEL_FAM6_MODEL(WESTMERE_EX, NULL), + X86_MATCH_INTEL_FAM6_MODEL(SANDYBRIDGE, NULL), + X86_MATCH_INTEL_FAM6_MODEL(SANDYBRIDGE_X, NULL), + X86_MATCH_INTEL_FAM6_MODEL(IVYBRIDGE, NULL), + X86_MATCH_INTEL_FAM6_MODEL(IVYBRIDGE_X, NULL), + X86_MATCH_INTEL_FAM6_MODEL(HASWELL, NULL), + X86_MATCH_INTEL_FAM6_MODEL(HASWELL_X, NULL), + X86_MATCH_INTEL_FAM6_MODEL(HASWELL_L, NULL), + X86_MATCH_INTEL_FAM6_MODEL(HASWELL_G, NULL), + X86_MATCH_INTEL_FAM6_MODEL(BROADWELL, NULL), + X86_MATCH_INTEL_FAM6_MODEL(BROADWELL_G, NULL), + X86_MATCH_INTEL_FAM6_MODEL(BROADWELL_X, NULL), + X86_MATCH_INTEL_FAM6_MODEL(BROADWELL_D, NULL), + X86_MATCH_INTEL_FAM6_MODEL(SKYLAKE_L, NULL), + X86_MATCH_INTEL_FAM6_MODEL(SKYLAKE, NULL), + X86_MATCH_INTEL_FAM6_MODEL(SKYLAKE_X, NULL), + X86_MATCH_INTEL_FAM6_MODEL(KABYLAKE_L, NULL), + X86_MATCH_INTEL_FAM6_MODEL(KABYLAKE, NULL), + X86_MATCH_INTEL_FAM6_MODEL(COMETLAKE, NULL), + X86_MATCH_INTEL_FAM6_MODEL(COMETLAKE_L, NULL), + X86_MATCH_INTEL_FAM6_MODEL(CANNONLAKE_L, NULL), + X86_MATCH_INTEL_FAM6_MODEL(ICELAKE_X, NULL), + X86_MATCH_INTEL_FAM6_MODEL(ICELAKE_D, NULL), + X86_MATCH_INTEL_FAM6_MODEL(ICELAKE, NULL), + X86_MATCH_INTEL_FAM6_MODEL(ICELAKE_L, NULL), + X86_MATCH_INTEL_FAM6_MODEL(ICELAKE_NNPI, NULL), + X86_MATCH_INTEL_FAM6_MODEL(LAKEFIELD, NULL), + X86_MATCH_INTEL_FAM6_MODEL(ROCKETLAKE, NULL), + X86_MATCH_INTEL_FAM6_MODEL(TIGERLAKE_L, NULL), + X86_MATCH_INTEL_FAM6_MODEL(TIGERLAKE, NULL), + X86_MATCH_INTEL_FAM6_MODEL(SAPPHIRERAPIDS_X, NULL), // 12th Gen Xeon + //X86_MATCH_INTEL_FAM6_MODEL(EMERALDRAPIDS_X, NULL), // 13th Gen Xeon + X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE, NULL), // 12th Gen + X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE_L, NULL), // 12th Gen + X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE_N, NULL), // 12th Gen Atom + //X86_MATCH_INTEL_FAM6_MODEL(RAPTORLAKE, NULL), // 13th Gen + //X86_MATCH_INTEL_FAM6_MODEL(RAPTORLAKE_P, NULL), // 13th Gen + //X86_MATCH_INTEL_FAM6_MODEL(RAPTORLAKE_S, NULL), // 13th Gen + X86_MATCH_INTEL_FAM6_MODEL(ATOM_BONNELL, NULL), + X86_MATCH_INTEL_FAM6_MODEL(ATOM_BONNELL_MID, NULL), + X86_MATCH_INTEL_FAM6_MODEL(ATOM_SALTWELL, NULL), + X86_MATCH_INTEL_FAM6_MODEL(ATOM_SALTWELL_MID, NULL), + X86_MATCH_INTEL_FAM6_MODEL(ATOM_SALTWELL_TABLET, NULL), + X86_MATCH_INTEL_FAM6_MODEL(ATOM_SILVERMONT, NULL), + X86_MATCH_INTEL_FAM6_MODEL(ATOM_SILVERMONT_D, NULL), + X86_MATCH_INTEL_FAM6_MODEL(ATOM_SILVERMONT_MID, NULL), + X86_MATCH_INTEL_FAM6_MODEL(ATOM_AIRMONT, NULL), + X86_MATCH_INTEL_FAM6_MODEL(ATOM_AIRMONT_MID, NULL), + X86_MATCH_INTEL_FAM6_MODEL(ATOM_AIRMONT_NP, NULL), + X86_MATCH_INTEL_FAM6_MODEL(ATOM_GOLDMONT, NULL), + X86_MATCH_INTEL_FAM6_MODEL(ATOM_GOLDMONT_D, NULL), + X86_MATCH_INTEL_FAM6_MODEL(ATOM_GOLDMONT_PLUS, NULL), + X86_MATCH_INTEL_FAM6_MODEL(ATOM_TREMONT_D, NULL), + X86_MATCH_INTEL_FAM6_MODEL(ATOM_TREMONT, NULL), + X86_MATCH_INTEL_FAM6_MODEL(ATOM_TREMONT_L, NULL), + X86_MATCH_INTEL_FAM6_MODEL(XEON_PHI_KNL, NULL), + X86_MATCH_INTEL_FAM6_MODEL(XEON_PHI_KNM, NULL), + X86_MATCH_VENDOR_FAM_MODEL(INTEL, 5, INTEL_FAM5_QUARK_X1000, NULL), + X86_MATCH_VENDOR_FAM(AMD, 5, NULL), + X86_MATCH_VENDOR_FAM(AMD, 6, NULL), + X86_MATCH_VENDOR_FAM(AMD, 15, NULL), + X86_MATCH_VENDOR_FAM(AMD, 16, NULL), + X86_MATCH_VENDOR_FAM(AMD, 17, NULL), + X86_MATCH_VENDOR_FAM(AMD, 18, NULL), + X86_MATCH_VENDOR_FAM(AMD, 19, NULL), + X86_MATCH_VENDOR_FAM(AMD, 20, NULL), + X86_MATCH_VENDOR_FAM(AMD, 21, NULL), + X86_MATCH_VENDOR_FAM(AMD, 22, NULL), + X86_MATCH_VENDOR_FAM(AMD, 23, NULL), // Zen, Zen+, Zen 2 + X86_MATCH_VENDOR_FAM(AMD, 24, NULL), // Zen + //X86_MATCH_VENDOR_FAM(AMD, 25, NULL), // Zen 3, Zen 4 + { } +}; + +static const struct dmi_system_id tuxedo_dmi_string_match[] __initconst = { + { + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "TUXEDO"), + }, + }, + { + .matches = { + DMI_MATCH(DMI_BOARD_VENDOR, "TUXEDO"), + }, + }, + { } +}; + static int __init tuxedo_keyboard_init(void) { TUXEDO_INFO("module init\n"); + + if (!x86_match_cpu(skip_tuxedo_dmi_string_check_match) + && !dmi_check_system(tuxedo_dmi_string_match)) { + return -EINVAL; + } + return 0; } From d2ed92cb07bf0fbd0fc94076745477c60b0e2cd5 Mon Sep 17 00:00:00 2001 From: Vincent de Phily Date: Sat, 15 Apr 2023 21:13:48 +0100 Subject: [PATCH 02/11] Fix function prototypes Clang is stricter than gcc and refuses to build without this fix. --- src/clevo_leds.h | 2 +- src/uniwill_leds.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/clevo_leds.h b/src/clevo_leds.h index ebd29af..5714756 100644 --- a/src/clevo_leds.h +++ b/src/clevo_leds.h @@ -376,7 +376,7 @@ int clevo_leds_remove(struct platform_device *dev) { } EXPORT_SYMBOL(clevo_leds_remove); -enum clevo_kb_backlight_types clevo_leds_get_backlight_type() { +enum clevo_kb_backlight_types clevo_leds_get_backlight_type(void) { return clevo_kb_backlight_type; } EXPORT_SYMBOL(clevo_leds_get_backlight_type); diff --git a/src/uniwill_leds.h b/src/uniwill_leds.h index 63639fa..2145252 100644 --- a/src/uniwill_leds.h +++ b/src/uniwill_leds.h @@ -275,7 +275,7 @@ int uniwill_leds_remove(struct platform_device *dev) } EXPORT_SYMBOL(uniwill_leds_remove); -enum uniwill_kb_backlight_types uniwill_leds_get_backlight_type() { +enum uniwill_kb_backlight_types uniwill_leds_get_backlight_type(void) { return uniwill_kb_backlight_type; } EXPORT_SYMBOL(uniwill_leds_get_backlight_type); From 619d4e22fde73444d1fd6d186082b334296b72e6 Mon Sep 17 00:00:00 2001 From: Vincent de Phily Date: Sat, 15 Apr 2023 21:14:22 +0100 Subject: [PATCH 03/11] Fix uninitialized var --- src/uniwill_leds.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/uniwill_leds.h b/src/uniwill_leds.h index 2145252..af72863 100644 --- a/src/uniwill_leds.h +++ b/src/uniwill_leds.h @@ -252,7 +252,7 @@ EXPORT_SYMBOL(uniwill_leds_init_late); int uniwill_leds_remove(struct platform_device *dev) { // FIXME Use mutexes - int ret; + int ret = 0; if (uw_leds_initialized) { uw_leds_initialized = false; From 684f00b5526e4e37a535bb92cd1fe46216d92ab3 Mon Sep 17 00:00:00 2001 From: Vincent de Phily Date: Sat, 15 Apr 2023 21:15:58 +0100 Subject: [PATCH 04/11] Document clang as a valid compiler --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6f4beb0..9db36bc 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ Modules included in this package ## Dependencies: - make -- gcc +- gcc or clang - linux-headers - dkms (Only when using this module with DKMS functionality) From ad6f2808f6f760ffdada863b415a89a1346c2ae4 Mon Sep 17 00:00:00 2001 From: Werner Sembach Date: Mon, 17 Apr 2023 15:44:58 +0200 Subject: [PATCH 05/11] Make cutoff between Zen3 and Zen4 --- src/tuxedo_keyboard.c | 44 ++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 41 insertions(+), 3 deletions(-) diff --git a/src/tuxedo_keyboard.c b/src/tuxedo_keyboard.c index cbb23c3..acb14ea 100644 --- a/src/tuxedo_keyboard.c +++ b/src/tuxedo_keyboard.c @@ -243,7 +243,44 @@ static const struct x86_cpu_id skip_tuxedo_dmi_string_check_match[] __initconst X86_MATCH_VENDOR_FAM(AMD, 22, NULL), X86_MATCH_VENDOR_FAM(AMD, 23, NULL), // Zen, Zen+, Zen 2 X86_MATCH_VENDOR_FAM(AMD, 24, NULL), // Zen - //X86_MATCH_VENDOR_FAM(AMD, 25, NULL), // Zen 3, Zen 4 + X86_MATCH_VENDOR_FAM(AMD, 25, NULL), // Zen 3, Zen 4 + { } +}; + +static const struct x86_cpu_id force_tuxedo_dmi_string_check_match[] __initconst = { + // Zen 4 model numbers + X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x60, NULL), + X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x61, NULL), + X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x62, NULL), + X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x63, NULL), + X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x64, NULL), + X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x65, NULL), + X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x66, NULL), + X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x67, NULL), + X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x68, NULL), + X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x69, NULL), + X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x6a, NULL), + X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x6b, NULL), + X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x6c, NULL), + X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x6d, NULL), + X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x6e, NULL), + X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x6f, NULL), + X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x70, NULL), + X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x71, NULL), + X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x72, NULL), + X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x73, NULL), + X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x74, NULL), + X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x75, NULL), + X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x76, NULL), + X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x77, NULL), + X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x78, NULL), + X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x79, NULL), + X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x7a, NULL), + X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x7b, NULL), + X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x7c, NULL), + X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x7d, NULL), + X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x7e, NULL), + X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x7f, NULL), { } }; @@ -265,8 +302,9 @@ static int __init tuxedo_keyboard_init(void) { TUXEDO_INFO("module init\n"); - if (!x86_match_cpu(skip_tuxedo_dmi_string_check_match) - && !dmi_check_system(tuxedo_dmi_string_match)) { + if (!(dmi_check_system(tuxedo_dmi_string_match) + || (x86_match_cpu(skip_tuxedo_dmi_string_check_match) + && !x86_match_cpu(force_tuxedo_dmi_string_check_match)) { return -EINVAL; } From 2a164b65642a5e5e6b16677604a55e55e3aadcf3 Mon Sep 17 00:00:00 2001 From: Werner Sembach Date: Mon, 17 Apr 2023 16:17:15 +0200 Subject: [PATCH 06/11] Better return value --- src/tuxedo_keyboard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tuxedo_keyboard.c b/src/tuxedo_keyboard.c index acb14ea..d87d670 100644 --- a/src/tuxedo_keyboard.c +++ b/src/tuxedo_keyboard.c @@ -305,7 +305,7 @@ static int __init tuxedo_keyboard_init(void) if (!(dmi_check_system(tuxedo_dmi_string_match) || (x86_match_cpu(skip_tuxedo_dmi_string_check_match) && !x86_match_cpu(force_tuxedo_dmi_string_check_match)) { - return -EINVAL; + return -ENODEV; } return 0; From 1f2944ee292a4a0a4957f76faa31b703ec4e08a1 Mon Sep 17 00:00:00 2001 From: Werner Sembach Date: Mon, 17 Apr 2023 16:23:46 +0200 Subject: [PATCH 07/11] Fix missing ')' --- src/tuxedo_keyboard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tuxedo_keyboard.c b/src/tuxedo_keyboard.c index d87d670..7fe0f70 100644 --- a/src/tuxedo_keyboard.c +++ b/src/tuxedo_keyboard.c @@ -304,7 +304,7 @@ static int __init tuxedo_keyboard_init(void) if (!(dmi_check_system(tuxedo_dmi_string_match) || (x86_match_cpu(skip_tuxedo_dmi_string_check_match) - && !x86_match_cpu(force_tuxedo_dmi_string_check_match)) { + && !x86_match_cpu(force_tuxedo_dmi_string_check_match)))) { return -ENODEV; } From 3858c12f91c64239030d21e7c990e5a022d543b1 Mon Sep 17 00:00:00 2001 From: Werner Sembach Date: Mon, 17 Apr 2023 16:35:27 +0200 Subject: [PATCH 08/11] Add chassis vendor to TUXEDO string check --- src/tuxedo_keyboard.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/tuxedo_keyboard.c b/src/tuxedo_keyboard.c index 7fe0f70..d755269 100644 --- a/src/tuxedo_keyboard.c +++ b/src/tuxedo_keyboard.c @@ -295,6 +295,11 @@ static const struct dmi_system_id tuxedo_dmi_string_match[] __initconst = { DMI_MATCH(DMI_BOARD_VENDOR, "TUXEDO"), }, }, + { + .matches = { + DMI_MATCH(DMI_CHASSIS_VENDOR, "TUXEDO"), + }, + }, { } }; From e3f67245327edb9119f6f50dd25e2b09effcc2f4 Mon Sep 17 00:00:00 2001 From: Werner Sembach Date: Tue, 18 Apr 2023 14:52:41 +0200 Subject: [PATCH 09/11] Whitelist AMD Zen 3 instead of blacklisting Zen 4 --- src/tuxedo_keyboard.c | 40 ++++++---------------------------------- 1 file changed, 6 insertions(+), 34 deletions(-) diff --git a/src/tuxedo_keyboard.c b/src/tuxedo_keyboard.c index d755269..55181e0 100644 --- a/src/tuxedo_keyboard.c +++ b/src/tuxedo_keyboard.c @@ -243,44 +243,16 @@ static const struct x86_cpu_id skip_tuxedo_dmi_string_check_match[] __initconst X86_MATCH_VENDOR_FAM(AMD, 22, NULL), X86_MATCH_VENDOR_FAM(AMD, 23, NULL), // Zen, Zen+, Zen 2 X86_MATCH_VENDOR_FAM(AMD, 24, NULL), // Zen - X86_MATCH_VENDOR_FAM(AMD, 25, NULL), // Zen 3, Zen 4 + X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x01, NULL), // Zen 3 Epyc + X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x08, NULL), // Zen 3 Threadripper + X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x21, NULL), // Zen 3 Vermeer + X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x40, NULL), // Zen 3+ Rembrandt + X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x44, NULL), // Zen 3+ Rembrandt + X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x50, NULL), // Zen 3 Cezanne { } }; static const struct x86_cpu_id force_tuxedo_dmi_string_check_match[] __initconst = { - // Zen 4 model numbers - X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x60, NULL), - X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x61, NULL), - X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x62, NULL), - X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x63, NULL), - X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x64, NULL), - X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x65, NULL), - X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x66, NULL), - X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x67, NULL), - X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x68, NULL), - X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x69, NULL), - X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x6a, NULL), - X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x6b, NULL), - X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x6c, NULL), - X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x6d, NULL), - X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x6e, NULL), - X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x6f, NULL), - X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x70, NULL), - X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x71, NULL), - X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x72, NULL), - X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x73, NULL), - X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x74, NULL), - X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x75, NULL), - X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x76, NULL), - X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x77, NULL), - X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x78, NULL), - X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x79, NULL), - X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x7a, NULL), - X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x7b, NULL), - X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x7c, NULL), - X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x7d, NULL), - X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x7e, NULL), - X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x7f, NULL), { } }; From cdd3f5656a6aff8a26e9c196c4ccbbc28151899d Mon Sep 17 00:00:00 2001 From: Werner Sembach Date: Tue, 25 Apr 2023 13:46:23 +0200 Subject: [PATCH 10/11] Add defines that might be missing on older kernel headers --- src/tuxedo_keyboard.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/tuxedo_keyboard.c b/src/tuxedo_keyboard.c index 55181e0..e60a1be 100644 --- a/src/tuxedo_keyboard.c +++ b/src/tuxedo_keyboard.c @@ -161,6 +161,16 @@ void tuxedo_keyboard_remove_driver(struct tuxedo_keyboard_driver *tk_driver) } EXPORT_SYMBOL(tuxedo_keyboard_remove_driver); +// Defines that might be missing in older kernel headers +#define INTEL_FAM6_SAPPHIRERAPIDS_X 0x8F +#define INTEL_FAM6_EMERALDRAPIDS_X 0xCF +#define INTEL_FAM6_ALDERLAKE 0x97 +#define INTEL_FAM6_ALDERLAKE_L 0x9A +#define INTEL_FAM6_ALDERLAKE_N 0xBE +#define INTEL_FAM6_RAPTORLAKE 0xB7 +#define INTEL_FAM6_RAPTORLAKE_P 0xBA +#define INTEL_FAM6_RAPTORLAKE_S 0xBF + static const struct x86_cpu_id skip_tuxedo_dmi_string_check_match[] __initconst = { X86_MATCH_INTEL_FAM6_MODEL(CORE_YONAH, NULL), X86_MATCH_INTEL_FAM6_MODEL(CORE2_MEROM, NULL), From c202a4d671d9fe920a023d280a66a9f116e14759 Mon Sep 17 00:00:00 2001 From: Christoffer Sandberg Date: Thu, 20 Apr 2023 14:59:24 +0000 Subject: [PATCH 11/11] Update version to 3.2.3 + changelog --- .../usr/share/doc/module-name/changelog.gz | Bin 2041 -> 2124 bytes dkms.conf | 2 +- src/tuxedo_keyboard.c | 2 +- src_pkg/rpm_pkg.spec | 4 ++++ 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/deb/module-name/usr/share/doc/module-name/changelog.gz b/deb/module-name/usr/share/doc/module-name/changelog.gz index 087542fdbf64f076873bb87d13bfc5104487ad7d..d7f4ab5e92be300fa776508cc5796268125ad2e3 100644 GIT binary patch literal 2124 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 diff --git a/dkms.conf b/dkms.conf index 5280604..c5afaa2 100644 --- a/dkms.conf +++ b/dkms.conf @@ -1,5 +1,5 @@ PACKAGE_NAME=tuxedo-keyboard -PACKAGE_VERSION=3.2.1 +PACKAGE_VERSION=3.2.3 DEST_MODULE_LOCATION[0]="/kernel/lib/" BUILT_MODULE_NAME[0]="tuxedo_keyboard" diff --git a/src/tuxedo_keyboard.c b/src/tuxedo_keyboard.c index e60a1be..c2d88c4 100644 --- a/src/tuxedo_keyboard.c +++ b/src/tuxedo_keyboard.c @@ -29,7 +29,7 @@ MODULE_AUTHOR("TUXEDO Computers GmbH "); MODULE_DESCRIPTION("TUXEDO Computers keyboard & keyboard backlight Driver"); MODULE_LICENSE("GPL"); -MODULE_VERSION("3.2.1"); +MODULE_VERSION("3.2.3"); static DEFINE_MUTEX(tuxedo_keyboard_init_driver_lock); diff --git a/src_pkg/rpm_pkg.spec b/src_pkg/rpm_pkg.spec index 7dd98d5..bda80ad 100644 --- a/src_pkg/rpm_pkg.spec +++ b/src_pkg/rpm_pkg.spec @@ -142,6 +142,10 @@ exit 0 %changelog +* Thu Apr 20 2023 C Sandberg 3.2.3-1 +- Fix missing state write on resume for some devices which woke up with "default blue" keyboard backlight +- Add TDP device definitions for Stellaris Intel Gen5 +- Add device check on newer cpu gens * Mon Mar 27 2023 C Sandberg 3.2.1-1 - Fix "lost fan control" in some circumstances (on eg. IBPGen7) * Wed Mar 22 2023 C Sandberg 3.2.0-1