Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c27769ef authored by Linus Walleij's avatar Linus Walleij
Browse files

gpio: pcf857x: only use set_irq_flags() on ARM



As per the pattern from other GPIO drivers, use set_irq_flags()
on ARM only, use irq_set_noprobe() on other archs.

Also rename the argument "virq" to just "irq", this IRQ isn't
any more "virtual" than any other Linux IRQ number, we use
"hwirq" for the actual hw-numbers, "virq" is just bogus.

Cc: George Cherian <george.cherian@ti.com>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: default avatarFelipe Balbi <balbi@ti.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 524c1081
Loading
Loading
Loading
Loading
+7 −3
Original line number Original line Diff line number Diff line
@@ -195,15 +195,19 @@ static irqreturn_t pcf857x_irq(int irq, void *data)
	return IRQ_HANDLED;
	return IRQ_HANDLED;
}
}


static int pcf857x_irq_domain_map(struct irq_domain *domain, unsigned int virq,
static int pcf857x_irq_domain_map(struct irq_domain *domain, unsigned int irq,
				 irq_hw_number_t hw)
				 irq_hw_number_t hw)
{
{
	struct pcf857x *gpio = domain->host_data;
	struct pcf857x *gpio = domain->host_data;


	irq_set_chip_and_handler(virq,
	irq_set_chip_and_handler(irq,
				 &dummy_irq_chip,
				 &dummy_irq_chip,
				 handle_level_irq);
				 handle_level_irq);
	set_irq_flags(virq, IRQF_VALID);
#ifdef CONFIG_ARM
	set_irq_flags(irq, IRQF_VALID);
#else
	irq_set_noprobe(irq);
#endif
	gpio->irq_mapped |= (1 << hw);
	gpio->irq_mapped |= (1 << hw);


	return 0;
	return 0;