<?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: PCA9698 IO expander - Interrupt support with pca953x linux driver in Other NXP Products</title>
    <link>https://community.nxp.com/t5/Other-NXP-Products/PCA9698-IO-expander-Interrupt-support-with-pca953x-linux-driver/m-p/1472413#M14318</link>
    <description>&lt;P&gt;Hello Jonah,&lt;/P&gt;
&lt;P&gt;I hope this response finds you well.&lt;/P&gt;
&lt;P&gt;Are you planning to use the interrupt pin (open-drain active LOW)? This pin will be activated when one of the port pins changes state and the port pin is configured as an input and the interrupt on it is not masked.&lt;/P&gt;
&lt;P&gt;I assume that the driver is not masking the interrupts. In this case, you must set up the&amp;nbsp; &lt;STRONG&gt;MSK0 to MSK4&lt;/STRONG&gt; registers. The interrupts are not generated by default.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="diazmarin09_0-1654894356756.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/183035iBD31DE57CD2CCAC0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="diazmarin09_0-1654894356756.png" alt="diazmarin09_0-1654894356756.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;So, I do recommend to review the source code and make sure it is setting up the MSK registers.&lt;/P&gt;
&lt;P&gt;You may find further information at the chapter &lt;STRONG&gt;7.4.5&lt;/STRONG&gt; from &lt;A href="https://www.nxp.com/docs/en/data-sheet/PCA9698.pdf" target="_blank"&gt;datasheet&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;I hope this information will be useful for you.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;David&lt;/P&gt;</description>
    <pubDate>Fri, 10 Jun 2022 20:52:50 GMT</pubDate>
    <dc:creator>diazmarin09</dc:creator>
    <dc:date>2022-06-10T20:52:50Z</dc:date>
    <item>
      <title>PCA9698 IO expander - Interrupt support with pca953x linux driver</title>
      <link>https://community.nxp.com/t5/Other-NXP-Products/PCA9698-IO-expander-Interrupt-support-with-pca953x-linux-driver/m-p/1472228#M14313</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm currently working on integrating a number of PCA9698 gpio expanders into an embedded Linux system and wanted to make use of the interrupt functionality that these chips have.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've been able to configure the device tree to recognise these and can read the IO on a polling basis, but it seems like the driver does not set up interrupts for these devices.&lt;/P&gt;&lt;P&gt;I noticed that in the pca953x driver, the PCA_INT bit is not set in the device id struct for the 9698 (screenshot below, driver code found &lt;A title="pca953x driver github" href="https://github.com/torvalds/linux/blob/master/drivers/gpio/gpio-pca953x.c" target="_self"&gt;here&lt;/A&gt;), does this mean that the driver currently does not support interrupt functionality for this particular IO expander?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JonahW_0-1654861587451.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/182994i9C429A6B21B16A03/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JonahW_0-1654861587451.png" alt="JonahW_0-1654861587451.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thanks for any help you can provide in advance,&lt;/P&gt;&lt;P&gt;Jonah&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jun 2022 11:53:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Other-NXP-Products/PCA9698-IO-expander-Interrupt-support-with-pca953x-linux-driver/m-p/1472228#M14313</guid>
      <dc:creator>JonahW</dc:creator>
      <dc:date>2022-06-10T11:53:03Z</dc:date>
    </item>
    <item>
      <title>Re: PCA9698 IO expander - Interrupt support with pca953x linux driver</title>
      <link>https://community.nxp.com/t5/Other-NXP-Products/PCA9698-IO-expander-Interrupt-support-with-pca953x-linux-driver/m-p/1472413#M14318</link>
      <description>&lt;P&gt;Hello Jonah,&lt;/P&gt;
