Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

HID: Intel-thc-hid: Intel-quicki2c: Enable Wake-on-Touch feature

This patch call THC helper functions to enable Wake-on-Touch (WoT)
during driver initialization and disable it when driver is removed.

Signed-off-by: Even Xu <even.xu@intel.com>
Tested-by: Chong Han <chong.han@intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>

authored by

Even Xu and committed by
Jiri Kosina
3fdfa1e1 60c9fca9

+14
+14
drivers/hid/intel-thc-hid/intel-quicki2c/pci-quicki2c.c
··· 11 11 #include <linux/sizes.h> 12 12 #include <linux/pm_runtime.h> 13 13 14 + #include <linux/gpio/consumer.h> 15 + 14 16 #include "intel-thc-dev.h" 15 17 #include "intel-thc-hw.h" 18 + #include "intel-thc-wot.h" 16 19 17 20 #include "quicki2c-dev.h" 18 21 #include "quicki2c-hid.h" ··· 33 30 /* platform method */ 34 31 static guid_t thc_platform_guid = 35 32 GUID_INIT(0x84005682, 0x5b71, 0x41a4, 0x8d, 0x66, 0x81, 0x30, 0xf7, 0x87, 0xa1, 0x38); 33 + 34 + /* QuickI2C Wake-on-Touch GPIO resource */ 35 + static const struct acpi_gpio_params wake_gpio = { 0, 0, true }; 36 + 37 + static const struct acpi_gpio_mapping quicki2c_gpios[] = { 38 + { "wake-on-touch", &wake_gpio, 1 }, 39 + { } 40 + }; 36 41 37 42 /** 38 43 * quicki2c_acpi_get_dsm_property - Query device ACPI DSM parameter ··· 404 393 405 394 thc_interrupt_enable(qcdev->thc_hw, true); 406 395 396 + thc_wot_config(qcdev->thc_hw, &quicki2c_gpios[0]); 397 + 407 398 qcdev->state = QUICKI2C_INITED; 408 399 409 400 return qcdev; ··· 421 408 { 422 409 thc_interrupt_enable(qcdev->thc_hw, false); 423 410 thc_ltr_unconfig(qcdev->thc_hw); 411 + thc_wot_unconfig(qcdev->thc_hw); 424 412 425 413 qcdev->state = QUICKI2C_DISABLED; 426 414 }