<?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 configure device tree for external interrupt as input on imx8qp? in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/How-to-configure-device-tree-for-external-interrupt-as-input-on/m-p/1750402#M215068</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/201299"&gt;@Dhruvit&lt;/a&gt;&amp;nbsp;, thanks for your reply. I've just found issue. I have copied device tree and there was configured the same pin for another device. I've removed this pin configuration but left gpio_hog for this pin number. So I've applied the changes and it works fine on runtime:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt; &amp;amp;lsio_gpio3 {
        pinctrl-names = "default";
        pinctrl-0 = &amp;lt;&amp;amp;pinctrl_mipi_csi0&amp;gt;;
-
-       cam_buf_hog {
-               gpio-hog;
-               gpios = &amp;lt;24 0&amp;gt;;
-               output-high;
-               line-name = "cam_buf_en";
-       };
 };&lt;/LI-CODE&gt;&lt;P&gt;Best regards, Anton.&lt;/P&gt;</description>
    <pubDate>Wed, 01 Nov 2023 16:15:03 GMT</pubDate>
    <dc:creator>Anton_K</dc:creator>
    <dc:date>2023-11-01T16:15:03Z</dc:date>
    <item>
      <title>How to configure device tree for external interrupt as input on imx8qp?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-configure-device-tree-for-external-interrupt-as-input-on/m-p/1749381#M214979</link>
      <description>&lt;P&gt;Hello, I need to configure device tree correctly. I have I2C sensor driver which also has interrupt on output. On the source code it uses&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;request_threaded_irq(6) with the following inputs:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;request_threaded_irq(client-&amp;gt;irq, NULL, bh1770_irq, IRQF_TRIGGER_FALLING | IRQF_ONESHOT | IRQF_TRIGGER_LOW, "bh1770", chip);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I got access to I2C buss correctly by device tree, but can't configure external interrupt...&lt;BR /&gt;I've assumed the following configuration:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;&amp;amp;i2c3 {
	#address-cells = &amp;lt;1&amp;gt;;
	#size-cells = &amp;lt;0&amp;gt;;
	clock-frequency = &amp;lt;100000&amp;gt;;
	pinctrl-names = "default";
	pinctrl-0 = &amp;lt;&amp;amp;pinctrl_lpi2c3&amp;gt;;
	status = "okay";

	/* Light sensor */
	bh1770: bh1770@38 {
		compatible = "osram,bh1770";
		pinctrl-names = "default";
		pinctrl-0 = &amp;lt;&amp;amp;pinctrl_bh1770&amp;gt;;
		reg = &amp;lt;0x38&amp;gt;;
		interrupt-parent = &amp;lt;&amp;amp;lsio_gpio3&amp;gt;;
		interrupts = &amp;lt;24 IRQ_TYPE_EDGE_FALLING&amp;gt;;
		status = "okay";
	};
};

&amp;amp;iomuxc {
...
	pinctrl_bh1770: bh1770grp {
		fsl,pins = &amp;lt;
			IMX8QXP_QSPI0B_SS1_B_LSIO_GPIO3_IO24		0x21
		&amp;gt;;
	};
...
};&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Actually I got error -22 (looks like&amp;nbsp;&lt;SPAN&gt;EINVAL&lt;/SPAN&gt;&lt;SPAN&gt;) just on runtime by&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;request_threaded_irq().&lt;BR /&gt;Can someone help me, what do I wrong?&lt;BR /&gt;Thanks in advance, Anton&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Oct 2023 09:24:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-configure-device-tree-for-external-interrupt-as-input-on/m-p/1749381#M214979</guid>
      <dc:creator>Anton_K</dc:creator>
      <dc:date>2023-10-31T09:24:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure device tree for external interrupt as input on imx8qp?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-configure-device-tree-for-external-interrupt-as-input-on/m-p/1749521#M214987</link>
      <description>&lt;P&gt;UPD: I've changed pin mux configuration in dtsi file according reference manual as the&amp;nbsp;LSIO_GPIO3_IO24 to:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;IMX8QXP_QSPI0B_SS1_B_LSIO_GPIO3_IO24	0x26000021&lt;/LI-CODE&gt;&lt;P&gt;But it doesn't help. Also I got extra log in dmesg:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;genirq: Failed to request resources for bh1770 (irq 295) on irqchip gpio-mxc&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;I have no idea why irq got number 295, may be there is the reason? Hot to understand where that number setup and what should be?&lt;/P&gt;</description>
      <pubDate>Tue, 31 Oct 2023 11:28:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-configure-device-tree-for-external-interrupt-as-input-on/m-p/1749521#M214987</guid>
      <dc:creator>Anton_K</dc:creator>
      <dc:date>2023-10-31T11:28:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure device tree for external interrupt as input on imx8qp?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-configure-device-tree-for-external-interrupt-as-input-on/m-p/1750261#M215057</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/209639"&gt;@Anton_K&lt;/a&gt;,&lt;/P&gt;
&lt;DIV&gt;I hope you are doing well&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Kindly share your full device tree file and the driver code to further debug the issue.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Thanks &amp;amp; Regards,&lt;/DIV&gt;
&lt;DIV&gt;Dhruvit Vasavada&lt;/DIV&gt;</description>
      <pubDate>Wed, 01 Nov 2023 12:36:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-configure-device-tree-for-external-interrupt-as-input-on/m-p/1750261#M215057</guid>
      <dc:creator>Dhruvit</dc:creator>
      <dc:date>2023-11-01T12:36:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure device tree for external interrupt as input on imx8qp?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-configure-device-tree-for-external-interrupt-as-input-on/m-p/1750402#M215068</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/201299"&gt;@Dhruvit&lt;/a&gt;&amp;nbsp;, thanks for your reply. I've just found issue. I have copied device tree and there was configured the same pin for another device. I've removed this pin configuration but left gpio_hog for this pin number. So I've applied the changes and it works fine on runtime:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt; &amp;amp;lsio_gpio3 {
        pinctrl-names = "default";
        pinctrl-0 = &amp;lt;&amp;amp;pinctrl_mipi_csi0&amp;gt;;
-
-       cam_buf_hog {
-               gpio-hog;
-               gpios = &amp;lt;24 0&amp;gt;;
-               output-high;
-               line-name = "cam_buf_en";
-       };
 };&lt;/LI-CODE&gt;&lt;P&gt;Best regards, Anton.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Nov 2023 16:15:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-configure-device-tree-for-external-interrupt-as-input-on/m-p/1750402#M215068</guid>
      <dc:creator>Anton_K</dc:creator>
      <dc:date>2023-11-01T16:15:03Z</dc:date>
    </item>
  </channel>
</rss>

