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

HID: Intel-thc-hid: Intel-quickspi: 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
60c9fca9 dcb2ccb9

+15
+15
drivers/hid/intel-thc-hid/intel-quickspi/pci-quickspi.c
··· 11 11 #include <linux/pci.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 "quickspi-dev.h" 18 21 #include "quickspi-hid.h" ··· 48 45 static guid_t thc_platform_guid = 49 46 GUID_INIT(0x84005682, 0x5b71, 0x41a4, 0x8d, 0x66, 0x81, 0x30, 50 47 0xf7, 0x87, 0xa1, 0x38); 48 + 49 + 50 + /* QuickSPI Wake-on-Touch GPIO resource */ 51 + static const struct acpi_gpio_params wake_gpio = { 0, 0, true }; 52 + 53 + static const struct acpi_gpio_mapping quickspi_gpios[] = { 54 + { "wake-on-touch", &wake_gpio, 1 }, 55 + { } 56 + }; 51 57 52 58 /** 53 59 * thc_acpi_get_property - Query device ACPI parameter ··· 438 426 439 427 thc_interrupt_enable(qsdev->thc_hw, true); 440 428 429 + thc_wot_config(qsdev->thc_hw, &quickspi_gpios[0]); 430 + 441 431 qsdev->state = QUICKSPI_INITIATED; 442 432 443 433 return qsdev; ··· 456 442 { 457 443 thc_interrupt_enable(qsdev->thc_hw, false); 458 444 thc_ltr_unconfig(qsdev->thc_hw); 445 + thc_wot_unconfig(qsdev->thc_hw); 459 446 460 447 qsdev->state = QUICKSPI_DISABLED; 461 448 }