<?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: imx6 snvs-pwrkey not working</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/imx6-snvs-pwrkey-not-working/m-p/394795#M57814</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Correct usage is:&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #1f497d;"&gt;snvs-pwrkey@0x020cc000 {&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #1f497d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; compatible = "fsl,imx6sx-snvs-pwrkey";&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #1f497d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; reg = &amp;lt;0x020cc000 0x4000&amp;gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #1f497d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; interrupts = &amp;lt;0 4 IRQ_TYPE_LEVEL_HIGH&amp;gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #1f497d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fsl,keycode = &amp;lt;116&amp;gt;; /* KEY_POWER */&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #1f497d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fsl,wakeup;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #1f497d;"&gt;};&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #1f497d;"&gt;However, there is an issue with the driver.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #1f497d;"&gt;The interrupt only triggers on the release of the key. The driver is looking for a change in the state of the key, but since the interrupt triggers on release the key value is always 0. Removing this check make the driver work fine.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #1f497d;"&gt;I am using a quad processor, so I am not sure if this is different for the others.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #1f497d;"&gt;Patch looks like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;/P&gt;&lt;P&gt;---&lt;/P&gt;&lt;P&gt;drivers/input/keyboard/snvs_pwrkey.c | 37 +++++++++++++++++++++---------------&lt;/P&gt;&lt;P&gt;1 file changed, 22 insertions(+), 15 deletions(-)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;diff --git a/drivers/input/keyboard/snvs_pwrkey.c b/drivers/input/keyboard/snvs_pwrkey.c&lt;/P&gt;&lt;P&gt;index 1d6d62c..fa85b69 100644&lt;/P&gt;&lt;P&gt;--- a/drivers/input/keyboard/snvs_pwrkey.c&lt;/P&gt;&lt;P&gt;+++ b/drivers/input/keyboard/snvs_pwrkey.c&lt;/P&gt;&lt;P&gt;@@ -46,21 +46,28 @@ static void imx_imx_snvs_check_for_events(unsigned long data)&lt;/P&gt;&lt;P&gt;&amp;nbsp; void __iomem *ioaddr = pdata-&amp;gt;ioaddr;&lt;/P&gt;&lt;P&gt;&amp;nbsp; u32 state;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- state = ((readl_relaxed(ioaddr + SNVS_HPSR_REG) &amp;amp; SNVS_HPSR_BTN) ?&lt;/P&gt;&lt;P&gt;- 1 : 0);&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;P&gt;- /* only report new event if status changed */&lt;/P&gt;&lt;P&gt;- if (state ^ pdata-&amp;gt;keystate) {&lt;/P&gt;&lt;P&gt;- pdata-&amp;gt;keystate = state;&lt;/P&gt;&lt;P&gt;- input_event(input, EV_KEY, pdata-&amp;gt;keycode, state);&lt;/P&gt;&lt;P&gt;- input_sync(input);&lt;/P&gt;&lt;P&gt;- }&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;P&gt;- /* repeat check if pressed long */&lt;/P&gt;&lt;P&gt;- if (state) {&lt;/P&gt;&lt;P&gt;- mod_timer(&amp;amp;pdata-&amp;gt;check_timer,&lt;/P&gt;&lt;P&gt;-&amp;nbsp; jiffies + msecs_to_jiffies(60));&lt;/P&gt;&lt;P&gt;- }&lt;/P&gt;&lt;P&gt;+ //state = ((readl_relaxed(ioaddr + SNVS_HPSR_REG) &amp;amp; SNVS_HPSR_BTN) ? 1 : 0);&lt;/P&gt;&lt;P&gt;+&lt;/P&gt;&lt;P&gt;+ ///* only report new event if status changed */&lt;/P&gt;&lt;P&gt;+ //if (state ^ pdata-&amp;gt;keystate) {&lt;/P&gt;&lt;P&gt;+ // pdata-&amp;gt;keystate = state;&lt;/P&gt;&lt;P&gt;+ // input_event(input, EV_KEY, pdata-&amp;gt;keycode, state);&lt;/P&gt;&lt;P&gt;+ // input_sync(input);&lt;/P&gt;&lt;P&gt;+ //}&lt;/P&gt;&lt;P&gt;+&lt;/P&gt;&lt;P&gt;+ ///* repeat check if pressed long */&lt;/P&gt;&lt;P&gt;+ //if (state) {&lt;/P&gt;&lt;P&gt;+ // mod_timer(&amp;amp;pdata-&amp;gt;check_timer,&lt;/P&gt;&lt;P&gt;+ //&amp;nbsp; jiffies + msecs_to_jiffies(60));&lt;/P&gt;&lt;P&gt;+ //}&lt;/P&gt;&lt;P&gt;+&lt;/P&gt;&lt;P&gt;+ /* interrupt only reports release of key so do not wait for state change */&lt;/P&gt;&lt;P&gt;+ state=1;&lt;/P&gt;&lt;P&gt;+ input_event(input, EV_KEY, pdata-&amp;gt;keycode, state);&lt;/P&gt;&lt;P&gt;+ input_sync(input);&lt;/P&gt;&lt;P&gt;+ state=0;&lt;/P&gt;&lt;P&gt;+ input_event(input, EV_KEY, pdata-&amp;gt;keycode, state);&lt;/P&gt;&lt;P&gt;+ input_sync(input);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;static irqreturn_t imx_snvs_pwrkey_interrupt(int irq, void *dev_id)&lt;/P&gt;&lt;P&gt;--&lt;/P&gt;&lt;P&gt;1.9.1&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 03 Aug 2015 13:46:21 GMT</pubDate>
    <dc:creator>deschamp</dc:creator>
    <dc:date>2015-08-03T13:46:21Z</dc:date>
    <item>
      <title>imx6 snvs-pwrkey not working</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/imx6-snvs-pwrkey-not-working/m-p/394792#M57811</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to get snvs-pwrkey to function on my custom hardware using a imx6Q to detect a power off request.&lt;/P&gt;&lt;P&gt;I modified my device tree and defconfig files to include the snvs-pwrkey driver, and I see it is instantiated and registered as a keyboard in dmesg.&lt;/P&gt;&lt;P&gt;However when I run evtest to test the keyboard I get no response from the keypress. &lt;/P&gt;&lt;P&gt;snvs-rtc is working fine, and I have another keyboard kpp working fine as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;added to arch/arm/boot/dts/imx6qdl.dtsi&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt; snvs_pwrkey: snvs-pwrkey@0x020cc000 {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt; compatible = "fsl,imx6sx-snvs-pwrkey";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt; reg = &amp;lt;0x020cc000 0x4000&amp;gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt; interrupts = &amp;lt;0 4 IRQ_TYPE_LEVEL_HIGH&amp;gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt; fsl,keycode = &amp;lt;116&amp;gt;; /* KEY_POWER */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt; fsl,wakeup;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt; };&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;added to arch/arm/boot/dts/imx6qdl-wandboard.dtsi&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;&amp;amp;snvs_pwrkey {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt; status = "okay";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;};&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jul 2015 04:16:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/imx6-snvs-pwrkey-not-working/m-p/394792#M57811</guid>
      <dc:creator>deschamp</dc:creator>
      <dc:date>2015-07-09T04:16:54Z</dc:date>
    </item>
    <item>
      <title>Re: imx6 snvs-pwrkey not working</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/imx6-snvs-pwrkey-not-working/m-p/394793#M57812</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Joe&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;one can look at linux documents in ..Documentation/devicetree/bindings/input/snvs-pwrkey.txt&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.spinics.net/lists/linux-input/msg38517.html" title="http://www.spinics.net/lists/linux-input/msg38517.html"&gt;[PATCH v2 2/3] document: devicetree: input: imx: i.mx snvs power device tree bindings -- Linux Input&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;A href="http://comments.gmane.org/gmane.linux.ports.arm.kernel/412324" title="http://comments.gmane.org/gmane.linux.ports.arm.kernel/412324"&gt;Discussing the Linux ARM kernel&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;igor&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jul 2015 06:52:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/imx6-snvs-pwrkey-not-working/m-p/394793#M57812</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2015-07-13T06:52:54Z</dc:date>
    </item>
    <item>
      <title>Re: imx6 snvs-pwrkey not working</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/imx6-snvs-pwrkey-not-working/m-p/394794#M57813</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Igor,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I looked at these documents and modified to match exactly:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;snvs-pwrkey@0x020cc000 {&lt;/P&gt;&lt;P&gt;&amp;nbsp; compatible = "fsl,imx6sx-snvs-pwrkey";&lt;/P&gt;&lt;P&gt;&amp;nbsp; reg = &amp;lt;0x020cc000 0x4000&amp;gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp; interrupts = &amp;lt;0 4 0x4&amp;gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp; linux,keycode = &amp;lt;116&amp;gt;; /* KEY_POWER */&lt;/P&gt;&lt;P&gt;&amp;nbsp; linux,wakeup;&lt;/P&gt;&lt;P&gt;&amp;nbsp; };&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, I still get the same result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Running evtest shows that the driver is loading, but it does not receive the keypress when the ON_OFF button is pressed.&lt;/P&gt;&lt;P&gt;If I press and hold the ON_OFF button, for 6 seconds or so, it shuts down the system as expected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Joe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2015 20:58:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/imx6-snvs-pwrkey-not-working/m-p/394794#M57813</guid>
      <dc:creator>deschamp</dc:creator>
      <dc:date>2015-07-14T20:58:24Z</dc:date>
    </item>
    <item>
      <title>Re: imx6 snvs-pwrkey not working</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/imx6-snvs-pwrkey-not-working/m-p/394795#M57814</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Correct usage is:&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #1f497d;"&gt;snvs-pwrkey@0x020cc000 {&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #1f497d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; compatible = "fsl,imx6sx-snvs-pwrkey";&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #1f497d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; reg = &amp;lt;0x020cc000 0x4000&amp;gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #1f497d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; interrupts = &amp;lt;0 4 IRQ_TYPE_LEVEL_HIGH&amp;gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #1f497d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fsl,keycode = &amp;lt;116&amp;gt;; /* KEY_POWER */&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #1f497d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fsl,wakeup;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #1f497d;"&gt;};&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #1f497d;"&gt;However, there is an issue with the driver.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #1f497d;"&gt;The interrupt only triggers on the release of the key. The driver is looking for a change in the state of the key, but since the interrupt triggers on release the key value is always 0. Removing this check make the driver work fine.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #1f497d;"&gt;I am using a quad processor, so I am not sure if this is different for the others.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #1f497d;"&gt;Patch looks like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&lt;/P&gt;&lt;P&gt;---&lt;/P&gt;&lt;P&gt;drivers/input/keyboard/snvs_pwrkey.c | 37 +++++++++++++++++++++---------------&lt;/P&gt;&lt;P&gt;1 file changed, 22 insertions(+), 15 deletions(-)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;diff --git a/drivers/input/keyboard/snvs_pwrkey.c b/drivers/input/keyboard/snvs_pwrkey.c&lt;/P&gt;&lt;P&gt;index 1d6d62c..fa85b69 100644&lt;/P&gt;&lt;P&gt;--- a/drivers/input/keyboard/snvs_pwrkey.c&lt;/P&gt;&lt;P&gt;+++ b/drivers/input/keyboard/snvs_pwrkey.c&lt;/P&gt;&lt;P&gt;@@ -46,21 +46,28 @@ static void imx_imx_snvs_check_for_events(unsigned long data)&lt;/P&gt;&lt;P&gt;&amp;nbsp; void __iomem *ioaddr = pdata-&amp;gt;ioaddr;&lt;/P&gt;&lt;P&gt;&amp;nbsp; u32 state;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- state = ((readl_relaxed(ioaddr + SNVS_HPSR_REG) &amp;amp; SNVS_HPSR_BTN) ?&lt;/P&gt;&lt;P&gt;- 1 : 0);&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;P&gt;- /* only report new event if status changed */&lt;/P&gt;&lt;P&gt;- if (state ^ pdata-&amp;gt;keystate) {&lt;/P&gt;&lt;P&gt;- pdata-&amp;gt;keystate = state;&lt;/P&gt;&lt;P&gt;- input_event(input, EV_KEY, pdata-&amp;gt;keycode, state);&lt;/P&gt;&lt;P&gt;- input_sync(input);&lt;/P&gt;&lt;P&gt;- }&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;P&gt;- /* repeat check if pressed long */&lt;/P&gt;&lt;P&gt;- if (state) {&lt;/P&gt;&lt;P&gt;- mod_timer(&amp;amp;pdata-&amp;gt;check_timer,&lt;/P&gt;&lt;P&gt;-&amp;nbsp; jiffies + msecs_to_jiffies(60));&lt;/P&gt;&lt;P&gt;- }&lt;/P&gt;&lt;P&gt;+ //state = ((readl_relaxed(ioaddr + SNVS_HPSR_REG) &amp;amp; SNVS_HPSR_BTN) ? 1 : 0);&lt;/P&gt;&lt;P&gt;+&lt;/P&gt;&lt;P&gt;+ ///* only report new event if status changed */&lt;/P&gt;&lt;P&gt;+ //if (state ^ pdata-&amp;gt;keystate) {&lt;/P&gt;&lt;P&gt;+ // pdata-&amp;gt;keystate = state;&lt;/P&gt;&lt;P&gt;+ // input_event(input, EV_KEY, pdata-&amp;gt;keycode, state);&lt;/P&gt;&lt;P&gt;+ // input_sync(input);&lt;/P&gt;&lt;P&gt;+ //}&lt;/P&gt;&lt;P&gt;+&lt;/P&gt;&lt;P&gt;+ ///* repeat check if pressed long */&lt;/P&gt;&lt;P&gt;+ //if (state) {&lt;/P&gt;&lt;P&gt;+ // mod_timer(&amp;amp;pdata-&amp;gt;check_timer,&lt;/P&gt;&lt;P&gt;+ //&amp;nbsp; jiffies + msecs_to_jiffies(60));&lt;/P&gt;&lt;P&gt;+ //}&lt;/P&gt;&lt;P&gt;+&lt;/P&gt;&lt;P&gt;+ /* interrupt only reports release of key so do not wait for state change */&lt;/P&gt;&lt;P&gt;+ state=1;&lt;/P&gt;&lt;P&gt;+ input_event(input, EV_KEY, pdata-&amp;gt;keycode, state);&lt;/P&gt;&lt;P&gt;+ input_sync(input);&lt;/P&gt;&lt;P&gt;+ state=0;&lt;/P&gt;&lt;P&gt;+ input_event(input, EV_KEY, pdata-&amp;gt;keycode, state);&lt;/P&gt;&lt;P&gt;+ input_sync(input);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;static irqreturn_t imx_snvs_pwrkey_interrupt(int irq, void *dev_id)&lt;/P&gt;&lt;P&gt;--&lt;/P&gt;&lt;P&gt;1.9.1&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Aug 2015 13:46:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/imx6-snvs-pwrkey-not-working/m-p/394795#M57814</guid>
      <dc:creator>deschamp</dc:creator>
      <dc:date>2015-08-03T13:46:21Z</dc:date>
    </item>
    <item>
      <title>Re: imx6 snvs-pwrkey not working</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/imx6-snvs-pwrkey-not-working/m-p/394796#M57815</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I experienced the same issues with iMx6 dual. The bit 6 (BTN) in SNVS_HPSR_REG was not being set. Is there anyone from NXP can help identify the root cause ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Dec 2017 04:35:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/imx6-snvs-pwrkey-not-working/m-p/394796#M57815</guid>
      <dc:creator>kenlin</dc:creator>
      <dc:date>2017-12-19T04:35:34Z</dc:date>
    </item>
  </channel>
</rss>

