I am working on a character device driver that should print a character when a button is pressed using a GPIO interrupt. I created a kernel module with a GPIO-based interrupt. The driver (button-gpio) is successfully built into the image and is visible on the target device, but the interrupt is not getting triggered. The GPIO pin used is P9_23 (GPIO1_17). What could be the possible reasons?
I notice, that pin is used by SPI0. The bug could be due to any of the code, interaction between different bits of code, the way the code is built into binaries, the environment the code runs in (in particular the pin configuration for P9_23) or the physical wiring.
Test it on a different pin, e.g. P9_14 to narrow it down to the latter two (and hopefully reassure yourself it’s not the code).