<?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>i.MX ProcessorsのトピックRe: Power Button - Android imx53 loco board</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Power-Button-Android-imx53-loco-board/m-p/194682#M10207</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kirill,&lt;/P&gt;&lt;P&gt;Thank you for your reply.&lt;/P&gt;&lt;P&gt;I will try remounting, but its not a good solution. A good solution would be to modify BSP source code and rebuild Android image.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have already checked the schematics. I know power button is controlled by GPIO_8, but I cannot find where its actions are defined in the source code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 14 Dec 2011 08:57:56 GMT</pubDate>
    <dc:creator>MauricioCirelli</dc:creator>
    <dc:date>2011-12-14T08:57:56Z</dc:date>
    <item>
      <title>Power Button - Android imx53 loco board</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Power-Button-Android-imx53-loco-board/m-p/194680#M10205</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to change the behavior of my Android system when user clicks the power button.&lt;/P&gt;&lt;P&gt;The default behavior is to turn the screen off and on. I need to make this button act as an Android HOME button (going to Home).&lt;/P&gt;&lt;P&gt;Has anyone already modified the behavior of this button? Which .c file should I edit in the BSP source code to achieve my needs?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Im using Adeneo's Android BSP v4.1 (last Gingerbread version).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any hints would be much appreciated!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;EDIT:&lt;/P&gt;&lt;P&gt;I have found some interesting files inside Android file system:&lt;/P&gt;&lt;P&gt;/system/usr/keylayout/&lt;/P&gt;&lt;P&gt;Contains some .kl files which describes keys and actions. Where should I edit in my BSP source code to change this files after recompiling BSP? The /system is a read-only file system, so I cannot edit it through adb.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Dec 2011 17:13:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Power-Button-Android-imx53-loco-board/m-p/194680#M10205</guid>
      <dc:creator>MauricioCirelli</dc:creator>
      <dc:date>2011-12-13T17:13:39Z</dc:date>
    </item>
    <item>
      <title>Re: Power Button - Android imx53 loco board</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Power-Button-Android-imx53-loco-board/m-p/194681#M10206</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can edit /system through adb. You should remount this partition with rw rights.&amp;nbsp;&lt;/P&gt;&lt;P&gt;mount -o rw,remount /dev/block/mmcblk0p2 /system&amp;nbsp;&lt;/P&gt;&lt;P&gt;"/dev/block/mmcblk0p2" you should check this partition if had it. type mount , and you will see current mounting points.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check shematics of imx53 board , track lane of this button, may be it will lead you to some conclusions&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Dec 2011 06:23:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Power-Button-Android-imx53-loco-board/m-p/194681#M10206</guid>
      <dc:creator>Kirill</dc:creator>
      <dc:date>2011-12-14T06:23:37Z</dc:date>
    </item>
    <item>
      <title>Re: Power Button - Android imx53 loco board</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Power-Button-Android-imx53-loco-board/m-p/194682#M10207</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kirill,&lt;/P&gt;&lt;P&gt;Thank you for your reply.&lt;/P&gt;&lt;P&gt;I will try remounting, but its not a good solution. A good solution would be to modify BSP source code and rebuild Android image.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have already checked the schematics. I know power button is controlled by GPIO_8, but I cannot find where its actions are defined in the source code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Dec 2011 08:57:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Power-Button-Android-imx53-loco-board/m-p/194682#M10207</guid>
      <dc:creator>MauricioCirelli</dc:creator>
      <dc:date>2011-12-14T08:57:56Z</dc:date>
    </item>
    <item>
      <title>Re: Power Button - Android imx53 loco board</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Power-Button-Android-imx53-loco-board/m-p/194683#M10208</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It corresponds the KEY_F4 and it is defined in the kernel sources, under arch/arm/mach-mx5/mx53_loco.c&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Dec 2011 23:52:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Power-Button-Android-imx53-loco-board/m-p/194683#M10208</guid>
      <dc:creator>rlorriaux</dc:creator>
      <dc:date>2011-12-19T23:52:33Z</dc:date>
    </item>
    <item>
      <title>Re: Power Button - Android imx53 loco board</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Power-Button-Android-imx53-loco-board/m-p/194684#M10209</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Remi,&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here’s what I’ve tried up to now:&lt;/P&gt;&lt;P&gt;-&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Look at the src/kernel_imx/arch/arm/mach_mx5/mx53_loco.c file&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Here I’ve found that Power Button is mapped to the KEY_F4 keyboard button. Is it right?&lt;/LI&gt;&lt;LI&gt;The power key event handler is registered here, to the pmic module.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;-&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Look at the src/kernel_imx/drivers/input/keyboard/mxc_pwrkey.c file&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Here I’ve found that pwrkey_event_handler function is the handler for the Power Button event&lt;/LI&gt;&lt;LI&gt;This function delegates to the general input system handler input_report_key function&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;-&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Look at the src/kernel_imx/drivers/input/input.c file&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Here I’ve found a table of devices and their event handlers&lt;/LI&gt;&lt;LI&gt;I’ve also found that input_handle_event function handles all input events and I’m interested in the EV_KEY event type. Its delegated to the input_pass_event function.&lt;/LI&gt;&lt;LI&gt;The input_pass_event&amp;nbsp; function delegates to the function defined in the structure handle-&amp;gt;handler-&amp;gt;event(handle, type, code, value); &amp;nbsp;Now I’m lost.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Where is the callback function (the final one, because I could see this event is being thrown to many handlers and none of them actually handles it, just pass it to a next handler) for those events? Please, help me finding and implementing what I need.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Dec 2011 18:46:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Power-Button-Android-imx53-loco-board/m-p/194684#M10209</guid>
      <dc:creator>MauricioCirelli</dc:creator>
      <dc:date>2011-12-20T18:46:41Z</dc:date>
    </item>
  </channel>
</rss>

