Quantcast
Channel: Processors
Viewing all articles
Browse latest Browse all 148998

Forum Post: RE: GPIO settings for AM335x

$
0
0

Hi Miroslav,

         I want to use GPIO2_3 as interrupt GPIO, Presently that GPIO is configured as Input pin on starter kit.

         when I am checking cat sys/kernel/debug/gpio.

         I am getting this info.

         GPIOs 64-95, gpio:
         gpio-66  (button1             ) in  lo
         gpio-67  (button0             ) in  lo
         gpio-69  (button3             ) in  lo

      I am interested to make gpio-67  (button0             ) in  lo as interrupt gpio.

      I had writen ISR handler for this I am able to build.

     using function  irq_num = gpio_to_irq(Interrupt_key);   in ISR handler

     I am getting irq_num = 211.

    I am passing same infunction.

    request_irq(irq_num, (irq_handler_t) extn_irq_handler,IRQF_DISABLED, "EXTn_irq_handler", NULL);

   when I am inserting module .KO on board. I am getting

root@am335x-evm:/# insmod ToggleLed2.ko
[   52.648148] Inside toggle_init //this is debugging string.
[   52.651394]  assingned interrupt num is = 211
[   52.656322] genirq: Flags mismatch irq 211. 00000020 (EXTn_irq_handler) vs. 00000083 (button0)
[   52.665483] Failed to get requested interrupt .


 Please Guide me where i am doing wrong, Where I have to make changes. I checked below link but not get

 solution for this.

http://processors.wiki.ti.com/index.php/GPIO_Driver_Guide#User_Space_-_Sysfs_control.

Thanks

Vishal,


Viewing all articles
Browse latest Browse all 148998

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>