Closed martinlbb closed 10 years ago
Hi Notro!
Thanks again for your wonderful work with TFT devices and this RPI power switch.
I've found a bug on RPI Power Switch. Basically, button stop working. Module is loaded (lsmod okay), but nothing happen. When checking IRQ (cat /proc/interrupts), there is no "Power button" interrupt.
IRQ registration in rpi_power_switch code allow anything to delete this IRQ, as there is no cookie declared (last arguments). See http://www.makelinux.net/books/lkd2/ch06lev1sec3 for explanation.
I just added cookie declaration, and everything work perfectly since them.
Thanks, you might want to alert Sean Cross (or Adafruit) as well, since he wrote the module.
I'll do it
On some condition, when driver initialize, IRQ is forgotten/deleted by system. Power switch is no longer useable (no powerdown when clicking. Kernel detect clicking, but can send an IRQ as it does not longer exist). Main cause is IRQ request is not link with a cookie, allowing any to delete it. When setting a cookie, everything works fine.