[FAQ05342] [GPIO]获取系统睡眠时GPIO状态的方法 |
FAQ Content
可以透過下指令的方式再 把 mobile log 抓回來看
1.開機後先執行下面這道指令
MT6589: echo 1 > /sys/module/mt_sleep/parameters/slp_dump_gpio
MT657X: echo 1 > /sys/module/mt657x_sleep/parameters/slp_dump_gpio
其中MT657X,表示MT6577、MT6575等
2.確認 Mobile log 已經打開 3.USB 拔掉 4.按幾次power key suspend /resume 5.之後把 mobile log 抓回來 在kernel log里搜尋一下 Chip_pm_enter就可以找到如下面红色字体内容显示的 GPIO pin 的狀態
MT6589:
<5>[ 171.745746]-0)[SLP] @@@@@@@@@@@@@@@@@@@@
<2>[ 171.745756]-0)[SLP] Chip_pm_enter <5>[ 171.745762]-0)[SLP] @@@@@@@@@@@@@@@@@@@@ <4>[ 171.745770]-0)PIN: [MODE] [PULL_SEL] [DIN] [DOUT] [PULL EN] [DIR] [INV] [IES] <4>[ 171.745787]-0)idx = 0: 1 0 0 0 1 0 0 1 <4>[ 171.745799]-0)idx = 1: 1 0 0 0 1 0 0 1 <4>[ 171.745811]-0)idx = 2: 1 0 0 0 1 0 0 1 <4>[ 171.745823]-0)idx = 3: 1 0 0 0 1 0 0 1 <4>[ 171.745835]-0)idx = 4: 1 0 1 1 0 1 0 1 <4>[ 171.745847]-0)idx = 5: 1 0 1 0 1 0 0 1 <4>[ 171.745859]-0)idx = 6: 1 0 0 0 1 1 0 1 <4>[ 171.745871]-0)idx = 7: 1 0 0 0 1 0 0 1 <4>[ 171.745883]-0)idx = 8: 1 0 0 0 1 0 0 1 <4>[ 171.745895]-0)idx = 9: 1 0 0 0 1 0 0 1 <4>[ 171.745907]-0)idx = 10: 1 0 0 0 1 0 0 1 <4>[ 171.745919]-0)idx = 11: 0 0 0 0 1 0 0 1
...
或者MT657X:
<5>[ 4584.601736] (0)[32:kworker/u:1][Power/Sleep] @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
<5>[ 4584.601748] (0)[32:kworker/u:1][Power/Sleep] _Chip_pm_enter @@@@@@@@@@@@@@@@@@@@@@ <5>[ 4584.601759] (0)[32:kworker/u:1][Power/Sleep] @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ <4>[ 4584.601774] (0)[32:kworker/u:1]idx = 0: mode = 0, pullsel = 0, din = 0, dout = 0, pullen = 1, dir = 0, dinv = 0 <4>[ 4584.601788] (0)[32:kworker/u:1]idx = 1: mode = 0, pullsel = 0, din = 0, dout = 0, pullen = 1, dir = 0, dinv = 0 <4>[ 4584.601802] (0)[32:kworker/u:1]idx = 2: mode = 0, pullsel = 0, din = 0, dout = 0, pullen = 1, dir = 0, dinv = 0 <4>[ 4584.601816] (0)[32:kworker/u:1]idx = 3: mode = 0, pullsel = 0, din = 0, dout = 0, pullen = 1, dir = 0, dinv = 0 <4>[ 4584.601830] (0)[32:kworker/u:1]idx = 4: mode = 0, pullsel = 0, din = 0, dout = 0, pullen = 1, dir = 0, dinv = 0 <4>[ 4584.601843] (0)[32:kworker/u:1]idx = 5: mode = 0, pullsel = 0, din = 0, dout = 0, pullen = 1, dir = 0, dinv = 0 <4>[ 4584.601857] (0)[32:kworker/u:1]idx = 6: mode = 0, pullsel = 0, din = 0, dout = 0, pullen = 1, dir = 0, dinv = 0 <4>[ 4584.601870] (0)[32:kworker/u:1]idx = 7: mode = 0, pullsel = 0, din = 0, dout = 0, pullen = 1, dir = 0, dinv = 0 <4>[ 4584.601883] (0)[32:kworker/u:1]idx = 8: mode = 0, pullsel = 0, din = 0, dout = 0, pullen = 1, dir = 0, dinv = 0 <4>[ 4584.601897] (0)[32:kworker/u:1]idx = 9: mode = 0, pullsel = 0, din = 0, dout = 0, pullen = 1, dir = 0, dinv = 0 <4>[ 4584.601910] (0)[32:kworker/u:1]idx = 10: mode = 0, pullsel = 0, din = 0, dout = 0, pullen = 1, dir = 0, dinv = 0
...
|