mirror of
https://github.com/wessel-novacustom/clevo-keyboard.git
synced 2024-11-15 03:34:01 +01:00
clevo_interfaces: Change event handling & use separate wmi module
This commit is contained in:
parent
bbc29f39fc
commit
14c37444e6
|
@ -129,6 +129,8 @@ static int clevo_acpi_add(struct acpi_device *device)
|
||||||
// Add this interface
|
// Add this interface
|
||||||
clevo_keyboard_add_interface(&clevo_acpi_interface);
|
clevo_keyboard_add_interface(&clevo_acpi_interface);
|
||||||
|
|
||||||
|
pr_info("clevo_acpi: interface initialized\n");
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -142,8 +144,11 @@ static int clevo_acpi_remove(struct acpi_device *device)
|
||||||
|
|
||||||
void clevo_acpi_notify(struct acpi_device *device, u32 event)
|
void clevo_acpi_notify(struct acpi_device *device, u32 event)
|
||||||
{
|
{
|
||||||
struct clevo_acpi_driver_data_t *clevo_acpi_driver_data;
|
u32 event_value;
|
||||||
pr_debug("clevo_acpi event: %0#10x\n", event);
|
// struct clevo_acpi_driver_data_t *clevo_acpi_driver_data;
|
||||||
|
|
||||||
|
clevo_acpi_evaluate(device, 0x01, 0, &event_value);
|
||||||
|
pr_debug("clevo_acpi event: %0#6x, clevo event value: %0#6x\n", event, event_value);
|
||||||
|
|
||||||
// clevo_acpi_driver_data = container_of(&device, struct clevo_acpi_driver_data_t, adev);
|
// clevo_acpi_driver_data = container_of(&device, struct clevo_acpi_driver_data_t, adev);
|
||||||
if (!IS_ERR_OR_NULL(clevo_acpi_interface.event_callb)) {
|
if (!IS_ERR_OR_NULL(clevo_acpi_interface.event_callb)) {
|
||||||
|
|
|
@ -595,12 +595,9 @@ static int brightness_validator(const char *value,
|
||||||
|
|
||||||
void clevo_keyboard_event_callb(u32 event)
|
void clevo_keyboard_event_callb(u32 event)
|
||||||
{
|
{
|
||||||
u32 key_event;
|
u32 key_event = event;
|
||||||
|
|
||||||
clevo_evaluate_method(WMI_SUBMETHOD_ID_GET_EVENT, 0, &key_event);
|
// TUXEDO_DEBUG("clevo event: %0#6x\n", event);
|
||||||
// event = received notification value
|
|
||||||
// key_event = returned from clevo get event method
|
|
||||||
TUXEDO_DEBUG("clevo event -> event: %0#6x key_event: %0#6x\n", event, key_event);
|
|
||||||
|
|
||||||
switch (key_event) {
|
switch (key_event) {
|
||||||
case WMI_KEYEVENT_CODE_DECREASE_BACKLIGHT:
|
case WMI_KEYEVENT_CODE_DECREASE_BACKLIGHT:
|
||||||
|
|
|
@ -39,7 +39,6 @@ MODULE_ALIAS("wmi:" UNIWILL_WMI_EVENT_GUID_2);
|
||||||
MODULE_SOFTDEP("pre: tuxedo-cc-wmi");
|
MODULE_SOFTDEP("pre: tuxedo-cc-wmi");
|
||||||
|
|
||||||
static struct tuxedo_keyboard_driver *driver_list[] = {
|
static struct tuxedo_keyboard_driver *driver_list[] = {
|
||||||
&clevo_keyboard_driver,
|
|
||||||
&uniwill_keyboard_driver
|
&uniwill_keyboard_driver
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue