- 积分
- 44
贡献6
飞刀0 FD
注册时间2011-7-31
在线时间14 小时
扫一扫,手机访问本帖
|
Linux 2.6.36.2
Ubuntu 10.04
我想编写GPIO-KEYS的中断驱动程序,由于板子上的系统已经使用了相关中断号
所以只有释放周才能使用
使用 free_irq(IRQ_EINT(0),NULL) 来释放中断
但是cat /proc/kmsg 有如下提示- <4>------------[ cut here ]------------
- <4>WARNING: at kernel/irq/manage.c:899 __free_irq+0x9c/0x1ac()
- <4>[b]Trying to free already-free IRQ 101[/b]
- <4>Modules linked in: button2(+) [last unloaded: button2]
- <4>[<c0037a8c>] (unwind_backtrace+0x0/0xfc) from [<c04ac5f8>] (dump_stack+0x18/0x1c)
- <4>[<c04ac5f8>] (dump_stack+0x18/0x1c) from [<c004c54c>] (warn_slowpath_common+0x54/0x6c)
- <4>[<c004c54c>] (warn_slowpath_common+0x54/0x6c) from [<c004c608>] (warn_slowpath_fmt+0x38/0x40)
- <4>[<c004c608>] (warn_slowpath_fmt+0x38/0x40) from [<c0082dbc>] (__free_irq+0x9c/0x1ac)
- <4>[<c0082dbc>] (__free_irq+0x9c/0x1ac) from [<c0082f10>] (free_irq+0x44/0x64)
- <4>[<c0082f10>] (free_irq+0x44/0x64) from [<bf006054>] (button2_init+0x34/0x58 [button2])
- <4>[<bf006054>] (button2_init+0x34/0x58 [button2]) from [<c0031378>] (do_one_initcall+0x38/0x1ac)
- <4>[<c0031378>] (do_one_initcall+0x38/0x1ac) from [<c007e894>] (sys_init_module+0xb8/0x1cc)
- <4>[<c007e894>] (sys_init_module+0xb8/0x1cc) from [<c0031a20>] (ret_fast_syscall+0x0/0x30)
- <4>---[ end trace 69130b5f71451ee3 ]---
- <4>------------[ cut here ]------------
- <4>WARNING: at kernel/irq/manage.c:899 __free_irq+0x9c/0x1ac()
- <4>[b]Trying to free already-free IRQ 102[/b]
- <4>Modules linked in: button2(+) [last unloaded: button2]
- <4>[<c0037a8c>] (unwind_backtrace+0x0/0xfc) from [<c04ac5f8>] (dump_stack+0x18/0x1c)
- <4>[<c04ac5f8>] (dump_stack+0x18/0x1c) from [<c004c54c>] (warn_slowpath_common+0x54/0x6c)
- <4>[<c004c54c>] (warn_slowpath_common+0x54/0x6c) from [<c004c608>] (warn_slowpath_fmt+0x38/0x40)
- <4>[<c004c608>] (warn_slowpath_fmt+0x38/0x40) from [<c0082dbc>] (__free_irq+0x9c/0x1ac)
- <4>[<c0082dbc>] (__free_irq+0x9c/0x1ac) from [<c0082f10>] (free_irq+0x44/0x64)
- <4>[<c0082f10>] (free_irq+0x44/0x64) from [<bf006054>] (button2_init+0x34/0x58 [button2])
- <4>[<bf006054>] (button2_init+0x34/0x58 [button2]) from [<c0031378>] (do_one_initcall+0x38/0x1ac)
- <4>[<c0031378>] (do_one_initcall+0x38/0x1ac) from [<c007e894>] (sys_init_module+0xb8/0x1cc)
- <4>[<c007e894>] (sys_init_module+0xb8/0x1cc) from [<c0031a20>] (ret_fast_syscall+0x0/0x30)
- <4>---[ end trace 69130b5f71451ee4 ]---
- <4>------------[ cut here ]------------
- <4>WARNING: at kernel/irq/manage.c:899 __free_irq+0x9c/0x1ac()
- <4>[b]Trying to free already-free IRQ 103[/b]
- <4>Modules linked in: button2(+) [last unloaded: button2]
- <4>[<c0037a8c>] (unwind_backtrace+0x0/0xfc) from [<c04ac5f8>] (dump_stack+0x18/0x1c)
- <4>[<c04ac5f8>] (dump_stack+0x18/0x1c) from [<c004c54c>] (warn_slowpath_common+0x54/0x6c)
- <4>[<c004c54c>] (warn_slowpath_common+0x54/0x6c) from [<c004c608>] (warn_slowpath_fmt+0x38/0x40)
- <4>[<c004c608>] (warn_slowpath_fmt+0x38/0x40) from [<c0082dbc>] (__free_irq+0x9c/0x1ac)
- <4>[<c0082dbc>] (__free_irq+0x9c/0x1ac) from [<c0082f10>] (free_irq+0x44/0x64)
- <4>[<c0082f10>] (free_irq+0x44/0x64) from [<bf006054>] (button2_init+0x34/0x58 [button2])
- <4>[<bf006054>] (button2_init+0x34/0x58 [button2]) from [<c0031378>] (do_one_initcall+0x38/0x1ac)
- <4>[<c0031378>] (do_one_initcall+0x38/0x1ac) from [<c007e894>] (sys_init_module+0xb8/0x1cc)
- <4>[<c007e894>] (sys_init_module+0xb8/0x1cc) from [<c0031a20>] (ret_fast_syscall+0x0/0x30)
- <4>---[ end trace 69130b5f71451ee5 ]---
- <4>------------[ cut here ]------------
- <4>WARNING: at kernel/irq/manage.c:899 __free_irq+0x9c/0x1ac()
- <4>[b]Trying to free already-free IRQ 104[/b]
- <4>Modules linked in: button2(+) [last unloaded: button2]
- <4>[<c0037a8c>] (unwind_backtrace+0x0/0xfc) from [<c04ac5f8>] (dump_stack+0x18/0x1c)
- <4>[<c04ac5f8>] (dump_stack+0x18/0x1c) from [<c004c54c>] (warn_slowpath_common+0x54/0x6c)
- <4>[<c004c54c>] (warn_slowpath_common+0x54/0x6c) from [<c004c608>] (warn_slowpath_fmt+0x38/0x40)
- <4>[<c004c608>] (warn_slowpath_fmt+0x38/0x40) from [<c0082dbc>] (__free_irq+0x9c/0x1ac)
- <4>[<c0082dbc>] (__free_irq+0x9c/0x1ac) from [<c0082f10>] (free_irq+0x44/0x64)
- <4>[<c0082f10>] (free_irq+0x44/0x64) from [<bf006054>] (button2_init+0x34/0x58 [button2])
- <4>[<bf006054>] (button2_init+0x34/0x58 [button2]) from [<c0031378>] (do_one_initcall+0x38/0x1ac)
- <4>[<c0031378>] (do_one_initcall+0x38/0x1ac) from [<c007e894>] (sys_init_module+0xb8/0x1cc)
- <4>[<c007e894>] (sys_init_module+0xb8/0x1cc) from [<c0031a20>] (ret_fast_syscall+0x0/0x30)
- <4>---[ end trace 69130b5f71451ee6 ]---
- <4>------------[ cut here ]------------
- <4>WARNING: at kernel/irq/manage.c:899 __free_irq+0x9c/0x1ac()
- <4>[b]Trying to free already-free IRQ 105[/b]
- <4>Modules linked in: button2(+) [last unloaded: button2]
- <4>[<c0037a8c>] (unwind_backtrace+0x0/0xfc) from [<c04ac5f8>] (dump_stack+0x18/0x1c)
- <4>[<c04ac5f8>] (dump_stack+0x18/0x1c) from [<c004c54c>] (warn_slowpath_common+0x54/0x6c)
- <4>[<c004c54c>] (warn_slowpath_common+0x54/0x6c) from [<c004c608>] (warn_slowpath_fmt+0x38/0x40)
- <4>[<c004c608>] (warn_slowpath_fmt+0x38/0x40) from [<c0082dbc>] (__free_irq+0x9c/0x1ac)
- <4>[<c0082dbc>] (__free_irq+0x9c/0x1ac) from [<c0082f10>] (free_irq+0x44/0x64)
- <4>[<c0082f10>] (free_irq+0x44/0x64) from [<bf006054>] (button2_init+0x34/0x58 [button2])
- <4>[<bf006054>] (button2_init+0x34/0x58 [button2]) from [<c0031378>] (do_one_initcall+0x38/0x1ac)
- <4>[<c0031378>] (do_one_initcall+0x38/0x1ac) from [<c007e894>] (sys_init_module+0xb8/0x1cc)
- <4>[<c007e894>] (sys_init_module+0xb8/0x1cc) from [<c0031a20>] (ret_fast_syscall+0x0/0x30)
- <4>---[ end trace 69130b5f71451ee7 ]---
- <4>------------[ cut here ]------------
- <4>WARNING: at kernel/irq/manage.c:899 __free_irq+0x9c/0x1ac()
- <4>[b]Trying to free already-free IRQ 106[/b]
- <4>Modules linked in: button2(+) [last unloaded: button2]
- <4>[<c0037a8c>] (unwind_backtrace+0x0/0xfc) from [<c04ac5f8>] (dump_stack+0x18/0x1c)
- <4>[<c04ac5f8>] (dump_stack+0x18/0x1c) from [<c004c54c>] (warn_slowpath_common+0x54/0x6c)
- <4>[<c004c54c>] (warn_slowpath_common+0x54/0x6c) from [<c004c608>] (warn_slowpath_fmt+0x38/0x40)
- <4>[<c004c608>] (warn_slowpath_fmt+0x38/0x40) from [<c0082dbc>] (__free_irq+0x9c/0x1ac)
- <4>[<c0082dbc>] (__free_irq+0x9c/0x1ac) from [<c0082f10>] (free_irq+0x44/0x64)
- <4>[<c0082f10>] (free_irq+0x44/0x64) from [<bf006054>] (button2_init+0x34/0x58 [button2])
- <4>[<bf006054>] (button2_init+0x34/0x58 [button2]) from [<c0031378>] (do_one_initcall+0x38/0x1ac)
- <4>[<c0031378>] (do_one_initcall+0x38/0x1ac) from [<c007e894>] (sys_init_module+0xb8/0x1cc)
- <4>[<c007e894>] (sys_init_module+0xb8/0x1cc) from [<c0031a20>] (ret_fast_syscall+0x0/0x30)
- <4>---[ end trace 69130b5f71451ee8 ]---
复制代码 查看 cat/proc/interrupts 原来的中断BUTTON依旧在,请教解决方法,或者求教系统自带的GPIO-KEYS的驱动的调用方法
顺便告诉一下 GPIO-KEYS驱动的示例程序和驱动程序的位置,懒得找的话说个文件名也行.... |
|