Pin control fixes for the v4.14 series:
- Fix two build problems. - Fix a regression on the Intel Cherryview interrupt path. -----BEGIN PGP SIGNATURE----- iQIcBAABAgAGBQJZ3caJAAoJEEEQszewGV1z7RYP/3yMMiSuy3IX2s6OT2WX+mhu TzOGbMC7No41aIxEqKRXfOVUkYNNwcQ/j0MvACJLDDpZ1p3FmvqQUJ5X3xs1XKOT f3oXKfgED342YZOf1k8MlRULiZFP4kW9cHfZ3J7LPRvmXpwPttnXfL45TKUn2Izr DFcJLpKquVAe46XK4bZCYpazSTMwYe3l0oEiiZjy5CI9odE0w//QTxPs+JX0ORa0 mqNn1beNr6QF0bOa5pm6ZoNVk2yjxuSjdMwih8xAiTdlpkksKvH24Tpn8g8r6D4v 7/6bN1ySS+LGhqNW+5P/f6AT0VLq/o0DVw49HWOFknVdm83Uishw7+FXgJkdx1Cc v5nrnuK8tC+5vpXXCmpiiPhGzPnnlpKHQ+90vm5eH2GPxxXKy6iO5lMCPgsdp2up Df3Yzy34y/gGyLKUDDngpEGsYABySFqqYA4zKG7WWfStRKjfKzv+C4sG2mBXD67R +XYdZ3G7OsSlKmJgg6OXLPK89+e0/tBNVv1atk2piEC30rT4X7cWEp3cmokgQ8Qz JypvvNmuX7b+OUK6K/cs47lrhrlxccL/x5GUbYrJjKpc0r3jY3Tt9qV43IYNLMPI PvDcjBD5WYJ9IWnK4QZ/lMHir5a0FJOAVjJy8rFn1W+rhLpmECm+LtOuxc2ffXBj QkXiqtNk+K8Yhq9zakuj =geFS -----END PGP SIGNATURE----- Merge tag 'pinctrl-v4.14-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control fixes from Linus Walleij: "Two small things and a slightly larger thing in the Intel Cherryview. - Fix two build problems - Fix a regression on the Intel Cherryview interrupt path" * tag 'pinctrl-v4.14-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: pinctrl: cherryview: fix issues caused by dynamic gpio irqs mapping pinctrl/amd: Fix build dependency on pinmux code pinctrl: bcm2835: fix build warning in bcm2835_gpio_irq_handle_bank
This commit is contained in:
Коммит
cc74613b13
|
@ -100,6 +100,7 @@ config PINCTRL_AMD
|
||||||
tristate "AMD GPIO pin control"
|
tristate "AMD GPIO pin control"
|
||||||
depends on GPIOLIB
|
depends on GPIOLIB
|
||||||
select GPIOLIB_IRQCHIP
|
select GPIOLIB_IRQCHIP
|
||||||
|
select PINMUX
|
||||||
select PINCONF
|
select PINCONF
|
||||||
select GENERIC_PINCONF
|
select GENERIC_PINCONF
|
||||||
help
|
help
|
||||||
|
|
|
@ -373,16 +373,12 @@ static void bcm2835_gpio_irq_handle_bank(struct bcm2835_pinctrl *pc,
|
||||||
unsigned long events;
|
unsigned long events;
|
||||||
unsigned offset;
|
unsigned offset;
|
||||||
unsigned gpio;
|
unsigned gpio;
|
||||||
unsigned int type;
|
|
||||||
|
|
||||||
events = bcm2835_gpio_rd(pc, GPEDS0 + bank * 4);
|
events = bcm2835_gpio_rd(pc, GPEDS0 + bank * 4);
|
||||||
events &= mask;
|
events &= mask;
|
||||||
events &= pc->enabled_irq_map[bank];
|
events &= pc->enabled_irq_map[bank];
|
||||||
for_each_set_bit(offset, &events, 32) {
|
for_each_set_bit(offset, &events, 32) {
|
||||||
gpio = (32 * bank) + offset;
|
gpio = (32 * bank) + offset;
|
||||||
/* FIXME: no clue why the code looks up the type here */
|
|
||||||
type = pc->irq_type[gpio];
|
|
||||||
|
|
||||||
generic_handle_irq(irq_linear_revmap(pc->gpio_chip.irqdomain,
|
generic_handle_irq(irq_linear_revmap(pc->gpio_chip.irqdomain,
|
||||||
gpio));
|
gpio));
|
||||||
}
|
}
|
||||||
|
|
|
@ -1577,6 +1577,7 @@ static int chv_gpio_probe(struct chv_pinctrl *pctrl, int irq)
|
||||||
struct gpio_chip *chip = &pctrl->chip;
|
struct gpio_chip *chip = &pctrl->chip;
|
||||||
bool need_valid_mask = !dmi_check_system(chv_no_valid_mask);
|
bool need_valid_mask = !dmi_check_system(chv_no_valid_mask);
|
||||||
int ret, i, offset;
|
int ret, i, offset;
|
||||||
|
int irq_base;
|
||||||
|
|
||||||
*chip = chv_gpio_chip;
|
*chip = chv_gpio_chip;
|
||||||
|
|
||||||
|
@ -1622,7 +1623,18 @@ static int chv_gpio_probe(struct chv_pinctrl *pctrl, int irq)
|
||||||
/* Clear all interrupts */
|
/* Clear all interrupts */
|
||||||
chv_writel(0xffff, pctrl->regs + CHV_INTSTAT);
|
chv_writel(0xffff, pctrl->regs + CHV_INTSTAT);
|
||||||
|
|
||||||
ret = gpiochip_irqchip_add(chip, &chv_gpio_irqchip, 0,
|
if (!need_valid_mask) {
|
||||||
|
irq_base = devm_irq_alloc_descs(pctrl->dev, -1, 0,
|
||||||
|
chip->ngpio, NUMA_NO_NODE);
|
||||||
|
if (irq_base < 0) {
|
||||||
|
dev_err(pctrl->dev, "Failed to allocate IRQ numbers\n");
|
||||||
|
return irq_base;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
irq_base = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
ret = gpiochip_irqchip_add(chip, &chv_gpio_irqchip, irq_base,
|
||||||
handle_bad_irq, IRQ_TYPE_NONE);
|
handle_bad_irq, IRQ_TYPE_NONE);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(pctrl->dev, "failed to add IRQ chip\n");
|
dev_err(pctrl->dev, "failed to add IRQ chip\n");
|
||||||
|
|
Загрузка…
Ссылка в новой задаче