using general IRQs

Laurentiu Tudor b10716 at
Mon Aug 17 20:37:36 AEST 2015

On 08/10/2015 10:48 AM, Ran Shalit wrote:
> Hello,
> MPC8349 has general IRQ numbered 0-7,
> It is required to bind these IRQs with some routine , i.e. they are
> not used with any specific driver.
> - Should they be configured as gpios in device tree so that we can use
> the gpio as irq in linux ? Is there any example ?

If it's a gpio then yes, you need to use it as a gpio. Not familiar with MPC8349,
but newer FSL chips can select between gpio or irq through a RCW field (IRQ_BASE?).

Note that for gpios there's special apis, such as:  of_get_gpio(), gpio_request_one() a.s.o.
Also you'll need to update your device tree node to something like:

  intc2 at 0{
   compatible = "intc2";
   reg = <0 0x1000>;
   gpios = <&gpio0 4 0>;

See Documentation/gpio.txt for more info.

Best Regards, Laurentiu

More information about the Linuxppc-dev mailing list