<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: i.mx6 GPIO -&amp;gt; userspace IRQ in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/i-mx6-GPIO-gt-userspace-IRQ/m-p/399809#M58892</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Thomas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The easiest solution is to use the sysfs GPIO entries to setup your GPIO and poll the value. The kernel documentation explains it pretty well:&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.kernel.org/doc/Documentation/gpio/sysfs.txt" title="https://www.kernel.org/doc/Documentation/gpio/sysfs.txt"&gt;https://www.kernel.org/doc/Documentation/gpio/sysfs.txt&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you can find examples online:&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.ridgerun.com/wiki/index.php?title=Gpio-int-test.c" title="https://www.ridgerun.com/wiki/index.php?title=Gpio-int-test.c"&gt;Gpio-int-test.c - RidgeRun Developer Connection&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Gary&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Nov 2015 18:55:15 GMT</pubDate>
    <dc:creator>gary_bisson</dc:creator>
    <dc:date>2015-11-10T18:55:15Z</dc:date>
    <item>
      <title>i.mx6 GPIO -&gt; userspace IRQ</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-mx6-GPIO-gt-userspace-IRQ/m-p/399808#M58891</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to have a GPIO pin (in this case GPIO7 on an i.mx6 Solo) generate an interrupt that can be picked up by a process running in user space. My kernel is 3.10.17.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there some tutorial how to do this somewhere?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My questions are:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. What do I need to set up in the device tree file to make this pin generate an interrupt?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. I've heard about picking up interrupts from user space by opening a new /proc file (/proc/irq/nn/irq) where nn is the interrupt number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reading from this file will then block until the next interrupt occurs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select() and poll() are also supposed to work with this file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Will this be possible with the 3.10.17 kernel, and if yes, how do I find out the linux-side interrupt number of the interrupt generated by GPIO7?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Nov 2015 14:32:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-mx6-GPIO-gt-userspace-IRQ/m-p/399808#M58891</guid>
      <dc:creator>thomaswenzel</dc:creator>
      <dc:date>2015-11-10T14:32:23Z</dc:date>
    </item>
    <item>
      <title>Re: i.mx6 GPIO -&gt; userspace IRQ</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-mx6-GPIO-gt-userspace-IRQ/m-p/399809#M58892</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Thomas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The easiest solution is to use the sysfs GPIO entries to setup your GPIO and poll the value. The kernel documentation explains it pretty well:&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.kernel.org/doc/Documentation/gpio/sysfs.txt" title="https://www.kernel.org/doc/Documentation/gpio/sysfs.txt"&gt;https://www.kernel.org/doc/Documentation/gpio/sysfs.txt&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you can find examples online:&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.ridgerun.com/wiki/index.php?title=Gpio-int-test.c" title="https://www.ridgerun.com/wiki/index.php?title=Gpio-int-test.c"&gt;Gpio-int-test.c - RidgeRun Developer Connection&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Gary&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Nov 2015 18:55:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-mx6-GPIO-gt-userspace-IRQ/m-p/399809#M58892</guid>
      <dc:creator>gary_bisson</dc:creator>
      <dc:date>2015-11-10T18:55:15Z</dc:date>
    </item>
    <item>
      <title>Re: i.mx6 GPIO -&gt; userspace IRQ</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-mx6-GPIO-gt-userspace-IRQ/m-p/399810#M58893</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;also one can look at:&lt;/P&gt;&lt;P&gt;Application Note AN5125, Introduction to Device Trees (Rev.0, 9/2015)&lt;/P&gt;&lt;P&gt;&lt;A href="http://cache.freescale.com/files/32bit/doc/app_note/AN5125.pdf" title="http://cache.freescale.com/files/32bit/doc/app_note/AN5125.pdf"&gt;http://cache.freescale.com/files/32bit/doc/app_note/AN5125.pdf&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;A href="http://xillybus.com/tutorials/device-tree-zynq-4" title="http://xillybus.com/tutorials/device-tree-zynq-4"&gt;A Tutorial on the Device Tree (Zynq) -- Part IV | xillybus.com&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;A href="http://www.kosagi.com/w/index.php?title=Definitive_GPIO_guide" title="http://www.kosagi.com/w/index.php?title=Definitive_GPIO_guide"&gt;Definitive GPIO guide - Studio Kousagi Wiki&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;~igor&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Nov 2015 01:51:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-mx6-GPIO-gt-userspace-IRQ/m-p/399810#M58893</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2015-11-11T01:51:10Z</dc:date>
    </item>
  </channel>
</rss>

