Skip to content
This repository was archived by the owner on Oct 5, 2018. It is now read-only.

Commit 2b464fd

Browse files
author
Bartosz Golaszewski
committed
Merge tag 'intel-gpio-v6.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/andy/linux-gpio-intel into gpio/for-current
intel-gpio fixes for v6.17-rc7 * Fix a regression to make GpioInt() by index work again * Ingnore spurious wakeups from touchpad on GPD G1619-05 * Accept debounce from GpioIo() resources
2 parents f83ec76 + 19c839a commit 2b464fd

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

drivers/gpio/gpiolib-acpi-core.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -942,8 +942,9 @@ struct gpio_desc *acpi_find_gpio(struct fwnode_handle *fwnode,
942942
{
943943
struct acpi_device *adev = to_acpi_device_node(fwnode);
944944
bool can_fallback = acpi_can_fallback_to_crs(adev, con_id);
945-
struct acpi_gpio_info info;
945+
struct acpi_gpio_info info = {};
946946
struct gpio_desc *desc;
947+
int ret;
947948

948949
desc = __acpi_find_gpio(fwnode, con_id, idx, can_fallback, &info);
949950
if (IS_ERR(desc))
@@ -957,6 +958,12 @@ struct gpio_desc *acpi_find_gpio(struct fwnode_handle *fwnode,
957958

958959
acpi_gpio_update_gpiod_flags(dflags, &info);
959960
acpi_gpio_update_gpiod_lookup_flags(lookupflags, &info);
961+
962+
/* ACPI uses hundredths of milliseconds units */
963+
ret = gpio_set_debounce_timeout(desc, info.debounce * 10);
964+
if (ret)
965+
return ERR_PTR(ret);
966+
960967
return desc;
961968
}
962969

@@ -992,7 +999,7 @@ int acpi_dev_gpio_irq_wake_get_by(struct acpi_device *adev, const char *con_id,
992999
int ret;
9931000

9941001
for (i = 0, idx = 0; idx <= index; i++) {
995-
struct acpi_gpio_info info;
1002+
struct acpi_gpio_info info = {};
9961003
struct gpio_desc *desc;
9971004

9981005
/* Ignore -EPROBE_DEFER, it only matters if idx matches */

drivers/gpio/gpiolib-acpi-quirks.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,18 @@ static const struct dmi_system_id gpiolib_acpi_quirks[] __initconst = {
317317
.ignore_wake = "PNP0C50:00@8",
318318
},
319319
},
320+
{
321+
/*
322+
* Same as G1619-04. New model.
323+
*/
324+
.matches = {
325+
DMI_MATCH(DMI_SYS_VENDOR, "GPD"),
326+
DMI_MATCH(DMI_PRODUCT_NAME, "G1619-05"),
327+
},
328+
.driver_data = &(struct acpi_gpiolib_dmi_quirk) {
329+
.ignore_wake = "PNP0C50:00@8",
330+
},
331+
},
320332
{
321333
/*
322334
* Spurious wakeups from GPIO 11

0 commit comments

Comments
 (0)