<?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: How to do Call Poweroff from Linux Driver in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/How-to-do-Call-Poweroff-from-Linux-Driver/m-p/693004#M107424</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Arun&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for i.MX51 poweroff example one can look at attached Linux Manual&lt;/P&gt;&lt;P&gt;Chapter 7 Low-level Power Management (PM) Driver and use solution&lt;/P&gt;&lt;P&gt;from i.MX51 EVK where MC13892 PWRON signal connected to PMIC_ON_REQ i.MX51,&lt;BR /&gt;please check SPF-26203&amp;nbsp; p.7 on i.MX51 EVK schematic&lt;/P&gt;&lt;P&gt;Schematics (1)&lt;BR /&gt;IMX51_EVK16_DESIGN_FILES&lt;BR /&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.nxp.com%2Fproducts%2Fautomotive-products%2Fenergy-power-management%2Fswitching-regulator%2Fi.mx51-evaluation-kit%3AMCIMX51EVKJ%3Ftab%3DDesign_Tools_Tab" rel="nofollow" target="_blank"&gt;http://www.nxp.com/products/automotive-products/energy-power-management/switching-regulator/i.mx51-evaluation-kit:MCIMX51EVKJ?tab=Design_Tools_Tab&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i.MX51 EVK Linux:&lt;/P&gt;&lt;P&gt;Board Support Packages (8)&lt;BR /&gt;Linux 2.6.35 Source Code Files 2010.11 for i.MX51. Engineering Release(REV ER2010.11)&lt;BR /&gt;&lt;A href="https://www.nxp.com/webapp/Download?colCode=L2.6.35_10.11_ER_SOURCE&amp;amp;appType=license&amp;amp;Parent_nodeId=1255538391422718449160&amp;amp;Parent_pageType=product"&gt;https://www.nxp.com/webapp/Download?colCode=L2.6.35_10.11_ER_SOURCE&amp;amp;appType=license&amp;amp;Parent_nodeId=1255538391422718449160&amp;amp;Parent_pageType=product&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 03 Aug 2017 10:35:24 GMT</pubDate>
    <dc:creator>igorpadykov</dc:creator>
    <dc:date>2017-08-03T10:35:24Z</dc:date>
    <item>
      <title>How to do Call Poweroff from Linux Driver</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-do-Call-Poweroff-from-Linux-Driver/m-p/693003#M107423</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 want to do GPIO Shutdown in MX51.&amp;nbsp;I did GPIO Interrupt driver and trying to send poweroff command to userspace using&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;call_usermodehelper()&amp;nbsp;&lt;/STRONG&gt;function. But I am facing issues in that, Unable to run ..... Tell the exact procedure to do shutdown using call_usermode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying one more method. Once if i press the button, inside interrupt function, i want to call power_off function from kernel space instead of using call_usemodehelper() from userspace. So anyone suggest me how to do shutdown.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Aug 2017 09:22:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-do-Call-Poweroff-from-Linux-Driver/m-p/693003#M107423</guid>
      <dc:creator>arunkmrvn</dc:creator>
      <dc:date>2017-08-03T09:22:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to do Call Poweroff from Linux Driver</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-do-Call-Poweroff-from-Linux-Driver/m-p/693004#M107424</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Arun&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for i.MX51 poweroff example one can look at attached Linux Manual&lt;/P&gt;&lt;P&gt;Chapter 7 Low-level Power Management (PM) Driver and use solution&lt;/P&gt;&lt;P&gt;from i.MX51 EVK where MC13892 PWRON signal connected to PMIC_ON_REQ i.MX51,&lt;BR /&gt;please check SPF-26203&amp;nbsp; p.7 on i.MX51 EVK schematic&lt;/P&gt;&lt;P&gt;Schematics (1)&lt;BR /&gt;IMX51_EVK16_DESIGN_FILES&lt;BR /&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.nxp.com%2Fproducts%2Fautomotive-products%2Fenergy-power-management%2Fswitching-regulator%2Fi.mx51-evaluation-kit%3AMCIMX51EVKJ%3Ftab%3DDesign_Tools_Tab" rel="nofollow" target="_blank"&gt;http://www.nxp.com/products/automotive-products/energy-power-management/switching-regulator/i.mx51-evaluation-kit:MCIMX51EVKJ?tab=Design_Tools_Tab&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i.MX51 EVK Linux:&lt;/P&gt;&lt;P&gt;Board Support Packages (8)&lt;BR /&gt;Linux 2.6.35 Source Code Files 2010.11 for i.MX51. Engineering Release(REV ER2010.11)&lt;BR /&gt;&lt;A href="https://www.nxp.com/webapp/Download?colCode=L2.6.35_10.11_ER_SOURCE&amp;amp;appType=license&amp;amp;Parent_nodeId=1255538391422718449160&amp;amp;Parent_pageType=product"&gt;https://www.nxp.com/webapp/Download?colCode=L2.6.35_10.11_ER_SOURCE&amp;amp;appType=license&amp;amp;Parent_nodeId=1255538391422718449160&amp;amp;Parent_pageType=product&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Aug 2017 10:35:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-do-Call-Poweroff-from-Linux-Driver/m-p/693004#M107424</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2017-08-03T10:35:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to do Call Poweroff from Linux Driver</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-do-Call-Poweroff-from-Linux-Driver/m-p/693005#M107425</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Aug 2017 05:03:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-do-Call-Poweroff-from-Linux-Driver/m-p/693005#M107425</guid>
      <dc:creator>arunkmrvn</dc:creator>
      <dc:date>2017-08-09T05:03:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to do Call Poweroff from Linux Driver</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-do-Call-Poweroff-from-Linux-Driver/m-p/693006#M107426</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried to build the driver as mentioned in BSP (Low-level Power Management (PM) Driver). But its showing warning ???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unable to include the&amp;nbsp;mach/irqs.h. so its showing warning&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;unknown symbol&amp;nbsp;mxc_cpu_lp_set()&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;unknown symbol&amp;nbsp;suspend_in_iram()&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;unknown symbol &lt;/STRONG&gt;&lt;STRONG&gt;cpu_do_idle()&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Added to&amp;nbsp;interrupt code like below&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void __iomem *sdclk_iomux_addr = IO_ADDRESS(IOMUXC_BASE_ADDR + 0x4b8);&lt;BR /&gt; u32 * wake_src;&lt;/P&gt;&lt;P&gt;mxc_get_wake_irq(&amp;amp;wake_src);&lt;BR /&gt; if ( !wake_src[0] &amp;amp;&amp;amp; !wake_src[1] &amp;amp;&amp;amp; !wake_src[2] &amp;amp;&amp;amp; !wake_src[3] )&lt;BR /&gt; {&lt;BR /&gt; printk(KERN_ERR "No sources enabled for wake-up! Sleep abort.\n");&lt;BR /&gt; return -EINVAL;&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;printk("inside gpio shutdown interrupt\n");&lt;BR /&gt; input_report_shutdown(dev,BTN_0,EV_SHUTDOWN);&lt;BR /&gt; input_sync(dev);&lt;/P&gt;&lt;P&gt;if (gpc_dvfs_clk == NULL)&lt;BR /&gt; gpc_dvfs_clk = clk_get(NULL, "gpc_dvfs_clk");&lt;/P&gt;&lt;P&gt;clk_enable(gpc_dvfs_clk);&lt;BR /&gt; mxc_cpu_lp_set(STOP_POWER_OFF);&lt;BR /&gt; cpu_do_idle();&lt;BR /&gt; local_flush_tlb_all();&lt;BR /&gt; flush_cache_all();&lt;BR /&gt; /* Run the suspend code from iRAM. */&lt;BR /&gt; suspend_in_iram(sdclk_iomux_addr);&lt;/P&gt;&lt;P&gt;/*clear the EMPGC0/1 bits */&lt;BR /&gt; __raw_writel(0, MXC_SRPG_EMPGC0_SRPGCR);&lt;BR /&gt; __raw_writel(0, MXC_SRPG_EMPGC1_SRPGCR);&lt;/P&gt;&lt;P&gt;clk_disable(gpc_dvfs_clk);&lt;BR /&gt; return IRQ_HANDLED;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to do any changes in configuration apart from mentioned in BSP or any other changes need. Can anyone&amp;nbsp;suggest&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks before,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;ARUN&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Sep 2017 04:23:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-do-Call-Poweroff-from-Linux-Driver/m-p/693006#M107426</guid>
      <dc:creator>arunkmrvn</dc:creator>
      <dc:date>2017-09-15T04:23:09Z</dc:date>
    </item>
  </channel>
</rss>

