我正在尝试将mpu9250 3 axis accelerometer
与imx6 board
一起使用。我从here获取了invensense mpu 9265
的{{1}}设备驱动程序,并使用Android
作为模块(Linux 3.18 kernel
)成功编译了驱动程序。我甚至根据我的要求改变了inv_mpu_iio
。
我对设备树知之甚少,但在搜索后我对dts file
进行了以下更改。
已编辑的dts file
代码段:
dts file
在将内核启动到主板上时,我遇到了以下错误:
&i2c3 {
extaccelerometer: mpu9265@68{
compatible = "mpu9250";
reg = <0x68>;
interrupt-parent = <&gpio2>;
interrupts = <9>;
};
}
据我了解,它表示在 [ 10.730459] industrialio: module is from the staging directory, the quality is unknown, you have been warned.
[ 10.805020] random: nonblocking pool is initialized
[ 10.819012] kfifo_buf: module is from the staging directory, the quality is unknown, you have been warned.
[....] Waiting for /dev to be fully populated...[ 10.910701] inv_mpu_iio: module is from the staging directory, the quality is unknown, you have been.
[ 10.973279] Unable to handle kernel NULL pointer dereference at virtual address 00000000
[ 10.981478] pgd = bdeac000
[ 10.984286] [00000000] *pgd=00000000
[ 10.987969] Internal error: Oops: 5 [#1] SMP ARM
[ 10.992628] Modules linked in: inv_mpu_iio(C+) kfifo_buf(C) industrialio(C) sky2
[ 11.000167] CPU: 3 PID: 333 Comm: modprobe Tainted: G C 3.18.0i2c-test+ #1
[ 11.008117] Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
[ 11.014695] task: bdfc0000 ti: bdd16000 task.ti: bdd16000
[ 11.020179] PC is at inv_mpu_probe+0x70/0xb6c [inv_mpu_iio]
[ 11.025769] LR is at 0x0
[ 11.028318] pc : [<7f029110>] lr : [<00000000>] psr: a0000013
[ 11.028318] sp : bdd17c98 ip : bdc5b484 fp : bdd17cdc
[ 11.039806] r10: 00000000 r9 : 00000004 r8 : 7f02fa34
[ 11.045064] r7 : bdc5b400 r6 : 00000001 r5 : befd7800 r4 : bdc5b000
[ 11.051643] r3 : 00000068 r2 : 00000000 r1 : 0000002f r0 : bdc5b000
[ 11.058250] Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
[ 11.065427] Control: 10c5387d Table: 4deac04a DAC: 00000015
[ 11.071241] Process modprobe (pid: 333, stack limit = 0xbdd16238)
[ 11.077417] Stack: (0xbdd17c98 to 0xbdd18000)
[ 11.081848] 7c80: bdd17ccc bdd17ca8
[ 11.090093] 7ca0: 801b0764 801acc5c befd7820 8041d804 befd7820 befd7820 00000000 7f031798
[ 11.098316] 7cc0: befd7800 7f031798 00000004 00000000 bdd17cfc bdd17ce0 8054ad94 7f0290ac
[ 11.106568] 7ce0: 81589ca8 befd7820 80cf1758 00000000 bdd17d34 bdd17d00 8040e504 8054acb4
[ 11.114854] 7d00: 8054ac94 80349964 7f031798 befd7820 7f031798 befd7854 00000000 7f037000
[ 11.123142] 7d20: 8152cc60 00000000 bdd17d54 bdd17d38 8040e7f4 8040e3cc bef307e4 00000000
[ 11.131438] 7d40: 7f031798 8040e750 bdd17d7c bdd17d58 8040c6fc 8040e75c bee18ac0 bef307d8
[ 11.139705] 7d60: be7535e0 7f031798 bdd2b480 80ccc070 bdd17d8c bdd17d80 8040de9c 8040c6a4
[ 11.147932] 7d80: bdd17db4 bdd17d90 8040da60 8040de80 7f030c18 bdd17da0 7f031798 80c76c58
[ 11.156173] 7da0: be7f95c0 80cea230 bdd17dcc bdd17db8 8040f1f0 8040d974 7f031774 80c76c58
[ 11.164408] 7dc0: bdd17de4 bdd17dd0 8054d384 8040f174 80c76c58 80c76c58 bdd17dfc bdd17de8
[ 11.172629] 7de0: 7f037018 8054d354 00000000 80c76c58 bdd17e7c bdd17e00 80008b20 7f03700c
[ 11.180852] 7e00: bdd17e44 bdd17e10 8013b4b4 8077f8a4 00000001 0000084f bdd17e44 000000db
[ 11.189069] 7e20: bdf1b100 c0c70000 00000001 be7f9440 8152cc60 00000001 bdd17e64 bdd17e48
[ 11.197330] 7e40: 801301d0 8013b26c bdd17f48 7f0320d4 7f0320c8 bdd17f48 7f0320d4 7f0320c8
[ 11.205568] 7e60: 80cea230 be7f9440 8152cc60 00000001 bdd17f3c bdd17e80 800a92e0 80008a70
[ 11.213776] 7e80: 7f0320d4 00007fff 800a64e8 bdd17f04 bdd17ebc c0c70000 00000000 c0d14dd8
[ 11.221973] 7ea0: bdd17ed4 76f91d50 00000202 7f0320c8 7f032214 7f032110 8006b448 80a4b86c
[ 11.230166] 7ec0: bdd17fa4 bdd17ed0 800141b0 8006b440 c0d4a000 00000000 00000000 00000000
[ 11.238357] 7ee0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 11.246548] 7f00: 00000000 00000000 00000000 00000000 20000013 000da17d 76d96000 76f91d50
[ 11.254741] 7f20: 00000080 8000fc44 bdd16000 00000000 bdd17fa4 bdd17f40 800a99e8 800a75e4
[ 11.262935] 7f40: 8000faa4 bdfc0000 c0c70000 000da17d c0d146f8 c0d1455f c0d48a98 0000b758
[ 11.271125] 7f60: 0000cf08 7f031e70 00000019 00000000 0000002c 0000002d 00000016 00000011
[ 11.279319] 7f80: 0000000b 00000000 00000000 00000000 784fb200 784fd698 00000000 bdd17fa8
[ 11.287509] 7fa0: 8000fa80 800a9940 00000000 784fb200 76d96000 000da17d 76f91d50 00000002
[ 11.295699] 7fc0: 00000000 784fb200 784fd698 00000080 00000000 76f91d50 000da17d 00000000
[ 11.303891] 7fe0: 00060000 7e936924 76f8bb07 76f0f264 60000010 76d96000 00000000 00000000
[ 11.312074] Backtrace:
[ 11.314586] [<7f0290a0>] (inv_mpu_probe [inv_mpu_iio]) from [<8054ad94>] (i2c_device_probe+0xec/0x150)
[ 11.323903] r10:00000000 r9:00000004 r8:7f031798 r7:befd7800 r6:7f031798 r5:00000000
[ 11.331840] r4:befd7820
[ 11.334417] [<8054aca8>] (i2c_device_probe) from [<8040e504>] (driver_probe_device+0x144/0x390)
[ 11.343126] r7:00000000 r6:80cf1758 r5:befd7820 r4:81589ca8
[ 11.348882] [<8040e3c0>] (driver_probe_device) from [<8040e7f4>] (__driver_attach+0xa4/0xa8)
[ 11.357328] r10:00000000 r9:8152cc60 r8:7f037000 r7:00000000 r6:befd7854 r5:7f031798
[ 11.365262] r4:befd7820
[ 11.367829] [<8040e750>] (__driver_attach) from [<8040c6fc>] (bus_for_each_dev+0x64/0x98)
[ 11.376017] r6:8040e750 r5:7f031798 r4:00000000 r3:bef307e4
[ 11.381771] [<8040c698>] (bus_for_each_dev) from [<8040de9c>] (driver_attach+0x28/0x30)
[ 11.389783] r6:80ccc070 r5:bdd2b480 r4:7f031798
[ 11.394473] [<8040de74>] (driver_attach) from [<8040da60>] (bus_add_driver+0xf8/0x218)
[ 11.402410] [<8040d968>] (bus_add_driver) from [<8040f1f0>] (driver_register+0x88/0x104)
[ 11.410510] r7:80cea230 r6:be7f95c0 r5:80c76c58 r4:7f031798
[ 11.416264] [<8040f168>] (driver_register) from [<8054d384>] (i2c_register_driver+0x3c/0xfc)
[ 11.424711] r5:80c76c58 r4:7f031774
[ 11.428362] [<8054d348>] (i2c_register_driver) from [<7f037018>] (inv_mpu_init+0x18/0x3c [inv_mpu_iio])
[ 11.437764] r5:80c76c58 r4:80c76c58
[ 11.441414] [<7f037000>] (inv_mpu_init [inv_mpu_iio]) from [<80008b20>] (do_one_initcall+0xbc/0x204)
[ 11.450554] r4:80c76c58 r3:00000000
[ 11.454193] [<80008a64>] (do_one_initcall) from [<800a92e0>] (load_module+0x1d08/0x235c)
[ 11.462294] r10:00000001 r9:8152cc60 r8:be7f9440 r7:80cea230 r6:7f0320c8 r5:7f0320d4
[ 11.470230] r4:bdd17f48
[ 11.472799] [<800a75d8>] (load_module) from [<800a99e8>] (SyS_init_module+0xb4/0x124)
[ 11.480638] r10:00000000 r9:bdd16000 r8:8000fc44 r7:00000080 r6:76f91d50 r5:76d96000
[ 11.488574] r4:000da17d
[ 11.491149] [<800a9934>] (SyS_init_module) from [<8000fa80>] (ret_fast_syscall+0x0/0x48)
[ 11.499247] r6:784fd698 r5:784fb200 r4:00000000
[ 11.503937] Code: e28cc004 e2847b01 e5c435e5 e595e0b4 (e8be000f)
[ 11.510195] ---[ end trace fcf671f516c808ac ]---
udevd[324]: '/sbin/modprobe -b i2c:mpu9250' [333] terminated by signal 11 (Segmentation fault)
期间发生了细分错误。我无法找到我犯错误的地方。由于我对i2c device probe
知之甚少,我不确定我是否正确编辑了dts file
。就驱动程序而言,它已正确编译,因此我觉得驱动程序不应成为问题。
请帮帮我。我必须在本周末完成这项任务。
提前感谢您的回复。