-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I2C based kernel module unable to claim IRQ 0 #4221
Comments
I think the Start by removing the unnecessary parts of the overlay - your device isn't an You may be reluctant to build your own kernel, but it is likely to be the quickest way to understand what is going wrong. Follow our guide here: https://www.raspberrypi.org/documentation/linux/kernel/building.md Start by putting |
I commented out the irq-gpio, interrupts etc. and it still throws that error. So that seems to be unrelated. |
That's why I described them as unnecessary, rather than harmful. |
Right yes, just wanted to report back. I'm currently building the kernel and see how that goes. |
Ok this is weird. I compiled the kernel, added the debug statements. Re-enabled the defintion for the IRQ GPIO pin and now it just works :) |
The current |
Updating to that kernel causes the driver to silently stop working, no errors related to it in dmesg. |
Always recompile and reinstall modules when you rebuild the kernel. |
I don't have access to the hw any more unfortunately but I would just regard this as fixed for now, its unlikely that the bug got fixed with some debug print statements. |
I want to use the tca8418 keyboard driver.
https://github.com/torvalds/linux/blob/master/drivers/input/keyboard/tca8418_keypad.c
Though in dmesg I hit this error in the driver: https://github.com/torvalds/linux/blob/master/drivers/input/keyboard/tca8418_keypad.c#L332
The device shows up just fine when using i2cdetect. The issue seems to be that it can't claim that IRQ for Pin 19, though I don't even know where it gets this specific IRQ from and where to even debug this further.
I also tried GPIO18 and GPIO26 with the same outcome.
Here is the used dts: https://pastebin.com/YLVqPsbk
Expected behaviour
Kernel module should be able to finish its probe of the I2C port successfully and claim the IRQ.
Actual behaviour
Kernel module fails to load with the error describe above
Which model of Raspberry Pi? e.g. Pi3B+, PiZeroW
Raspberry Pi CM4
Which OS and version (
cat /etc/rpi-issue
)?Raspberry Pi reference 2021-01-11
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 21090519d85bdaa1615d5d5057d37b09368ea5d2, stage4
Which firmware version (
vcgencmd version
)?Jan 8 2021 14:31:16
Copyright (c) 2012 Broadcom
version 194a85abd768c7334bbadc3f1911c10a7d18ed14 (clean) (release) (start)
Which kernel version (
uname -a
)?Linux raspberrypi 5.4.83-v7l+ BCM2708 I²C driver stops working sometimes #1379 SMP Mon Dec 14 13:11:54 GMT 2020 armv7l GNU/Linux
Logs
dmesg: https://pastebin.com/iuFWbqpz
config.txt: https://pastebin.com/vjj3qKVy
Addtional context
This is my documentation for how I compiled and enabled the module:
Clone and configure kernel with Pi defaults as described here but do not adjust the kernel version string
https://www.raspberrypi.org/documentation/linux/kernel/building.md
Then enable the TCA8418 driver with menuconfig as a module (use / to search for it)
https://www.raspberrypi.org/documentation/linux/kernel/configuring.md
The text was updated successfully, but these errors were encountered: