<?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>LPC MicrocontrollersのトピックLPC3250: how to configure IRQ for GPIO line?</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC3250-how-to-configure-IRQ-for-GPIO-line/m-p/1802874#M55361</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I work on a project that uses the LPC3250 board, which is connected to an external chip by a couple of GPIO pins. I need to set up IRQ for some of these lines to trigger an IRQ handler for incoming data.&lt;/P&gt;&lt;P&gt;Initially, this was developed using the 2.6 Linux kernel, and now it is being ported to a more recent 5.15 version. New kernels use the device tree to describe underlying hardware configuration and new GPIO descriptor-based API.&lt;/P&gt;&lt;P&gt;Inside the driver for the device, I try to use the gpiod_get_index() call to get the GPIO descriptor for each GPIO and then gpiod_to_irq() to get the IRQ number. The first call returns a valid descriptor, but the second one returns -EINVAL, like there's no valid IRQ entry. Looking into the Linux kernel GPIO code I can see that there's no GPIO consumer configured.&lt;/P&gt;&lt;P&gt;I'm interested in how to configure IRQ properly on this board. Maybe I need to make some modifications in the device tree file to describe the corresponding IRQ or something similar.&lt;/P&gt;</description>
    <pubDate>Tue, 06 Feb 2024 18:07:40 GMT</pubDate>
    <dc:creator>Shponka</dc:creator>
    <dc:date>2024-02-06T18:07:40Z</dc:date>
    <item>
      <title>LPC3250: how to configure IRQ for GPIO line?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC3250-how-to-configure-IRQ-for-GPIO-line/m-p/1802874#M55361</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I work on a project that uses the LPC3250 board, which is connected to an external chip by a couple of GPIO pins. I need to set up IRQ for some of these lines to trigger an IRQ handler for incoming data.&lt;/P&gt;&lt;P&gt;Initially, this was developed using the 2.6 Linux kernel, and now it is being ported to a more recent 5.15 version. New kernels use the device tree to describe underlying hardware configuration and new GPIO descriptor-based API.&lt;/P&gt;&lt;P&gt;Inside the driver for the device, I try to use the gpiod_get_index() call to get the GPIO descriptor for each GPIO and then gpiod_to_irq() to get the IRQ number. The first call returns a valid descriptor, but the second one returns -EINVAL, like there's no valid IRQ entry. Looking into the Linux kernel GPIO code I can see that there's no GPIO consumer configured.&lt;/P&gt;&lt;P&gt;I'm interested in how to configure IRQ properly on this board. Maybe I need to make some modifications in the device tree file to describe the corresponding IRQ or something similar.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Feb 2024 18:07:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC3250-how-to-configure-IRQ-for-GPIO-line/m-p/1802874#M55361</guid>
      <dc:creator>Shponka</dc:creator>
      <dc:date>2024-02-06T18:07:40Z</dc:date>
    </item>
  </channel>
</rss>

