diff options
-rw-r--r-- | drivers/pinctrl/samsung/pinctrl-exynos.c | 32 |
1 files changed, 6 insertions, 26 deletions
diff --git a/drivers/pinctrl/samsung/pinctrl-exynos.c b/drivers/pinctrl/samsung/pinctrl-exynos.c index 954e555766df..7a7eb6a271eb 100644 --- a/drivers/pinctrl/samsung/pinctrl-exynos.c +++ b/drivers/pinctrl/samsung/pinctrl-exynos.c | |||
@@ -254,7 +254,7 @@ static struct exynos_irq_chip exynos_gpio_irq_chip = { | |||
254 | .eint_pend = EXYNOS_GPIO_EPEND_OFFSET, | 254 | .eint_pend = EXYNOS_GPIO_EPEND_OFFSET, |
255 | }; | 255 | }; |
256 | 256 | ||
257 | static int exynos_gpio_irq_map(struct irq_domain *h, unsigned int virq, | 257 | static int exynos_eint_irq_map(struct irq_domain *h, unsigned int virq, |
258 | irq_hw_number_t hw) | 258 | irq_hw_number_t hw) |
259 | { | 259 | { |
260 | struct samsung_pin_bank *b = h->host_data; | 260 | struct samsung_pin_bank *b = h->host_data; |
@@ -267,10 +267,10 @@ static int exynos_gpio_irq_map(struct irq_domain *h, unsigned int virq, | |||
267 | } | 267 | } |
268 | 268 | ||
269 | /* | 269 | /* |
270 | * irq domain callbacks for external gpio interrupt controller. | 270 | * irq domain callbacks for external gpio and wakeup interrupt controllers. |
271 | */ | 271 | */ |
272 | static const struct irq_domain_ops exynos_gpio_irqd_ops = { | 272 | static const struct irq_domain_ops exynos_eint_irqd_ops = { |
273 | .map = exynos_gpio_irq_map, | 273 | .map = exynos_eint_irq_map, |
274 | .xlate = irq_domain_xlate_twocell, | 274 | .xlate = irq_domain_xlate_twocell, |
275 | }; | 275 | }; |
276 | 276 | ||
@@ -329,7 +329,7 @@ static int exynos_eint_gpio_init(struct samsung_pinctrl_drv_data *d) | |||
329 | if (bank->eint_type != EINT_TYPE_GPIO) | 329 | if (bank->eint_type != EINT_TYPE_GPIO) |
330 | continue; | 330 | continue; |
331 | bank->irq_domain = irq_domain_add_linear(bank->of_node, | 331 | bank->irq_domain = irq_domain_add_linear(bank->of_node, |
332 | bank->nr_pins, &exynos_gpio_irqd_ops, bank); | 332 | bank->nr_pins, &exynos_eint_irqd_ops, bank); |
333 | if (!bank->irq_domain) { | 333 | if (!bank->irq_domain) { |
334 | dev_err(dev, "gpio irq domain add failed\n"); | 334 | dev_err(dev, "gpio irq domain add failed\n"); |
335 | ret = -ENXIO; | 335 | ret = -ENXIO; |
@@ -456,26 +456,6 @@ static void exynos_irq_demux_eint16_31(unsigned int irq, struct irq_desc *desc) | |||
456 | chained_irq_exit(chip, desc); | 456 | chained_irq_exit(chip, desc); |
457 | } | 457 | } |
458 | 458 | ||
459 | static int exynos_wkup_irq_map(struct irq_domain *h, unsigned int virq, | ||
460 | irq_hw_number_t hw) | ||
461 | { | ||
462 | struct samsung_pin_bank *b = h->host_data; | ||
463 | |||
464 | irq_set_chip_and_handler(virq, &b->irq_chip->chip, | ||
465 | handle_level_irq); | ||
466 | irq_set_chip_data(virq, h->host_data); | ||
467 | set_irq_flags(virq, IRQF_VALID); | ||
468 | return 0; | ||
469 | } | ||
470 | |||
471 | /* | ||
472 | * irq domain callbacks for external wakeup interrupt controller. | ||
473 | */ | ||
474 | static const struct irq_domain_ops exynos_wkup_irqd_ops = { | ||
475 | .map = exynos_wkup_irq_map, | ||
476 | .xlate = irq_domain_xlate_twocell, | ||
477 | }; | ||
478 | |||
479 | /* | 459 | /* |
480 | * exynos_eint_wkup_init() - setup handling of external wakeup interrupts. | 460 | * exynos_eint_wkup_init() - setup handling of external wakeup interrupts. |
481 | * @d: driver data of samsung pinctrl driver. | 461 | * @d: driver data of samsung pinctrl driver. |
@@ -507,7 +487,7 @@ static int exynos_eint_wkup_init(struct samsung_pinctrl_drv_data *d) | |||
507 | continue; | 487 | continue; |
508 | 488 | ||
509 | bank->irq_domain = irq_domain_add_linear(bank->of_node, | 489 | bank->irq_domain = irq_domain_add_linear(bank->of_node, |
510 | bank->nr_pins, &exynos_wkup_irqd_ops, bank); | 490 | bank->nr_pins, &exynos_eint_irqd_ops, bank); |
511 | if (!bank->irq_domain) { | 491 | if (!bank->irq_domain) { |
512 | dev_err(dev, "wkup irq domain add failed\n"); | 492 | dev_err(dev, "wkup irq domain add failed\n"); |
513 | return -ENXIO; | 493 | return -ENXIO; |