&lt;P&gt;I hope this response finds you well.&lt;/P&gt;
&lt;P&gt;Are you planning to use the interrupt pin (open-drain active LOW)? This pin will be activated when one of the port pins changes state and the port pin is configured as an input and the interrupt on it is not masked.&lt;/P&gt;
&lt;P&gt;I assume that the driver is not masking the interrupts. In this case, you must set up the&amp;nbsp; &lt;STRONG&gt;MSK0 to MSK4&lt;/STRONG&gt; registers. The interrupts are not generated by default.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="diazmarin09_0-1654894356756.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/183035iBD31DE57CD2CCAC0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="diazmarin09_0-1654894356756.png" alt="diazmarin09_0-1654894356756.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;So, I do recommend to review the source code and make sure it is setting up the MSK registers.&lt;/P&gt;
&lt;P&gt;You may find further information at the chapter &lt;STRONG&gt;7.4.5&lt;/STRONG&gt; from &lt;A href="https://www.nxp.com/docs/en/data-sheet/PCA9698.pdf" target="_blank"&gt;datasheet&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;I hope this information will be useful for you.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;David&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jun 2022 20:52:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Other-NXP-Products/PCA9698-IO-expander-Interrupt-support-with-pca953x-linux-driver/m-p/1472413#M14318</guid>
      <dc:creator>diazmarin09</dc:creator>
      <dc:date>2022-06-10T20:52:50Z</dc:date>
    </item>
    <item>
      <title>Re: PCA9698 IO expander - Interrupt support with pca953x linux driver</title>
      <link>https://community.nxp.com/t5/Other-NXP-Products/PCA9698-IO-expander-Interrupt-support-with-pca953x-linux-driver/m-p/1472821#M14334</link>
      <description>&lt;P&gt;Hi David,&lt;/P&gt;&lt;P&gt;Thanks for your quick response&lt;/P&gt;&lt;P&gt;Yes I was planning on using the interrupt pin, and I think you're right that setting of the MSK registers might not be happening in the driver code.&lt;/P&gt;&lt;P&gt;Something else I've realised since Friday is that the driver has no way of handling the SMbus Alert functionality that I was planning on using, so I will have to write some new code for this.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jonah&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jun 2022 10:07:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Other-NXP-Products/PCA9698-IO-expander-Interrupt-support-with-pca953x-linux-driver/m-p/1472821#M14334</guid>
      <dc:creator>JonahW</dc:creator>
      <dc:date>2022-06-13T10:07:36Z</dc:date>
    </item>
    <item>
      <title>Re: PCA9698 IO expander - Interrupt support with pca953x linux driver</title>
      <link>https://community.nxp.com/t5/Other-NXP-Products/PCA9698-IO-expander-Interrupt-support-with-pca953x-linux-driver/m-p/1480599#M14470</link>
      <description>&lt;P&gt;Hi David,&lt;/P&gt;&lt;P&gt;Just an update on this in case anyone ever has a similar problem,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I added the MSK registers to the regmap that the driver configures, and then created a separate pca9698_init function specifically for the 9698 chip that is called in the probe function (mainly copying the existing init function for the PCA957x that was already there). In this new init function I set all of the MSK registers to 0 to configure all inputs to trigger interrupts.&lt;/P&gt;&lt;P&gt;I also added a simple I2C write to this init function to set the mode register (0x2A) to 0x12, which enables SmBus Alert functionality.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JonahW_0-1656334151397.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/184762i6046971AB6883191/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JonahW_0-1656334151397.png" alt="JonahW_0-1656334151397.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;With these changes to the driver I can now query address 0x0C on the i2c bus and the 9698 that pulled the interrupt line low will reply with its address successfully.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jonah&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jun 2022 12:54:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Other-NXP-Products/PCA9698-IO-expander-Interrupt-support-with-pca953x-linux-driver/m-p/1480599#M14470</guid>
      <dc:creator>JonahW</dc:creator>
      <dc:date>2022-06-27T12:54:36Z</dc:date>
    </item>
    <item>
      <title>Re: PCA9698 IO expander - Interrupt support with pca953x linux driver</title>
      <link>https://community.nxp.com/t5/Other-NXP-Products/PCA9698-IO-expander-Interrupt-support-with-pca953x-linux-driver/m-p/1881403#M22973</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;We are using PCA9698 connecting I2C over IMX8qm at out project. We connect 3 leds and 3 button to PCA6968. I can control led on linux bash as on/off but I didnt control button interrupt. I add the buttons into DTS gpio-keys. What can I do for solving this interrupt problem ? Can you share the source code of&amp;nbsp;pc9698 that you are sure. ?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2024 09:11:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Other-NXP-Products/PCA9698-IO-expander-Interrupt-support-with-pca953x-linux-driver/m-p/1881403#M22973</guid>
      <dc:creator>HAKANAYDN</dc:creator>
      <dc:date>2024-06-05T09:11:05Z</dc:date>
    </item>
  </channel>
</rss>

