我正在寻找一个 linux 命令,它可以让我更多地了解手机上的振动电机组件。
您可以通过查看 /proc 并查看加载了哪些内核模块来对硬件进行很好的自省。例如,这列出了我的 Droid 手机上当前使用的中断号(“adb shell”到我的手机)
1|shell@cdma_spyder:/proc $ cat interrupts
cat interrupts
CPU0 CPU1
41: 0 0 GIC l3-dbg-irq
42: 0 0 GIC l3-app-irq
43: 9226 0 GIC prcm
44: 47509 0 GIC DMA
52: 0 0 GIC gpmc
53: 216846 0 GIC SGX ISR
57: 2045 0 GIC OMAP DISPC
58: 126 0 GIC
60: 0 0 GIC omap-iommu.1
69: 140651 0 GIC gp timer
77: 0 0 GIC rproc-wdt
79: 0 0 GIC rproc-wdt
85: 6368 0 GIC omapdss_dsi1
88: 29 0 GIC omap_i2c
89: 5317 0 GIC omap_i2c
90: 397 0 GIC omap_hdq
93: 10 0 GIC omap_i2c
94: 81 0 GIC omap_i2c
102: 6054 0 GIC
104: 16254 0 GIC OMAP UART0
105: 77 0 GIC
108: 402 0 GIC ohci_hcd:usb2
109: 3338 0 GIC ehci_hcd:usb1
112: 181 0 GIC omap_wdt
115: 676 0 GIC mmc0
118: 84283 0 GIC mmc1
124: 819 0 GIC musb-hdrc
125: 740 0 GIC musb-hdrc
126: 65421 0 GIC mmc2
131: 66 0 GIC ABE
132: 0 0 GIC omap-iommu.0
133: 0 0 GIC OMAP HDMI
141: 0 0 GIC McASP
142: 0 0 GIC omap_emif
143: 0 0 GIC omap_emif
152: 0 0 GIC omap4-keypad
163: 0 0 GPIO wrigley_ctrl-reset
166: 5 0 GPIO msp430_irq
167: 7115 0 GPIO cpcap-irq
168: 0 0 GPIO mdm_bp_resout
202: 6 0 GPIO cy8c201xx
212: 0 0 GPIO mdm_bp_status0
213: 0 0 GPIO mdm_bp_status1
215: 1 0 GPIO mdm_bp_status2
222: 38 0 GPIO oob-wake-host-wake
223: 0 0 GPIO hpd
260: 6728 0 GPIO wl1271
275: 8 0 GPIO usb_wake_host
309: 2909 0 GPIO Remote Wakeup
336: 0 0 GPIO mmc0
337: 140 0 GPIO ct405
338: 0 0 GPIO pcb_temp_sensor
343: 525 0 GPIO atmxt-i2c
IPI0: 0 0 Timer broadcast interrupts
IPI1: 392542 449194 Rescheduling interrupts
IPI2: 0 0 Function call interrupts
IPI3: 66924 67462 Single function call interrupts
IPI4: 0 0 CPU stop interrupts
IPI5: 0 0 CPU backtrace
LOC: 538193 484328 Local timer interrupts
Err: 0
shell@cdma_spyder:/proc $
$ cat modules
wl12xx_sdio 4046 0 - Live 0xbf0c6000
vpnclient 67812 1 - Live 0xbf0b0000
btwilink 3462 0 - Live 0xbf0ac000
wl12xx 133371 1 wl12xx_sdio, Live 0xbf081000
mac80211 220250 1 wl12xx, Live 0xbf03d000
cfg80211 163244 2 wl12xx,mac80211, Live 0xbf009000
compat 2530 0 - Live 0xbf005000
evfwd 4650 0 - Live 0xbf000000
shell@cdma_spyder:/proc $
但是,我无法将这些芯片名称中的任何一个与振动电机联系起来。(例如通过谷歌搜索,“cy8c201”是 Cypress 的可编程片上系统 SoC,可以控制其他 IO 设备http://www.ic-on-line.cn/view_online.php?id=1691996&file=0347 \cy8c20134_2665305.pdf )我猜测振动电机连接到那个或其他一些控制器芯片(或者可能是 i2C ?)并且该控制器芯片被分配给上述中断之一。
那么,关于如何获取下一层信息的任何想法?我可以编写一个 C 程序,或者使用 gdb 来获取有关 vibe 电机在哪里以及它是什么组件的更多信息。欢迎任何信息