<?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: Unable to get interrupts for rotary encoder in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Unable-to-get-interrupts-for-rotary-encoder/m-p/1381195#M183928</link>
    <description>&lt;P&gt;Hi Bhargava&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;for producing gpio interrupts one can try below example (for can), add "interrupt-parent"&lt;/P&gt;
&lt;P&gt;&lt;A href="https://variwiki.com/index.php?title=VAR-SOM-MX8M-MINI-CAN" target="_blank"&gt;https://variwiki.com/index.php?title=VAR-SOM-MX8M-MINI-CAN&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;/P&gt;</description>
    <pubDate>Fri, 03 Dec 2021 09:58:48 GMT</pubDate>
    <dc:creator>igorpadykov</dc:creator>
    <dc:date>2021-12-03T09:58:48Z</dc:date>
    <item>
      <title>Unable to get interrupts for rotary encoder</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Unable-to-get-interrupts-for-rotary-encoder/m-p/1380973#M183913</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;We are working with a Rotary encoder from Grayhill (62A15-02-040C).&lt;/P&gt;&lt;P&gt;The SOM we are using is SMARC conga-SMX8-Mini based on iMX8M Mini.&lt;/P&gt;&lt;P&gt;The Rotary encoder is interfaced to GPIOs 9 and 10 for Channel A and Channel B respectively.&lt;/P&gt;&lt;P&gt;The device tree for the same goes as below which is in reference with the document Documentation/devicetree/bindings/input/rotary-encoder.txt&lt;/P&gt;&lt;P&gt;rotary@0 {&lt;BR /&gt;compatible = "rotary-encoder";&lt;BR /&gt;gpios = &amp;lt;&amp;amp;gpio1 9 1&amp;gt;, &amp;lt;&amp;amp;gpio1 10 0&amp;gt;;&lt;BR /&gt;linux,axis = &amp;lt;0&amp;gt;; /* REL_X */&lt;BR /&gt;rotary-encoder,encoding = "gray";&lt;BR /&gt;rotary-encoder,relative-axis;&lt;BR /&gt;rotary-encoder,steps-per-period = &amp;lt;2&amp;gt;;&lt;BR /&gt;status = "okay";&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;We are using the generic rotary encoder driver available in the kernel (drivers/input/misc/rotary_encoder.c).&lt;/P&gt;&lt;P&gt;The driver probes successfully with device registration and interrupts allocation.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;root@imx8mm-cgt-sx8m: cat /sys/kernel/debug/gpio&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;gpiochip0: GPIOs 0-31, parent: platform/30200000.gpio, 30200000.gpio:&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;gpio-1 ( |bkl pwm ) out hi &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;gpio-8 ( |enable ) out hi &lt;/STRONG&gt;&lt;BR /&gt;&lt;U&gt;&lt;STRONG&gt;gpio-9 ( |rotary@0 ) in lo IRQ ACTIVE LOW&lt;/STRONG&gt;&lt;/U&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;U&gt;gpio-10 ( |rotary@0 ) in lo IRQ&lt;/U&gt; &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;gpio-12 ( |regulator-usb ) out lo&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And the interrupts being:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;root@imx8mm-cgt-sx8m:~# cat /proc/interrupts&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;73: 0 gpio-mxc 9 Edge rotary-encoder&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;74: 0 gpio-mxc 10 Edge rotary-encoder&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When tested with evtest tool no events are reported.&lt;/P&gt;&lt;P&gt;root@imx8mm-cgt-sx8m:~# evtest&lt;BR /&gt;No device specified, trying to scan all of /dev/input/event*&lt;BR /&gt;Available devices:&lt;BR /&gt;/dev/input/event0: 30370000.snvs:snvs-powerkey&lt;BR /&gt;/dev/input/event1: rotary@0&lt;BR /&gt;/dev/input/event2: gpio-keys&lt;BR /&gt;/dev/input/event3: bd718xx-pwrkey&lt;BR /&gt;/dev/input/event4: PixArt Dell MS116 USB Optical Mouse&lt;BR /&gt;Select the device event number [0-4]: 1&lt;BR /&gt;Input driver version is 1.0.1&lt;BR /&gt;Input device ID: bus 0x19 vendor 0x0 product 0x0 version 0x0&lt;BR /&gt;Input device name: "rotary@0"&lt;BR /&gt;Supported events:&lt;BR /&gt;Event type 0 (EV_SYN)&lt;BR /&gt;Event type 2 (EV_REL)&lt;BR /&gt;Event code 1 (REL_Y)&lt;BR /&gt;Properties:&lt;BR /&gt;Testing ... (interrupt to exit)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The issue is from the rotary_encoder.c driver none of the interrupt handlers like rotary_encoder_irq, rotary_encoder_half_period_irq.. are called.&lt;/P&gt;&lt;P&gt;Is there anything else to be done for the rotary encoder to work? On the hardware we checked for the pulses when encoder is rotated.&lt;/P&gt;&lt;P&gt;Please provide leads since the issue is hindering our further development.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SOC: iMX8M Mini&lt;/P&gt;&lt;P&gt;Yocto Zeus&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Bhargava&lt;/P&gt;</description>
      <pubDate>Fri, 03 Dec 2021 05:01:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Unable-to-get-interrupts-for-rotary-encoder/m-p/1380973#M183913</guid>
      <dc:creator>Bhargava</dc:creator>
      <dc:date>2021-12-03T05:01:42Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to get interrupts for rotary encoder</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Unable-to-get-interrupts-for-rotary-encoder/m-p/1381195#M183928</link>
      <description>&lt;P&gt;Hi Bhargava&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;for producing gpio interrupts one can try below example (for can), add "interrupt-parent"&lt;/P&gt;
