Merge tag 'pinctrl-v4.14-4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl
Pull pin control fixes from Linus Walleij: "Two last minute fixes for pin controllers, both regressions in specific drivers: - Fix a touchpad pin control issue on the AMD affecting Asus laptops - Fix an interrupt handling regression on the MCP23s08" * tag 'pinctrl-v4.14-4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: pinctrl: mcp23s08: fix interrupt handling regression pinctrl/amd: fix masking of GPIO interrupts
This commit is contained in:
@ -534,8 +534,16 @@ static irqreturn_t amd_gpio_irq_handler(int irq, void *dev_id)
|
||||
continue;
|
||||
irq = irq_find_mapping(gc->irqdomain, irqnr + i);
|
||||
generic_handle_irq(irq);
|
||||
/* Clear interrupt */
|
||||
|
||||
/* Clear interrupt.
|
||||
* We must read the pin register again, in case the
|
||||
* value was changed while executing
|
||||
* generic_handle_irq() above.
|
||||
*/
|
||||
raw_spin_lock_irqsave(&gpio_dev->lock, flags);
|
||||
regval = readl(regs + i);
|
||||
writel(regval, regs + i);
|
||||
raw_spin_unlock_irqrestore(&gpio_dev->lock, flags);
|
||||
ret = IRQ_HANDLED;
|
||||
}
|
||||
}
|
||||
|
@ -407,10 +407,10 @@ static int mcp23s08_get(struct gpio_chip *chip, unsigned offset)
|
||||
ret = mcp_read(mcp, MCP_GPIO, &status);
|
||||
if (ret < 0)
|
||||
status = 0;
|
||||
else
|
||||
else {
|
||||
mcp->cached_gpio = status;
|
||||
status = !!(status & (1 << offset));
|
||||
|
||||
mcp->cached_gpio = status;
|
||||
}
|
||||
|
||||
mutex_unlock(&mcp->lock);
|
||||
return status;
|
||||
|
Reference in New Issue
Block a user