IRQF_TRIGGER_FALLING flag doesn't generate interrupt

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

IRQF_TRIGGER_FALLING flag doesn't generate interrupt

1,666 Views
nathani
Contributor II

I'm trying to enable interrupts for the si476x driver on i.MX6Q, but I'm having trouble. First of all, it seems that the IRQF_ONESHOT flag needs to be set, otherwise the interrupt can't be initialised at all. 

Next I can't seem to generate an interrupt when I have the IRQF_TRIGGER_FALLING flag set. However, when I have the IRQF_TRIGGER_LOW flag set, I am generating interrupts all the time, even when my scope says I should not be generating any.

si476x-i2c.c

                rval = devm_request_threaded_irq(dev,
                                                 client->irq, NULL,
                                                 si476x_core_interrupt,
                                                 //IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
                                                 IRQF_TRIGGER_LOW | IRQF_ONESHOT,
                                                 client->name, core);

Device Tree:

sound-fm {
 compatible = "fsl,imx-audio-si476x",
 "fsl,imx-tuner-si476x";
 model = "imx-radio-si4763";
 ssi-controller = <&ssi2>;
 fm-controller = <&si476x_codec>;
 mux-int-port = <2>;
 mux-ext-port = <5>;
};

si4763: si4763@63 {
   compatible = "si4761";
   reg = <0x63>;
   va-supply = <&reg_si4763_va>;
   vd-supply = <&reg_si4763_vd>;
   vio1-supply = <&reg_si4763_vio1>;
   vio2-supply = <&reg_si4763_vio2>;
   revision-a10; /* set to default A10 compatible command set */

   interrupts-extended = <&gpio5 29 IRQ_TYPE_EDGE_FALLING>;

   si476x_codec: si476x-codec {
      compatible = "si476x-codec";
   };

};

I've read the documentation and looked at other examples of drivers and can't figure out why this isn't working for me. 

Any help is appreciated, thanks,

Nathan

0 Kudos
2 Replies

1,233 Views
igorpadykov
NXP Employee
NXP Employee

Hi Nathan

available device tree si476x options are described in

Documentation/devicetree/bindings/sound/imx-audio-si476x.txt
http://git.freescale.com/git/cgit.cgi/imx/linux-imx.git/tree/Documentation/devicetree/bindings/sound...

Seems interrupt configuration is not implemented in driver and if necessary, one can add such codes:
linux/sound/soc/fsl/imx-si476x.c

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,233 Views
nathani
Contributor II

Yes, I am modifying the source code. 

0 Kudos