Am 28.06.2013 17:27, schrieb Javier Martinez Canillas:
When a GPIO is defined as an interrupt line using Device
Tree, a call to irq_create_of_mapping() is made that calls
irq_create_mapping(). So, is not necessary to do the mapping
for all OMAP GPIO lines and explicitly call irq_create_mapping()
on the driver probe() when booting with Device Tree.

Add a custom IRQ domain .map function handler that will be
called by irq_create_mapping() to map the GPIO lines used as IRQ.
This also allows to execute needed setup code such as configuring
a GPIO as input and enabling the GPIO bank.

This patch basically broke every usage of

irq = gpio_to_irq(gpio);
request[_threaded]_irq(irq, ...);

because request[_threaded]_irq(irq, ...) now fails because of a missing irq_domain (no mapping => no domain).

A prominent victim of this is the omap_hsmmc driver with the cd-gpio option enabled. To reproduce it, just add "cd-gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>;" (or similiar) to the omap-mmc part in the DT.

I don't know what else might fail, but I would assume there are still many other places which do request an IRQ for a GPIO with the above, now failing, sequence.

Regards,

Alexander

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to