Pin control fixes for v4.14:
- Fix a touchpad pin control issue on the AMD affecting Asus laptops. - Fix an interrupt handling regression on the MCP23s08. -----BEGIN PGP SIGNATURE----- iQIcBAABAgAGBQJZ7fAXAAoJEEEQszewGV1z2vAQAI3jJ6jK5YRzqmrnCSNOFoHa +PH04sEAphGpxWnCcfAd5WXrJw5uT09anvBNQiJyi+4/JzLoA3M++SIEp60Otesm DtsuKIsGJqFv1k5eVLBDQhDQLkB4wkvQksaJMrs9nuL2PliSVol4FwvlvOLr/J5J QDO0G4Sx/pEG/nbRfdr5kxIuS4bdSn5/HAlbuw0x2iiDrcd41VxG1G3fVTXpyw0J KSOWlqcK69JlVYHqUgAQ+p63cEingl2nVLh587zdGdmQSDKIAafPgWuDNrcAR3Aj M4dvCqPbkaDoeSLl22wcgcMgUncOszFKaUn+or7AGGkJtrfMvi8HDPcDZxs/rKdb EoitKrTtecQ6BcX259MJ2q06KkAkm36rpL0VrQQZbzIRydpj+wo/7CD51DWFDSKP 4ETW2PyJS/aT/i/Aa4sVo3eJe7MtnpDq6r6p99caayGs8tWtmIqWh1V54H4glYQb BSo9YZ95Rdp7mV6+T7VtmUZPBArJIvPuHOAmQmUeTVISsb/BmRRf3VKBo7kSuSVR 3D4H6LO4bYMqiyjdvz/OdkQH2kozfZAN3oRUofc2uuU/5W5NBQ91nAdAkeRXRCc7 DRCG7+LLHdw9331AvRCvpbVbWjvmEiTPJ3lBifdjX4Q/8hFhbBVEoNyybktv6SF5 IEy6zxpVFksslrB4XzKA =3FpO -----END PGP SIGNATURE----- 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:
Коммит
2f1b11c575
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче