DreamRoad

硬件设计、嵌入式软件、Linux

exynos4412_迅为开发板gpio的操作

当使用有复用的gpio,在内核中解除后,重新编译内核烧写到开发板,以模块方式打开新设备时,出现以下问题的解决方法

[  108.272880] WARNING: at drivers/gpio/gpiolib.c:101 gpio_ensure_requested+0x5c/0x118()
[  108.280681] autorequest GPIO-7
[  108.283719] Modules linked in: sht11_test
[  108.287712] Backtrace: 
[  108.290154] [<c0049e70>] (dump_backtrace+0x0/0x11c) from [<c059a764>] (dump_stack+0x18/0x1c)
[  108.298563]  r6:c0860bb4 r5:00000065 r4:d49c1d08 r3:d49c0000
[  108.304211] [<c059a74c>] (dump_stack+0x0/0x1c) from [<c0080520>] (warn_slowpath_common+0x5c/0x6c)
[  108.313063] [<c00804c4>] (warn_slowpath_common+0x0/0x6c) from [<c00805d4>] (warn_slowpath_fmt+0x38/0x40)
[  108.322519]  r8:00000007 r7:00000000 r6:c099f4f4 r5:c09010b0 r4:c099f4f8
[  108.329029] r3:00000009
[  108.331638] [<c008059c>] (warn_slowpath_fmt+0x0/0x40) from [<c022f4c8>] (gpio_ensure_requested+0x5c/0x118)
[  108.341268]  r3:00000007 r2:c0860bcc
[  108.344831] [<c022f46c>] (gpio_ensure_requested+0x0/0x118) from [<c022fc00>] (gpio_direction_output+0x98/0x100)
[  108.354904] [<c022fb68>] (gpio_direction_output+0x0/0x100) from [<bf0001b8>] (I2C_Init+0x18/0x28 [sht11_test])
[  108.364884] [<bf0001a0>] (I2C_Init+0x0/0x28 [sht11_test]) from [<bf0001d8>] (sht11_open+0x10/0x24 [sht11_test])
[  108.374953] [<bf0001c8>] (sht11_open+0x0/0x24 [sht11_test]) from [<c0111398>] (chrdev_open+0x124/0x1f4)
[  108.384326] [<c0111274>] (chrdev_open+0x0/0x1f4) from [<c010ba58>] (__dentry_open+0x164/0x2d8)
[  108.392914]  r7:d59e1be8 r6:d62cd820 r5:d582e220 r4:d4851640
[  108.398560] [<c010b8f4>] (__dentry_open+0x0/0x2d8) from [<c010bcac>] (nameidata_to_filp+0x68/0x70)
[  108.407502] [<c010bc44>] (nameidata_to_filp+0x0/0x70) from [<c011b0b0>] (do_last+0xc8/0x700)
[  108.415916]  r7:00000026 r6:00000000 r5:00000902 r4:d49c1ed0
[  108.421562] [<c011afe8>] (do_last+0x0/0x700) from [<c011bb9c>] (path_openat+0xc4/0x3c4)
[  108.429548] [<c011bad8>] (path_openat+0x0/0x3c4) from [<c011bf98>] (do_filp_open+0x38/0x8c)
[  108.437880] [<c011bf60>] (do_filp_open+0x0/0x8c) from [<c010b7f4>] (do_sys_open+0xe0/0x1a4)
[  108.446209]  r8:00000001 r7:ffffff9c r6:00000003 r5:00000902 r4:d6351000
[  108.452897] [<c010b714>] (do_sys_open+0x0/0x1a4) from [<c010b8f0>] (sys_open+0x24/0x28)
[  108.460883] [<c010b8cc>] (sys_open+0x0/0x28) from [<c0045940>] (ret_fast_syscall+0x0/0x30)
[  108.469125] ---[ end trace d03bf197bac8f492 ]--

在gpio_direction_output(gpio,1);之前加上gpio_request(gpio, NULL);即可解决

阅读更多
版权声明:原创文章转载请注明出处。 https://blog.csdn.net/wwt18811707971/article/details/50951183
文章标签: 嵌入式学习 itop4412
个人分类: itop4412相关学习
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

不良信息举报

exynos4412_迅为开发板gpio的操作

最多只允许输入30个字

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