中级会员
 
- 积分
- 325
- 金钱
- 325
- 注册时间
- 2022-4-12
- 在线时间
- 41 小时
|
1金钱
有没有大佬用过imx6ull的IIO子系统触发缓冲功能吗?不知道是内核源码有问题,还是我驱动哪里有问题,echo 1 > /buffer/enable 驱动就崩了,提示调用了空指针
root@ATK-IMX6U:~# cd /sys/bus/iio/devices/iio\:device1
root@ATK-IMX6U:/sys/bus/iio/devices/iio:device1# ls
buffer dev in_voltage0_raw in_voltage1_raw in_voltage2_raw in_voltage3_raw in_voltage_scale of_node power scan_elements subsystem trigger uevent
root@ATK-IMX6U:/sys/bus/iio/devices/iio:device1# echo 1 > scan_elements/in_voltage3_en
root@ATK-IMX6U:/sys/bus/iio/devices/iio:device1# echo 10 > buffer/length
root@ATK-IMX6U:/sys/bus/iio/devices/iio:device1# echo 1 > buffer/enable
[ 3328.852247] Unable to handle kernel NULL pointer dereference at virtual address 00000016
[ 3328.862676] pgd = 949e8000
[ 3328.865705] [00000016] *pgd=94525831, *pte=00000000, *ppte=00000000
[ 3328.874236] Internal error: Oops: 17 [#1] PREEMPT SMP ARM
[ 3328.879647] Modules linked in: ads1220 industrialio_triggered_buffer [last unloaded: industrialio_triggered_buffer]
[ 3328.890155] CPU: 0 PID: 655 Comm: sh Not tainted 4.1.15 #1
[ 3328.895647] Hardware name: Freescale i.MX6 Ultralite (Device Tree)
[ 3328.901835] task: 944b3440 ti: 948e8000 task.ti: 948e8000
[ 3328.907250] PC is at iio_update_demux+0xcc/0x2b8
[ 3328.911875] LR is at 0x4
[ 3328.914418] pc : [<8061dc8c>] lr : [<00000004>] psr: 60060013
[ 3328.914418] sp : 948e9e48 ip : 000000b0 fp : 00000024
[ 3328.925903] r10: 00000000 r9 : 94489840 r8 : 00000000
[ 3328.931135] r7 : 000000b0 r6 : 00000000 r5 : 9454b400 r4 : 9454b528
[ 3328.937670] r3 : 7f01705c r2 : 00000004 r1 : 00000024 r0 : 00000000
[ 3328.944205] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
[ 3328.951348] Control: 10c53c7d Table: 949e806a DAC: 00000015
[ 3328.957100] Process sh (pid: 655, stack limit = 0x948e8210)
[ 3328.962678] Stack: (0x948e9e48 to 0x948ea000)
[ 3328.967045] 9e40: 949e8018 97e4965c 9454b588 80bcf1b0 94001f00 00000000
[ 3328.975232] 9e60: 7f017014 9454b528 9454b400 9454b588 949840c0 94489840 00000000 00000000
[ 3328.983422] 9e80: 00000000 8061e040 00000000 00000002 9454b410 9454b594 9454b400 94984100
[ 3328.991609] 9ea0: 007fdff8 00000000 00000000 8061e438 00000000 0114b738 00000002 94984240
[ 3328.999798] 9ec0: 9498410c 00000002 948e9f88 8014b7f0 00000000 00000000 00000800 94541f00
[ 3329.007985] 9ee0: 8014b738 007fdff8 948e9f88 8000f604 948e8000 00000000 00000000 800eb598
[ 3329.016172] 9f00: 00000000 802d2714 94598800 00000001 00000188 00000001 8000f604 948e8000
[ 3329.024360] 9f20: 00000000 800ed81c 00000020 80105b78 94775e40 0000000a 7eb51a74 8082d190
[ 3329.032547] 9f40: 94775e40 94775e40 00821910 94541f00 00000002 007fdff8 948e9f88 8000f604
[ 3329.040736] 9f60: 948e8000 800ebdcc 9447d780 800fad28 94541f00 94541f00 007fdff8 00000002
[ 3329.048923] 9f80: 8000f604 800ec5e4 00000000 00000000 00000000 00000002 007fdff8 76f53d58
[ 3329.057110] 9fa0: 00000004 8000f480 00000002 007fdff8 00000001 007fdff8 00000002 00000000
[ 3329.065298] 9fc0: 00000002 007fdff8 76f53d58 00000004 00000002 000eb124 00000001 00000000
[ 3329.073486] 9fe0: 00000000 7eb519ac 76e83c18 76edb5c0 60060010 00000001 00000000 00000000
[ 3329.081690] [<8061dc8c>] (iio_update_demux) from [<8061e040>] (__iio_update_buffers+0x158/0x418)
[ 3329.090492] [<8061e040>] (__iio_update_buffers) from [<8061e438>] (iio_buffer_store_enable+0x6c/0x9c)
[ 3329.099731] [<8061e438>] (iio_buffer_store_enable) from [<8014b7f0>] (kernfs_fop_write+0xb8/0x194)
[ 3329.108708] [<8014b7f0>] (kernfs_fop_write) from [<800eb598>] (__vfs_write+0x1c/0xd8)
[ 3329.116553] [<800eb598>] (__vfs_write) from [<800ebdcc>] (vfs_write+0x90/0x16c)
[ 3329.123873] [<800ebdcc>] (vfs_write) from [<800ec5e4>] (SyS_write+0x44/0x9c)
[ 3329.130937] [<800ec5e4>] (SyS_write) from [<8000f480>] (ret_fast_syscall+0x0/0x3c)
[ 3329.138520] Code: e1a01000 e1a0b000 e1a00005 ebfff2da (e5d04016)
[ 3329.162718] ---[ end trace 70b942bf62dff18b ]---
|
|