&lt;P&gt;&lt;A href="https://variwiki.com/index.php?title=VAR-SOM-MX8M-MINI-CAN" target="_blank"&gt;https://variwiki.com/index.php?title=VAR-SOM-MX8M-MINI-CAN&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;/P&gt;</description>
      <pubDate>Fri, 03 Dec 2021 09:58:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Unable-to-get-interrupts-for-rotary-encoder/m-p/1381195#M183928</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2021-12-03T09:58:48Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to get interrupts for rotary encoder</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Unable-to-get-interrupts-for-rotary-encoder/m-p/1381220#M183935</link>
      <description>&lt;P&gt;Hi Igor,&lt;/P&gt;&lt;P&gt;Thanks for responding.&lt;/P&gt;&lt;P&gt;I tried with the interrupt-parent but no success.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here rotary encoder is the input device, the device generates signals on GPIOs which have to be interpreted as interrupts. Is my understanding correct? Please through some light on this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Bhargava&lt;/P&gt;</description>
      <pubDate>Fri, 03 Dec 2021 10:34:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Unable-to-get-interrupts-for-rotary-encoder/m-p/1381220#M183935</guid>
      <dc:creator>Bhargava</dc:creator>
      <dc:date>2021-12-03T10:34:36Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to get interrupts for rotary encoder</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Unable-to-get-interrupts-for-rotary-encoder/m-p/1461953#M190674</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi Bhargava,&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/187730"&gt;@Bhargava&lt;/a&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I have the same problem . &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;please could you tell me how did you fix it &lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks for your answer.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 22 May 2022 10:10:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Unable-to-get-interrupts-for-rotary-encoder/m-p/1461953#M190674</guid>
      <dc:creator>zoob</dc:creator>
      <dc:date>2022-05-22T10:10:47Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to get interrupts for rotary encoder</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Unable-to-get-interrupts-for-rotary-encoder/m-p/1462900#M190740</link>
      <description>&lt;P&gt;Hi Zoob,&lt;/P&gt;&lt;P&gt;In my case there was an issue in configuring GPIOs for rotary encoder.&lt;/P&gt;&lt;P&gt;GPIO configuration in device tree ("gpios" property in DTS) must be proper in order for rotary to work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Bhargava&lt;/P&gt;</description>
      <pubDate>Tue, 24 May 2022 05:30:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Unable-to-get-interrupts-for-rotary-encoder/m-p/1462900#M190740</guid>
      <dc:creator>Bhargava</dc:creator>
      <dc:date>2022-05-24T05:30:30Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to get interrupts for rotary encoder</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Unable-to-get-interrupts-for-rotary-encoder/m-p/1462927#M190742</link>
      <description>&lt;P&gt;Thanks.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I fixed it yesterday. Everythng is working fine.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 May 2022 06:15:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Unable-to-get-interrupts-for-rotary-encoder/m-p/1462927#M190742</guid>
      <dc:creator>zoob</dc:creator>
      <dc:date>2022-05-24T06:15:53Z</dc:date>
    </item>
  </channel>
</rss>

