Merge pull request #4 from olwilliams/kernel-6.12

Updates for the 6.12 kernel
This commit is contained in:
Wessel klein Snakenborg 2024-12-10 10:55:22 +01:00 committed by GitHub
commit 9e32df5052
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 107 additions and 7 deletions

View file

@ -79,7 +79,7 @@ static int clevo_acpi_evaluate(struct acpi_device *device, u8 cmd, u32 arg, unio
return status; return status;
} }
int clevo_acpi_interface_method_call(u8 cmd, u32 arg, union acpi_object **result_value) static int clevo_acpi_interface_method_call(u8 cmd, u32 arg, union acpi_object **result_value)
{ {
int status = 0; int status = 0;
@ -137,7 +137,7 @@ static void clevo_acpi_remove(struct acpi_device *device)
#endif #endif
} }
void clevo_acpi_notify(struct acpi_device *device, u32 event) static void clevo_acpi_notify(struct acpi_device *device, u32 event)
{ {
u32 event_value; u32 event_value;
union acpi_object *out_obj; union acpi_object *out_obj;

View file

@ -55,7 +55,7 @@ static int clevo_wmi_evaluate(u32 wmi_method_id, u32 wmi_arg, union acpi_object
return return_status; return return_status;
} }
int clevo_wmi_interface_method_call(u8 cmd, u32 arg, union acpi_object **result_value) static int clevo_wmi_interface_method_call(u8 cmd, u32 arg, union acpi_object **result_value)
{ {
return clevo_wmi_evaluate(cmd, arg, result_value); return clevo_wmi_evaluate(cmd, arg, result_value);
} }

View file

@ -112,7 +112,7 @@ static int tdp_max_gmxpxxx[] = { 0x82, 0x82, 0xc8 };
static int *tdp_min_defs = NULL; static int *tdp_min_defs = NULL;
static int *tdp_max_defs = NULL; static int *tdp_max_defs = NULL;
void uw_id_tdp(void) static void uw_id_tdp(void)
{ {
if (uw_feats->model == UW_MODEL_PH4TUX) { if (uw_feats->model == UW_MODEL_PH4TUX) {
tdp_min_defs = tdp_min_ph4tux; tdp_min_defs = tdp_min_ph4tux;

View file

@ -25,6 +25,7 @@
#include <asm/cpu_device_id.h> #include <asm/cpu_device_id.h>
#include <asm/intel-family.h> #include <asm/intel-family.h>
#include <linux/mod_devicetable.h> #include <linux/mod_devicetable.h>
#include <linux/version.h>
MODULE_AUTHOR("TUXEDO Computers GmbH <tux@tuxedocomputers.com>"); MODULE_AUTHOR("TUXEDO Computers GmbH <tux@tuxedocomputers.com>");
MODULE_DESCRIPTION("TUXEDO Computers keyboard & keyboard backlight Driver"); MODULE_DESCRIPTION("TUXEDO Computers keyboard & keyboard backlight Driver");
@ -171,6 +172,13 @@ EXPORT_SYMBOL(tuxedo_keyboard_remove_driver);
#define INTEL_FAM6_RAPTORLAKE_P 0xBA #define INTEL_FAM6_RAPTORLAKE_P 0xBA
#define INTEL_FAM6_RAPTORLAKE_S 0xBF #define INTEL_FAM6_RAPTORLAKE_S 0xBF
// ALDERLAKE_N doesn't seem to be present in the current kernel header at all
#define INTEL_ALDERLAKE_N INTEL_FAM6_ALDERLAKE_N
// Compatibility defines: kernel 6.12 renamed the Intel CPU model defines, see e.g.
// https://github.com/torvalds/linux/commit/6568fc18c2f62 and
// https://github.com/torvalds/linux/commit/13ad4848dde0f83a27d433f7e11722924de1d506
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 12, 0)
static const struct x86_cpu_id skip_tuxedo_dmi_string_check_match[] __initconst = { 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(CORE_YONAH, NULL),
X86_MATCH_INTEL_FAM6_MODEL(CORE2_MEROM, NULL), X86_MATCH_INTEL_FAM6_MODEL(CORE2_MEROM, NULL),
@ -261,6 +269,98 @@ static const struct x86_cpu_id skip_tuxedo_dmi_string_check_match[] __initconst
X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x50, NULL), // Zen 3 Cezanne X86_MATCH_VENDOR_FAM_MODEL(AMD, 25, 0x50, NULL), // Zen 3 Cezanne
{ } { }
}; };
#else
static const struct x86_cpu_id skip_tuxedo_dmi_string_check_match[] __initconst = {
X86_MATCH_VFM(INTEL_CORE_YONAH, NULL),
X86_MATCH_VFM(INTEL_CORE2_MEROM, NULL),
X86_MATCH_VFM(INTEL_CORE2_MEROM_L, NULL),
X86_MATCH_VFM(INTEL_CORE2_PENRYN, NULL),
X86_MATCH_VFM(INTEL_CORE2_DUNNINGTON, NULL),
X86_MATCH_VFM(INTEL_NEHALEM, NULL),
X86_MATCH_VFM(INTEL_NEHALEM_G, NULL),
X86_MATCH_VFM(INTEL_NEHALEM_EP, NULL),
X86_MATCH_VFM(INTEL_NEHALEM_EX, NULL),
X86_MATCH_VFM(INTEL_WESTMERE, NULL),
X86_MATCH_VFM(INTEL_WESTMERE_EP, NULL),
X86_MATCH_VFM(INTEL_WESTMERE_EX, NULL),
X86_MATCH_VFM(INTEL_SANDYBRIDGE, NULL),
X86_MATCH_VFM(INTEL_SANDYBRIDGE_X, NULL),
X86_MATCH_VFM(INTEL_IVYBRIDGE, NULL),
X86_MATCH_VFM(INTEL_IVYBRIDGE_X, NULL),
X86_MATCH_VFM(INTEL_HASWELL, NULL),
X86_MATCH_VFM(INTEL_HASWELL_X, NULL),
X86_MATCH_VFM(INTEL_HASWELL_L, NULL),
X86_MATCH_VFM(INTEL_HASWELL_G, NULL),
X86_MATCH_VFM(INTEL_BROADWELL, NULL),
X86_MATCH_VFM(INTEL_BROADWELL_G, NULL),
X86_MATCH_VFM(INTEL_BROADWELL_X, NULL),
X86_MATCH_VFM(INTEL_BROADWELL_D, NULL),
X86_MATCH_VFM(INTEL_SKYLAKE_L, NULL),
X86_MATCH_VFM(INTEL_SKYLAKE, NULL),
X86_MATCH_VFM(INTEL_SKYLAKE_X, NULL),
X86_MATCH_VFM(INTEL_KABYLAKE_L, NULL),
X86_MATCH_VFM(INTEL_KABYLAKE, NULL),
X86_MATCH_VFM(INTEL_COMETLAKE, NULL),
X86_MATCH_VFM(INTEL_COMETLAKE_L, NULL),
X86_MATCH_VFM(INTEL_CANNONLAKE_L, NULL),
X86_MATCH_VFM(INTEL_ICELAKE_X, NULL),
X86_MATCH_VFM(INTEL_ICELAKE_D, NULL),
X86_MATCH_VFM(INTEL_ICELAKE, NULL),
X86_MATCH_VFM(INTEL_ICELAKE_L, NULL),
X86_MATCH_VFM(INTEL_ICELAKE_NNPI, NULL),
X86_MATCH_VFM(INTEL_LAKEFIELD, NULL),
X86_MATCH_VFM(INTEL_ROCKETLAKE, NULL),
X86_MATCH_VFM(INTEL_TIGERLAKE_L, NULL),
X86_MATCH_VFM(INTEL_TIGERLAKE, NULL),
X86_MATCH_VFM(INTEL_SAPPHIRERAPIDS_X, NULL), // 12th Gen Xeon
//X86_MATCH_VFM(INTEL_EMERALDRAPIDS_X, NULL), // 13th Gen Xeon
X86_MATCH_VFM(INTEL_ALDERLAKE, NULL), // 12th Gen
X86_MATCH_VFM(INTEL_ALDERLAKE_L, NULL), // 12th Gen
X86_MATCH_VFM(INTEL_ALDERLAKE_N, NULL), // 12th Gen Atom
X86_MATCH_VFM(INTEL_RAPTORLAKE, NULL), // 13th Gen
X86_MATCH_VFM(INTEL_RAPTORLAKE_P, NULL), // 13th Gen
X86_MATCH_VFM(INTEL_RAPTORLAKE_S, NULL), // 13th Gen
X86_MATCH_VFM(INTEL_ATOM_BONNELL, NULL),
X86_MATCH_VFM(INTEL_ATOM_BONNELL_MID, NULL),
X86_MATCH_VFM(INTEL_ATOM_SALTWELL, NULL),
X86_MATCH_VFM(INTEL_ATOM_SALTWELL_MID, NULL),
X86_MATCH_VFM(INTEL_ATOM_SALTWELL_TABLET, NULL),
X86_MATCH_VFM(INTEL_ATOM_SILVERMONT, NULL),
X86_MATCH_VFM(INTEL_ATOM_SILVERMONT_D, NULL),
X86_MATCH_VFM(INTEL_ATOM_SILVERMONT_MID, NULL),
X86_MATCH_VFM(INTEL_ATOM_AIRMONT, NULL),
X86_MATCH_VFM(INTEL_ATOM_AIRMONT_MID, NULL),
X86_MATCH_VFM(INTEL_ATOM_AIRMONT_NP, NULL),
X86_MATCH_VFM(INTEL_ATOM_GOLDMONT, NULL),
X86_MATCH_VFM(INTEL_ATOM_GOLDMONT_D, NULL),
X86_MATCH_VFM(INTEL_ATOM_GOLDMONT_PLUS, NULL),
X86_MATCH_VFM(INTEL_ATOM_TREMONT_D, NULL),
X86_MATCH_VFM(INTEL_ATOM_TREMONT, NULL),
X86_MATCH_VFM(INTEL_ATOM_TREMONT_L, NULL),
X86_MATCH_VFM(INTEL_XEON_PHI_KNL, NULL),
X86_MATCH_VFM(INTEL_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
{ }
};
#endif
static const struct x86_cpu_id force_tuxedo_dmi_string_check_match[] __initconst = { static const struct x86_cpu_id force_tuxedo_dmi_string_check_match[] __initconst = {
{ } { }

View file

@ -61,7 +61,7 @@ void tuxedo_keyboard_remove_driver(struct tuxedo_keyboard_driver *tk_driver);
/** /**
* Basically a copy of the existing report event but doesn't report unknown events * Basically a copy of the existing report event but doesn't report unknown events
*/ */
bool sparse_keymap_report_known_event(struct input_dev *dev, unsigned int code, inline bool sparse_keymap_report_known_event(struct input_dev *dev, unsigned int code,
unsigned int value, bool autorelease) unsigned int value, bool autorelease)
{ {
const struct key_entry *ke = const struct key_entry *ke =

View file

@ -249,7 +249,7 @@ static int uw_ec_write_addr_direct(u8 addr_low, u8 addr_high, u8 data_low, u8 da
return result; return result;
} }
int uw_wmi_read_ec_ram(u16 addr, u8 *data) static int uw_wmi_read_ec_ram(u16 addr, u8 *data)
{ {
int result; int result;
u8 addr_low, addr_high; u8 addr_low, addr_high;
@ -271,7 +271,7 @@ int uw_wmi_read_ec_ram(u16 addr, u8 *data)
return result; return result;
} }
int uw_wmi_write_ec_ram(u16 addr, u8 data) static int uw_wmi_write_ec_ram(u16 addr, u8 data)
{ {
int result; int result;
u8 addr_low, addr_high, data_low, data_high; u8 addr_low, addr_high, data_low, data_high;