mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 10:04:04 +02:00
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>
This commit is contained in:
parent
60c9fca90e
commit
3fdfa1e1fa
|
|
@ -11,8 +11,11 @@
|
|||
#include <linux/sizes.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
|
||||
#include <linux/gpio/consumer.h>
|
||||
|
||||
#include "intel-thc-dev.h"
|
||||
#include "intel-thc-hw.h"
|
||||
#include "intel-thc-wot.h"
|
||||
|
||||
#include "quicki2c-dev.h"
|
||||
#include "quicki2c-hid.h"
|
||||
|
|
@ -31,6 +34,14 @@ static guid_t i2c_hid_guid =
|
|||
static guid_t thc_platform_guid =
|
||||
GUID_INIT(0x84005682, 0x5b71, 0x41a4, 0x8d, 0x66, 0x81, 0x30, 0xf7, 0x87, 0xa1, 0x38);
|
||||
|
||||
/* QuickI2C Wake-on-Touch GPIO resource */
|
||||
static const struct acpi_gpio_params wake_gpio = { 0, 0, true };
|
||||
|
||||
static const struct acpi_gpio_mapping quicki2c_gpios[] = {
|
||||
{ "wake-on-touch", &wake_gpio, 1 },
|
||||
{ }
|
||||
};
|
||||
|
||||
/**
|
||||
* quicki2c_acpi_get_dsm_property - Query device ACPI DSM parameter
|
||||
* @adev: Point to ACPI device
|
||||
|
|
@ -393,6 +404,8 @@ static struct quicki2c_device *quicki2c_dev_init(struct pci_dev *pdev, void __io
|
|||
|
||||
thc_interrupt_enable(qcdev->thc_hw, true);
|
||||
|
||||
thc_wot_config(qcdev->thc_hw, &quicki2c_gpios[0]);
|
||||
|
||||
qcdev->state = QUICKI2C_INITED;
|
||||
|
||||
return qcdev;
|
||||
|
|
@ -408,6 +421,7 @@ static void quicki2c_dev_deinit(struct quicki2c_device *qcdev)
|
|||
{
|
||||
thc_interrupt_enable(qcdev->thc_hw, false);
|
||||
thc_ltr_unconfig(qcdev->thc_hw);
|
||||
thc_wot_unconfig(qcdev->thc_hw);
|
||||
|
||||
qcdev->state = QUICKI2C_DISABLED;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user