LPC3250: how to configure IRQ for GPIO line?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

LPC3250: how to configure IRQ for GPIO line?

166件の閲覧回数
Shponka
Contributor I

Hi,

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.

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.

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.

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.

ラベル(1)
0 件の賞賛
0 返答(返信)