Merge branch 'upcoming-release' into 'master'

Upcoming release

See merge request tuxedocomputers/development/packages/tuxedo-keyboard!49
This commit is contained in:
Christoffer 2023-04-26 14:01:27 +00:00
commit e2e69ea79d
7 changed files with 144 additions and 6 deletions

View file

@ -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)

View file

@ -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"

View file

@ -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);

View file

@ -22,11 +22,14 @@
#include "clevo_keyboard.h"
#include "uniwill_keyboard.h"
#include <linux/mutex.h>
#include <asm/cpu_device_id.h>
#include <asm/intel-family.h>
#include <linux/mod_devicetable.h>
MODULE_AUTHOR("TUXEDO Computers GmbH <tux@tuxedocomputers.com>");
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);
@ -158,9 +161,140 @@ 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),
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_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 = {
{ }
};
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"),
},
},
{
.matches = {
DMI_MATCH(DMI_CHASSIS_VENDOR, "TUXEDO"),
},
},
{ }
};
static int __init tuxedo_keyboard_init(void)
{
TUXEDO_INFO("module init\n");
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 -ENODEV;
}
return 0;
}

View file

@ -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;
@ -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);

View file

@ -142,6 +142,10 @@ exit 0
%changelog
* Thu Apr 20 2023 C Sandberg <tux@tuxedocomputers.com> 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 <tux@tuxedocomputers.com> 3.2.1-1
- Fix "lost fan control" in some circumstances (on eg. IBPGen7)
* Wed Mar 22 2023 C Sandberg <tux@tuxedocomputers.com> 3.2.0-1