<?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 Wake from GPIO interrupt in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Wake-from-GPIO-interrupt/m-p/179475#M7376</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to use the standby / Wait For Interrupt mode on the i.MX28, but I am having problems waking from this state by using a standard GPIO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First, I did it the ugly way by editing arch/arm/mach-mx28/pm.c to manually enable the interrupt I wanted (as in, direct write to the register rather than request the interrupt the Lunux way).&amp;nbsp; This allowed me to exit the WFI mode, but once the board resumed, my driver that used that GPIO pin no longer worked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I found the "enable_irq_wake(irq_num)" function call, and I used that in my driver.&amp;nbsp; But for some reason my board will not wake when I toggle the GPIO (I removed the custom hack described in the previous paragraph).&amp;nbsp; I am confident that I am using the correct irq number because it is the same number I used when I did the "request_irq()" call which worked fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Am I missing something?&amp;nbsp; It seems like this should be pretty straight forward, but I can't seem to find a good example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;- Matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 02 Aug 2012 16:02:40 GMT</pubDate>
    <dc:creator>Matt_ng9</dc:creator>
    <dc:date>2012-08-02T16:02:40Z</dc:date>
    <item>
      <title>Wake from GPIO interrupt</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Wake-from-GPIO-interrupt/m-p/179475#M7376</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to use the standby / Wait For Interrupt mode on the i.MX28, but I am having problems waking from this state by using a standard GPIO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First, I did it the ugly way by editing arch/arm/mach-mx28/pm.c to manually enable the interrupt I wanted (as in, direct write to the register rather than request the interrupt the Lunux way).&amp;nbsp; This allowed me to exit the WFI mode, but once the board resumed, my driver that used that GPIO pin no longer worked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I found the "enable_irq_wake(irq_num)" function call, and I used that in my driver.&amp;nbsp; But for some reason my board will not wake when I toggle the GPIO (I removed the custom hack described in the previous paragraph).&amp;nbsp; I am confident that I am using the correct irq number because it is the same number I used when I did the "request_irq()" call which worked fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Am I missing something?&amp;nbsp; It seems like this should be pretty straight forward, but I can't seem to find a good example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;- Matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Aug 2012 16:02:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Wake-from-GPIO-interrupt/m-p/179475#M7376</guid>
      <dc:creator>Matt_ng9</dc:creator>
      <dc:date>2012-08-02T16:02:40Z</dc:date>
    </item>
    <item>
      <title>Re: Wake from GPIO interrupt</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Wake-from-GPIO-interrupt/m-p/179476#M7377</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If your regular IRQ handler is working, just to add IRQF_NO_SUSPEND flag on request_irq(). It will wake up the Kernel from suspend.&lt;/P&gt;&lt;P&gt;If you will use GPIO group 0 (GPIO0-31), don't forget to apply kernel patch 0581. Unpached Kernel 2.6.35 will immediately locks up when you put GPIO group 0 IRQ (vector=127).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Freescale BSP Power SW wakeup implementation is rather ugly, indeed. It uses regular request_irq() without IRQF_NO_SUSPEND flag, but unmask Power SW interrupt directly writing to IRQ enable register just before the CPU actually enter to suspend state, in arch/arm/mach-mx28/pm.c.&lt;BR /&gt; &lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; __raw_writel(BM_POWER_CTRL_ENIRQ_PSWITCH,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; REGS_POWER_BASE + HW_POWER_CTRL_SET);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't think this is right thing to do ;-)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Aug 2012 23:12:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Wake-from-GPIO-interrupt/m-p/179476#M7377</guid>
      <dc:creator>YS</dc:creator>
      <dc:date>2012-08-02T23:12:53Z</dc:date>
    </item>
    <item>
      <title>Re: Wake from GPIO interrupt</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Wake-from-GPIO-interrupt/m-p/179477#M7378</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, that worked!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Aug 2012 14:42:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Wake-from-GPIO-interrupt/m-p/179477#M7378</guid>
      <dc:creator>Matt_ng9</dc:creator>
      <dc:date>2012-08-03T14:42:47Z</dc:date>
    </item>
    <item>
      <title>Re: Wake from GPIO interrupt</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Wake-from-GPIO-interrupt/m-p/179478#M7379</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm trying to wake my imx28 board with a GPIO interrupt but it doesn't work.&lt;/P&gt;&lt;P&gt;Can you give me an example of code that works for you ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Apr 2014 12:38:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Wake-from-GPIO-interrupt/m-p/179478#M7379</guid>
      <dc:creator>victorien</dc:creator>
      <dc:date>2014-04-30T12:38:56Z</dc:date>
    </item>
  </channel>
</rss>

