Skip to content

Commit d537ae4

Browse files
committed
Merge tag 'gpio-fixes-for-v6.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux
Pull gpio fixes from Bartosz Golaszewski: - fix interrupt handling in suspend and wakeup in gpio-vf610 - fix a bug on setting direction to output in gpio-vf610 - add a missing memset() in gpio ACPI code * tag 'gpio-fixes-for-v6.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: gpiolib: acpi: Add missing memset(0) to acpi_get_gpiod_from_data() gpio: vf610: set value before the direction to avoid a glitch gpio: vf610: mask the gpio irq in system suspend and support wakeup
2 parents 03027aa + 479ac41 commit d537ae4

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

drivers/gpio/gpio-vf610.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,14 +126,14 @@ static int vf610_gpio_direction_output(struct gpio_chip *chip, unsigned gpio,
126126
unsigned long mask = BIT(gpio);
127127
u32 val;
128128

129+
vf610_gpio_set(chip, gpio, value);
130+
129131
if (port->sdata && port->sdata->have_paddr) {
130132
val = vf610_gpio_readl(port->gpio_base + GPIO_PDDR);
131133
val |= mask;
132134
vf610_gpio_writel(val, port->gpio_base + GPIO_PDDR);
133135
}
134136

135-
vf610_gpio_set(chip, gpio, value);
136-
137137
return pinctrl_gpio_direction_output(chip->base + gpio);
138138
}
139139

@@ -246,7 +246,8 @@ static const struct irq_chip vf610_irqchip = {
246246
.irq_unmask = vf610_gpio_irq_unmask,
247247
.irq_set_type = vf610_gpio_irq_set_type,
248248
.irq_set_wake = vf610_gpio_irq_set_wake,
249-
.flags = IRQCHIP_IMMUTABLE,
249+
.flags = IRQCHIP_IMMUTABLE | IRQCHIP_MASK_ON_SUSPEND
250+
| IRQCHIP_ENABLE_WAKEUP_ON_SUSPEND,
250251
GPIOCHIP_IRQ_RESOURCE_HELPERS,
251252
};
252253

drivers/gpio/gpiolib-acpi.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -951,6 +951,7 @@ static struct gpio_desc *acpi_get_gpiod_from_data(struct fwnode_handle *fwnode,
951951
if (!propname)
952952
return ERR_PTR(-EINVAL);
953953

954+
memset(&lookup, 0, sizeof(lookup));
954955
lookup.index = index;
955956

956957
ret = acpi_gpio_property_lookup(fwnode, propname, index, &lookup);

0 commit comments

Comments
 (0)