diff --git a/module/clevo-xsm-wmi.c b/module/clevo-xsm-wmi.c index dfe91a8..6feeeee 100644 --- a/module/clevo-xsm-wmi.c +++ b/module/clevo-xsm-wmi.c @@ -43,6 +43,7 @@ #include #include + #define __CLEVO_XSM_PR(lvl, fmt, ...) do { pr_##lvl(fmt, ##__VA_ARGS__); } \ while (0) #define CLEVO_XSM_INFO(fmt, ...) __CLEVO_XSM_PR(info, fmt, ##__VA_ARGS__) @@ -433,7 +434,7 @@ static int clevo_xsm_wmi_evaluate_wmbb_method(u32 method_id, u32 arg, CLEVO_XSM_DEBUG("%0#4x IN : %0#6x\n", method_id, arg); - status = wmi_evaluate_method(CLEVO_GET_GUID, 0x01, + status = wmi_evaluate_method(CLEVO_GET_GUID, 0x00, method_id, &in, &out); if (unlikely(ACPI_FAILURE(status))) @@ -1249,7 +1250,7 @@ clevo_hwmon_show_fan_label(struct device *dev, struct device_attribute *attr, { switch (to_sensor_dev_attr(attr)->index) { case 0: - return sprintf(buf, "CPU fan\n"); + return sprintf(buf, "GPU fan\n"); case 1: return sprintf(buf, "GPU fan\n"); } @@ -1335,7 +1336,7 @@ static ssize_t clevo_hwmon_show_temp1_label(struct device *dev, struct device_attribute *attr, char *buf) { - return sprintf(buf, "CPU temperature\n"); + return sprintf(buf, "GPU temperature\n"); } #ifdef EXPERIMENTAL @@ -1467,6 +1468,22 @@ static int __init clevo_xsm_dmi_matched(const struct dmi_system_id *id) } static struct dmi_system_id clevo_xsm_dmi_table[] __initdata = { + { + .ident = "Velocity PC5x_7xHP_HR_HS", + .matches = { + DMI_MATCH(DMI_PRODUCT_NAME, "PC5x_7xHP_HR_HS"), + }, + .callback = clevo_xsm_dmi_matched, + .driver_data = &kb_full_color_with_extra_ops, + }, + { + .ident = "Velocity P870TM", + .matches = { + DMI_MATCH(DMI_PRODUCT_NAME, "P870TM_TM1"), + }, + .callback = clevo_xsm_dmi_matched, + .driver_data = &kb_full_color_with_extra_ops, + }, { .ident = "Clevo P870DM", .matches = { @@ -1475,6 +1492,14 @@ static struct dmi_system_id clevo_xsm_dmi_table[] __initdata = { .callback = clevo_xsm_dmi_matched, .driver_data = &kb_full_color_with_extra_ops, }, + { + .ident = "Velocity P7xxTM", + .matches = { + DMI_MATCH(DMI_PRODUCT_NAME, "P7xxTM1"), + }, + .callback = clevo_xsm_dmi_matched, + .driver_data = &kb_full_color_with_extra_ops, + }, { .ident = "Clevo P7xxDM(-G)", .matches = { @@ -1597,6 +1622,14 @@ static struct dmi_system_id clevo_xsm_dmi_table[] __initdata = { .callback = clevo_xsm_dmi_matched, .driver_data = &kb_8_color_ops, }, + { + .ident = "Clevo P950HP6", + .matches = { + DMI_MATCH(DMI_PRODUCT_NAME, "P95_HP,HR,HQ"), + }, + .callback = clevo_xsm_dmi_matched, + .driver_data = &kb_full_color_ops, + }, { /* terminating NULL entry */ }, diff --git a/module/clevo-xsm-wmi.ko b/module/clevo-xsm-wmi.ko new file mode 100644 index 0000000..1950116 Binary files /dev/null and b/module/clevo-xsm-wmi.ko differ diff --git a/module/clevo-xsm-wmi.mod b/module/clevo-xsm-wmi.mod new file mode 100644 index 0000000..27c1e6b --- /dev/null +++ b/module/clevo-xsm-wmi.mod @@ -0,0 +1,2 @@ +/root/Downloads/clevo-xsm-wmi/module/clevo-xsm-wmi.o + diff --git a/module/clevo-xsm-wmi.mod.c b/module/clevo-xsm-wmi.mod.c new file mode 100644 index 0000000..745f6b1 --- /dev/null +++ b/module/clevo-xsm-wmi.mod.c @@ -0,0 +1,115 @@ +#include +#include +#include +#include + +BUILD_SALT; + +MODULE_INFO(vermagic, VERMAGIC_STRING); +MODULE_INFO(name, KBUILD_MODNAME); + +__visible struct module __this_module +__attribute__((section(".gnu.linkonce.this_module"))) = { + .name = KBUILD_MODNAME, + .init = init_module, +#ifdef CONFIG_MODULE_UNLOAD + .exit = cleanup_module, +#endif + .arch = MODULE_ARCH_INIT, +}; + +#ifdef CONFIG_RETPOLINE +MODULE_INFO(retpoline, "Y"); +#endif + +static const struct modversion_info ____versions[] +__used +__attribute__((section("__versions"))) = { + { 0x25a444ff, "module_layout" }, + { 0x3bb8f120, "param_array_ops" }, + { 0x2c88ae6b, "param_get_byte" }, + { 0x38552a81, "param_ops_bool" }, + { 0x8f98374f, "platform_driver_unregister" }, + { 0x129bca13, "platform_device_unregister" }, + { 0x758659ed, "device_remove_file" }, + { 0xc3f4aedc, "hwmon_device_unregister" }, + { 0x4ecc2f74, "sysfs_remove_group" }, + { 0xac1a55be, "unregister_reboot_notifier" }, + { 0x83eb21c, "rfkill_unregister" }, + { 0x4c9a52ca, "input_unregister_device" }, + { 0xb9830b3b, "led_classdev_unregister" }, + { 0x3517383e, "register_reboot_notifier" }, + { 0xc017a45e, "sysfs_create_group" }, + { 0xb7a1adaa, "hwmon_device_register" }, + { 0xf02216ad, "kmem_cache_alloc_trace" }, + { 0x1148c8a, "kmalloc_caches" }, + { 0xc29f047c, "device_create_file" }, + { 0x8c03d20c, "destroy_workqueue" }, + { 0x6c9ae98c, "of_led_classdev_register" }, + { 0xdf9208c0, "alloc_workqueue" }, + { 0xcbeaf22a, "input_free_device" }, + { 0x38648ece, "input_register_device" }, + { 0x75f19332, "input_allocate_device" }, + { 0x8a490c90, "rfkill_set_sw_state" }, + { 0xdb68bbad, "rfkill_destroy" }, + { 0xff282521, "rfkill_register" }, + { 0xe5e1bd7, "rfkill_alloc" }, + { 0x984b6d00, "__platform_create_bundle" }, + { 0xc9d4d6d1, "wmi_has_guid" }, + { 0xd4835ef8, "dmi_check_system" }, + { 0xcc5005fe, "msleep_interruptible" }, + { 0x409bcb62, "mutex_unlock" }, + { 0x2ab7989d, "mutex_lock" }, + { 0xb3f7646e, "kthread_should_stop" }, + { 0x55129c3, "current_task" }, + { 0xfbef41e3, "input_event" }, + { 0xf1569fd9, "wake_up_process" }, + { 0xc0181fe2, "kthread_create_on_node" }, + { 0x19494c64, "param_set_byte" }, + { 0xaa00fdc0, "ec_transaction" }, + { 0xc5b6f236, "queue_work_on" }, + { 0xc708f1fe, "ec_write" }, + { 0xfc4152fc, "ec_read" }, + { 0x76ae31fd, "wmi_remove_notify_handler" }, + { 0xbca37f48, "kthread_stop" }, + { 0xf18bdd75, "wmi_install_notify_handler" }, + { 0x3b6c41ea, "kstrtouint" }, + { 0xe2d5255a, "strcmp" }, + { 0xbcab6ee6, "sscanf" }, + { 0xc5850110, "printk" }, + { 0x2ea2c95c, "__x86_indirect_thunk_rax" }, + { 0xdecd0b29, "__stack_chk_fail" }, + { 0x837b7b09, "__dynamic_pr_debug" }, + { 0x37a0cba, "kfree" }, + { 0x6068bedf, "wmi_evaluate_method" }, + { 0x3c3ff9fd, "sprintf" }, + { 0xbdfb6dbb, "__fentry__" }, +}; + +static const char __module_depends[] +__used +__attribute__((section(".modinfo"))) = +"depends=rfkill,wmi"; + +MODULE_ALIAS("dmi*:pn*PC5x_7xHP_HR_HS*:"); +MODULE_ALIAS("dmi*:pn*P870TM_TM1*:"); +MODULE_ALIAS("dmi*:pn*P870DM*:"); +MODULE_ALIAS("dmi*:pn*P7xxTM1*:"); +MODULE_ALIAS("dmi*:pn*P7xxDM(-G)*:"); +MODULE_ALIAS("dmi*:pn*P750ZM*:"); +MODULE_ALIAS("dmi*:pn*P370SM-A*:"); +MODULE_ALIAS("dmi*:pn*P17SM-A*:"); +MODULE_ALIAS("dmi*:pn*P15SM1-A*:"); +MODULE_ALIAS("dmi*:pn*P15SM-A*:"); +MODULE_ALIAS("dmi*:pn*P17SM*:"); +MODULE_ALIAS("dmi*:pn*P15SM*:"); +MODULE_ALIAS("dmi*:pn*P150EM*:"); +MODULE_ALIAS("dmi*:pn*Deimos/Phobos1x15S*:"); +MODULE_ALIAS("dmi*:pn*P5ProSE*:"); +MODULE_ALIAS("dmi*:svn*ECT*:rn*P750ZM*:"); +MODULE_ALIAS("dmi*:pn*P65_67RSRP*:"); +MODULE_ALIAS("dmi*:pn*P65xRP*:"); +MODULE_ALIAS("dmi*:pn*P15xEMx*:"); +MODULE_ALIAS("dmi*:pn*P95_HP,HR,HQ*:"); + +MODULE_INFO(srcversion, "72104BA1F30861E6A400F5B"); diff --git a/module/clevo-xsm-wmi.mod.o b/module/clevo-xsm-wmi.mod.o new file mode 100644 index 0000000..78822fc Binary files /dev/null and b/module/clevo-xsm-wmi.mod.o differ diff --git a/module/clevo-xsm-wmi.o b/module/clevo-xsm-wmi.o new file mode 100644 index 0000000..8f2d838 Binary files /dev/null and b/module/clevo-xsm-wmi.o differ diff --git a/module/modules.order b/module/modules.order new file mode 100644 index 0000000..6140726 --- /dev/null +++ b/module/modules.order @@ -0,0 +1 @@ +/root/Downloads/clevo-xsm-wmi/module/clevo-xsm-wmi.ko