Commit 25655c75 authored by Brian Masney's avatar Brian Masney Committed by Linus Walleij

spmi: pmic-arb: revert "validate type when mapping IRQ"

Validation of the IRQ type was added to spmi pmic-arb, however spmi-mpp
in device tree still uses IRQ_TYPE_NONE. This commit caused the
spmi-mpp probe to fail since platform_irq_count() would return 0.
Correct this by backing out the previous patch.
Signed-off-by: default avatarBrian Masney <masneyb@onstation.org>
Fixes: 135ef21a ("spmi: pmic-arb: validate type when mapping IRQ")
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 5d643eda
...@@ -740,9 +740,9 @@ static int qpnpint_irq_domain_translate(struct irq_domain *d, ...@@ -740,9 +740,9 @@ static int qpnpint_irq_domain_translate(struct irq_domain *d,
} }
static int qpnpint_irq_domain_map(struct spmi_pmic_arb *pmic_arb, static void qpnpint_irq_domain_map(struct spmi_pmic_arb *pmic_arb,
struct irq_domain *domain, unsigned int virq, struct irq_domain *domain, unsigned int virq,
irq_hw_number_t hwirq, unsigned int type) irq_hw_number_t hwirq, unsigned int type)
{ {
irq_flow_handler_t handler; irq_flow_handler_t handler;
...@@ -751,15 +751,11 @@ static int qpnpint_irq_domain_map(struct spmi_pmic_arb *pmic_arb, ...@@ -751,15 +751,11 @@ static int qpnpint_irq_domain_map(struct spmi_pmic_arb *pmic_arb,
if (type & IRQ_TYPE_EDGE_BOTH) if (type & IRQ_TYPE_EDGE_BOTH)
handler = handle_edge_irq; handler = handle_edge_irq;
else if (type & (IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_LEVEL_HIGH))
handler = handle_level_irq;
else else
return -EINVAL; handler = handle_level_irq;
irq_domain_set_info(domain, virq, hwirq, &pmic_arb_irqchip, pmic_arb, irq_domain_set_info(domain, virq, hwirq, &pmic_arb_irqchip, pmic_arb,
handler, NULL, NULL); handler, NULL, NULL);
return 0;
} }
static int qpnpint_irq_domain_alloc(struct irq_domain *domain, static int qpnpint_irq_domain_alloc(struct irq_domain *domain,
...@@ -776,12 +772,9 @@ static int qpnpint_irq_domain_alloc(struct irq_domain *domain, ...@@ -776,12 +772,9 @@ static int qpnpint_irq_domain_alloc(struct irq_domain *domain,
if (ret) if (ret)
return ret; return ret;
for (i = 0; i < nr_irqs; i++) { for (i = 0; i < nr_irqs; i++)
ret = qpnpint_irq_domain_map(pmic_arb, domain, virq + i, qpnpint_irq_domain_map(pmic_arb, domain, virq + i, hwirq + i,
hwirq + i, type); type);
if (ret)
return ret;
}
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment