Hello,
We are interfacing two i2c devices to DM365. The i2c address of both the device are different.
We are uisng DM365-IPNC RDK.
I have successfully tested both the devices using i2crw.out application. I am able to do read and write with both devices.
The problem is if i test one of the device using this application and test another one after testing the first device(without restarting the device), i get the following error.
[ 94.084463] i2c i2c-1: Failed to register i2c client mt9p031 at 0x48 (-16)
[ 94.092747] Unable to handle kernel NULL pointer dereference at virtual address 00000002
[ 94.101980] pgd = c21b4000
[ 94.104828] [00000002] *pgd=8219f031, *pte=00000000, *ppte=00000000
[ 94.112276] Internal error: Oops: 17 [#1] PREEMPT
[ 94.117012] last sysfs file: /sys/devices/virtual/ubi/ubi1/min_io_size
[ 94.123563] Modules linked in: rtc_davinci rtc_core g_ether loop davinci cppi_dma musb_hdrc libcrc32c sha1_generic md5 des_generic crc32c crc_ccitt
[ 94.136977] CPU: 0 Not tainted (2.6.37_IPNC_DM368_5.1.0 #1)
[ 94.142937] pc : [<c01717d0>] lr : [<c01c6848>] psr: 60000013
[ 94.142968] sp : c2b45db8 ip : c0370054 fp : c2b45dfc
[ 94.154463] r10: c284b030 r9 : c2b44000 r8 : 00000080
[ 94.159714] r7 : c284b030 r6 : c2b45dbc r5 : 00000000 r4 : 00000000
[ 94.166269] r3 : c21b3400 r2 : 00000000 r1 : 00000004 r0 : c02b1210
[ 94.172827] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
[ 94.179995] Control: 0005317f Table: 821b4000 DAC: 00000015
[ 94.185768] Process i2crw.out (pid: 549, stack limit = 0xc2b44270)
[ 94.191977] Stack: (0xc2b45db8 to 0xc2b46000)
[ 94.196365] 5da0: c2189180 7039746d
[ 94.204596] 5dc0: 00313330 00000000 00000000 00000000 00480000 00000001 00000000 00000000
[ 94.212830] 5de0: 00000000 c01c7bd8 c215ecd8 c2b45e70 c2b45e5c c2b45e00 c01c7b98 c017170c
[ 94.221063] 5e00: 00000000 c215ecd8 c215ed00 c215ed00 c218ba80 c02eabbc c2b44000 00000000
[ 94.229297] 5e20: c2b45e3c c2b45e30 c01338b8 c013343c c2b45e6c 00000000 c01c7bd8 c215ecd8
[ 94.237532] 5e40: c2b45e70 00000080 c2b44000 00000000 c2b45e6c c2b45e60 c01c7c08 c01c7a20
[ 94.245768] 5e60: c2b45e94 c2b45e70 c018128c c01c7be8 c28600b8 c2841ab0 c215ecd8 00000000
[ 94.254003] 5e80: c02eabbc c03039fc c2b45eb4 c2b45e98 c01c62e8 c0181244 00000040 00000040
[ 94.262237] 5ea0: c215ec00 00000000 c2b45ed4 c2b45eb8 c0171114 c01c6280 00002c01 c2114c00
[ 94.270472] 5ec0: 00000080 00000000 c2b45f0c c2b45ed8 c01711f4 c0171010 c21a3005 c2806780
[ 94.278703] 5ee0: c2409080 00000101 00000000 00000000 00000003 c2114c00 00002c01 c2114c00
[ 94.286936] 5f00: c2b45f7c c2b45f10 c00aaf78 c0171188 00000001 c2114c08 00000000 c2114c00
[ 94.295168] 5f20: c2b45f5c 00000000 00000000 00000000 c2b45f5c 00000020 c2a151e8 c2114c08
[ 94.303403] 5f40: c2114c00 00000020 c2a151e8 c2114c08 c2b45f94 00000003 00000080 00002c01
[ 94.311637] 5f60: c2114c00 c002a164 c2b44000 00000000 c2b45fa4 c2b45f80 c00ab028 c00aaa18
[ 94.319875] 5f80: c2b44000 00000000 be83ec2c 00000080 be83ec84 00000036 00000000 c2b45fa8
[ 94.328109] 5fa0: c0029fe0 c00aaff8 be83ec2c 00000080 00000003 00002c01 00000080 ffffffff
[ 94.336341] 5fc0: be83ec2c 00000080 be83ec84 00000036 be83ee04 00000001 00000080 00000001
[ 94.344572] 5fe0: 000124c0 be83ec28 00008ebc 41031b0c 60000010 00000003 00000000 00000000
[ 94.352770] Backtrace:
[ 94.355242] Function entered at [<c01716fc>] from [<c01c7b98>]
[ 94.361097] r7:c2b45e70 r6:c215ecd8 r5:c01c7bd8 r4:00000000
[ 94.366825] Function entered at [<c01c7a10>] from [<c01c7c08>]
[ 94.372680] Function entered at [<c01c7bd8>] from [<c018128c>]
[ 94.378535] Function entered at [<c0181234>] from [<c01c62e8>]
[ 94.384387] r7:c03039fc r6:c02eabbc r5:00000000 r4:c215ecd8
[ 94.390113] Function entered at [<c01c6270>] from [<c0171114>]
[ 94.395964] r6:00000000 r5:c215ec00 r4:00000040
[ 94.400632] Function entered at [<c0171000>] from [<c01711f4>]
[ 94.406482] r7:00000000 r6:00000080 r5:c2114c00 r4:00002c01
[ 94.412211] Function entered at [<c0171178>] from [<c00aaf78>]
[ 94.418063] r7:c2114c00 r6:00002c01 r5:c2114c00 r4:00000003
[ 94.423788] Function entered at [<c00aaa08>] from [<c00ab028>]
[ 94.429643] Function entered at [<c00aafe8>] from [<c0029fe0>]
[ 94.435495] r7:00000036 r6:be83ec84 r5:00000080 r4:be83ec2c
[ 94.441242] Code: 11a00005 1affffef e59f0048 e3a01004 (e1d420b2)
[ 94.451824] ---[ end trace 3fe8d99eb3fa5414 ]---
Segmentation fault
It fails when trying to set the i2c slave address for the second time telling that i2c address is busy.
Any help is appreciated.
Thanks and regards,
Arpitha