From: Dave H. <dhy...@gm...> - 2005-11-07 07:33:46
|
Hi Andy, > Anyway, I copied this file hello.ko over to the gumstix after I > compiled it, using wget and I run > insmod hello.ko > insmod: cannot insert `hello.ko': Unknown symbol in module (-1): No > such file or directory Looking into asm/arch-pxa/irqs.h it would appear that IRQ_TO_GPIO_2_80 is now called IRQ_TO_GPIO_2_x The only reference to set_GPIO_IRQ_edge that I found was in include/asm/arch-ixp2000/gpio.h It's failing to load because it can't find that symbol. All of the sample code you've gotten is designed for the 2.4 kernel. All of the interrupt handling has been changed in the 2.6 kernel. I think that you want to do something like the following: #include <asm/arch/pxa-regs.h> #include <asm/irq.h> #define GPIO_MY_FOO 62 #define MY_FOO_IRQ IRQ_GPIO( GPIO_MY_FOO ) =09pxa_gpio_mode( 62 | GPIO_IN ); =09set_irq_type( MY_FOO_IRQ, IRQT_FALLING ); request_irq( MY_FOO_IRQ, ... other args... ); You should also make sure that you call free_irq in your exit routine or very bad things will happen if an irq comes along and your module is unloaded. -- Dave Hylands Vancouver, BC, Canada http://www.DaveHylands.com/ |