This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

I2C not working

Hello,,

I am using omap4430 based custom board, on which i am trying to make the suspend and resume function for head tracker driver. everything is going good even my suspend and resume function is working but

something should be wrong in i2c, creating a duplicate file.. see the booting message-->

In:    serial
Out:   serial
Err:   serial
Battery not detected
Initializing SD(0) Slot.
ptbl slot: SD:(0).
efi partition table not found
efi partition table:
ptbl slot: EMMC:(1).
     256     128K xloader
     512       3M bootloader
    6656     128K misc
    7680     128K serialno
    7936      16M efs
   40704      16K crypto
   40736       8M recovery
   57120       8M boot
   73504     512M system
 1122080     256M cache
 1646368     512M userdata
Net:   KS8851SNL
X-Loader and U-Boot Loaded from Micro SD Card
unable to get the environment file from the sd/mmc card.
Hit any key to stop autoboot:  0
OMAP4 GOLDENI # setenv bootargs console=ttyO2,115200n8 root=/dev/mmcblk0p2 rootdelay=2 init=/init vram="32M" omapfb.vram="0:32M" rootfstype=ext3
OMAP4 GOLDENI # mmcinit 0; fatload mmc 0 0x80500000 uImage; bootm 0x80500000
mmc read: Invalid size

5027456 bytes read
## Booting image at 80500000 ...
   Image Name:   Linux-3.4.34-01568-gdc4cf86-dirt
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    5027392 Bytes =  4.8 MB
   Load Address: 80008000
   Entry Point:  80008000
   Verifying Checksum ... OK
OK
I2C read: I/O error

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Linux version 3.4.34-01568-gdc4cf86-dirty (mistral@mistral-desktop) (gcc version 4.6.x-google 20120106 (prerelease) (GCC) ) #111 SMP PREEMPT 3
[    0.000000] CPU: ARMv7 Processor [411fc093] revision 3 (ARMv7), cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] Machine: OMAP4 Goldeni board
[    0.000000] Initialized persistent memory from a0000000-a01fffff
[    0.000000] android_display: setting lcd resolution to 800*600, bpp=4
[    0.000000] android_display: tiler1d 15360000
[    0.000000] android_display: setting fb0.vram to 3997696
[    0.000000] android_display: setting vram to 3997696
[    0.000000] Cannot detect omap type!
[    0.000000] Reserving 33554432 bytes SDRAM for VRAM
[    0.000000] cma: CMA: reserved 16 MiB at 95800000
[    0.000000] Memory policy: ECC disabled, Data cache writealloc
[    0.000000] OMAP4: Map 0x96e00000 to 0xfe600000 for dram barrier
[    0.000000] OMAP4430 ES2.3
[    0.000000] PERCPU: Embedded 9 pages/cpu @c13d1000 s13184 r8192 d15488 u36864
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 166912
[    0.000000] Kernel command line: console=ttyO2,115200n8 androidboot.console=ttyO2 omap_wdt.timer_margin=30 vmalloc=496M omapfb.fb_opt=-1,-1,-1,1,1280,7203
[    0.000000]
[    0.000000] 2.value of tmp=30
[    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Memory: 366MB 2MB 289MB 3MB = 660MB total
[    0.000000] Memory: 636608k/636608k available, 411968k reserved, 299008K highmem
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
[    0.000000]     vmalloc : 0xe0800000 - 0xff000000   ( 488 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0xc0008000 - 0xc094d000   (9492 kB)
[    0.000000]       .init : 0xc094d000 - 0xc09a5380   ( 353 kB)
[    0.000000]       .data : 0xc09a6000 - 0xc0a4f890   ( 679 kB)
[    0.000000]        .bss : 0xc0a4f8b4 - 0xc0bc9658   (1512 kB)
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000] NR_IRQS:626
[    0.000000] OMAP clockevent source: GPTIMER1 at 32768 Hz
[    0.000000] sched_clock: 32 bits at 32kHz, resolution 30517ns, wraps every 131071999ms
[    0.000274] Calibrating delay loop... 1194.24 BogoMIPS (lpj=4665344)
[    0.070312] pid_max: default: 32768 minimum: 301
[    0.070556] Security Framework initialized
[    0.070709] Mount-cache hash table entries: 512
[    0.072235] Initializing cgroup subsys debug
[    0.072265] Initializing cgroup subsys cpuacct
[    0.072296] Initializing cgroup subsys freezer
[    0.072296] Initializing cgroup subsys net_cls
[    0.072357] CPU: Testing write buffer coherency: ok
[    0.072692] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.072967] hw perfevents: enabled with ARMv7 Cortex-A9 PMU driver, 7 counters available
[    0.073120] Setting up static identity map for 0x806c6498 - 0x806c64f0
[    0.073150] L310 cache controller enabled
[    0.073181] l2x0: 16 ways, CACHE_ID 0x410000c4, AUX_CTRL 0x7e470000, Cache size: 1048576 B
[    0.073699] generating sar_ram layout...
[    0.074005] sar ram layout created
[    0.151641] CPU1: Booted secondary processor
[    0.182312] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.182373] CPU1: Unknown IPI message 0x1
[    0.182403] Brought up 2 CPUs
[    0.182403] SMP: Total of 2 processors activated (2388.48 BogoMIPS).
[    0.192718] omap_hwmod: aess: _wait_target_disable failed
[    0.195526] omap_hwmod: dss_dispc: cannot be enabled (3)
[    0.198211] omap_hwmod: dss_dsi1: cannot be enabled (3)
[    0.200927] omap_hwmod: dss_dsi2: cannot be enabled (3)
[    0.203613] omap_hwmod: dss_hdmi: cannot be enabled (3)
[    0.206298] omap_hwmod: dss_rfbi: cannot be enabled (3)
[    0.208984] omap_hwmod: dss_venc: cannot be enabled (3)
[    0.212921] omap_hwmod: mcpdm: cannot be enabled (3)
[    0.214843] omap_device: cannot add global notifier for dev PM QoS
[    0.215545] dummy:
[    0.216857] NET: Registered protocol family 16
[    0.232177] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.232696] GPMC revision 6.0
[    0.234771] gpiochip_add: registered GPIOs 0 to 31 on device: gpio
[    0.234832] OMAP GPIO hardware version 0.1
[    0.235015] gpiochip_add: registered GPIOs 32 to 63 on device: gpio
[    0.235290] gpiochip_add: registered GPIOs 64 to 95 on device: gpio
[    0.235534] gpiochip_add: registered GPIOs 96 to 127 on device: gpio
[    0.235748] gpiochip_add: registered GPIOs 128 to 159 on device: gpio
[    0.235992] gpiochip_add: registered GPIOs 160 to 191 on device: gpio
[    0.236358] ------------[ cut here ]------------
[    0.236389] WARNING: at fs/sysfs/dir.c:508 sysfs_add_one+0x8c/0xac()
[    0.236419] sysfs: cannot create duplicate filename '/bus/i2c'
[    0.236419] Modules linked in:
[    0.236450] Backtrace:
[    0.236480] [<c0017da0>] (dump_backtrace+0x0/0x10c) from [<c06a797c>] (dump_stack+0x18/0x1c)
[    0.236511]  r6:000001fc r5:c01719bc r4:d682fe48 r3:00000000
[    0.236541] [<c06a7964>] (dump_stack+0x0/0x1c) from [<c0047018>] (warn_slowpath_common+0x54/0x6c)
[    0.236572] [<c0046fc4>] (warn_slowpath_common+0x0/0x6c) from [<c00470d4>] (warn_slowpath_fmt+0x38/0x40)
[    0.236572]  r8:d68dabc8 r7:d682fe88 r6:d68dabc8 r5:d686c000 r4:ffffffef
[    0.236602] r3:00000009
[    0.236633] [<c004709c>] (warn_slowpath_fmt+0x0/0x40) from [<c01719bc>] (sysfs_add_one+0x8c/0xac)
[    0.236663]  r3:d686c000 r2:c0893344
[    0.236694] [<c0171930>] (sysfs_add_one+0x0/0xac) from [<c0171bec>] (create_dir+0x68/0xc4)
[    0.236694]  r7:00000000 r6:d681f348 r5:00000001 r4:d6899490
[    0.236724] [<c0171b84>] (create_dir+0x0/0xc4) from [<c0171f84>] (sysfs_create_dir+0x98/0xe4)
[    0.236755]  r8:d6899490 r7:d68449d0 r6:d681f348 r5:00000000 r4:d6899490
[    0.236785] [<c0171eec>] (sysfs_create_dir+0x0/0xe4) from [<c024338c>] (kobject_add_internal+0xa8/0x220)
[    0.236816]  r6:00000000 r5:d6899490 r4:d6899480
[    0.236846] [<c02432e4>] (kobject_add_internal+0x0/0x220) from [<c02437b0>] (kset_register+0x5c/0x78)
[    0.236846]  r8:d6899490 r7:c0a17c08 r6:00000000 r5:d6899490 r4:d6899480
[    0.236907] [<c0243754>] (kset_register+0x0/0x78) from [<c02e8dc8>] (__bus_register+0xb0/0x27c)
[    0.236907]  r5:c0a27728 r4:d6899480
[    0.236938] [<c02e8d18>] (__bus_register+0x0/0x27c) from [<c09776c8>] (i2c_init+0x1c/0x7c)
[    0.236968] [<c09776ac>] (i2c_init+0x0/0x7c) from [<c00086ac>] (do_one_initcall+0xa0/0x100)
[    0.237030]  r5:c0a4f8c0 r4:c098d50c
[    0.237060] [<c000860c>] (do_one_initcall+0x0/0x100) from [<c094d95c>] (do_initcalls+0x80/0xb4)
[    0.237060]  r8:c094d288 r7:c0a4f8c0 r6:c098d4ec r5:00000002 r4:c098d50c
[    0.237091] r3:c09a0d8c
[    0.237121] [<c094d8dc>] (do_initcalls+0x0/0xb4) from [<c094da24>] (kernel_init+0x94/0x12c)
[    0.237152] [<c094d990>] (kernel_init+0x0/0x12c) from [<c004b62c>] (do_exit+0x0/0x3bc)
[    0.237182]  r5:c094d990 r4:00000000
[    0.237213] ---[ end trace 1b75b31a2719ed1c ]---
[    0.237243] ------------[ cut here ]------------
[    0.237243] WARNING: at lib/kobject.c:199 kobject_add_internal+0x204/0x220()
[    0.237274] kobject_add_internal failed for i2c with -EEXIST, don't try to register things with the same name in the same directory.
[    0.237274] Modules linked in:
[    0.237304] Backtrace:
[    0.237335] [<c0017da0>] (dump_backtrace+0x0/0x10c) from [<c06a797c>] (dump_stack+0x18/0x1c)
[    0.237335]  r6:000000c7 r5:c02434e8 r4:d682fec8 r3:00000000
[    0.237365] [<c06a7964>] (dump_stack+0x0/0x1c) from [<c0047018>] (warn_slowpath_common+0x54/0x6c)
[    0.237396] [<c0046fc4>] (warn_slowpath_common+0x0/0x6c) from [<c00470d4>] (warn_slowpath_fmt+0x38/0x40)
[    0.237426]  r8:d6899490 r7:d68449d0 r6:00000000 r5:d6899490 r4:ffffffef
[    0.237457] r3:00000009
[    0.237487] [<c004709c>] (warn_slowpath_fmt+0x0/0x40) from [<c02434e8>] (kobject_add_internal+0x204/0x220)
[    0.237487]  r3:c06f1680 r2:c089ef14
[    0.237518] [<c02432e4>] (kobject_add_internal+0x0/0x220) from [<c02437b0>] (kset_register+0x5c/0x78)
[    0.237518]  r8:d6899490 r7:c0a17c08 r6:00000000 r5:d6899490 r4:d6899480
[    0.237579] [<c0243754>] (kset_register+0x0/0x78) from [<c02e8dc8>] (__bus_register+0xb0/0x27c)
[    0.237579]  r5:c0a27728 r4:d6899480
[    0.237609] [<c02e8d18>] (__bus_register+0x0/0x27c) from [<c09776c8>] (i2c_init+0x1c/0x7c)
[    0.237640] [<c09776ac>] (i2c_init+0x0/0x7c) from [<c00086ac>] (do_one_initcall+0xa0/0x100)
[    0.237640]  r5:c0a4f8c0 r4:c098d50c
[    0.237670] [<c000860c>] (do_one_initcall+0x0/0x100) from [<c094d95c>] (do_initcalls+0x80/0xb4)
[    0.237701]  r8:c094d288 r7:c0a4f8c0 r6:c098d4ec r5:00000002 r4:c098d50c
[    0.237731] r3:c09a0d8c
[    0.237731] [<c094d8dc>] (do_initcalls+0x0/0xb4) from [<c094da24>] (kernel_init+0x94/0x12c)
[    0.237762] [<c094d990>] (kernel_init+0x0/0x12c) from [<c004b62c>] (do_exit+0x0/0x3bc)
[    0.237792]  r5:c094d990 r4:00000000
[    0.237792] ---[ end trace 1b75b31a2719ed1d ]---
[    0.239044] omap_mux_init: Add partition: #1: core, flags: 2
[    0.240203] omap_mux_init: Add partition: #2: wkup, flags: 2
[    0.243347] omap_mux_init_gpio: Could not set gpio0
[    0.248779] dmm dmm: initialized all PAT entries
[    0.250427] hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
[    0.250427] hw-breakpoint: maximum watchpoint size is 4 bytes.
[    0.254791]  omap-mcbsp.1: alias pad_fck already exists
[    0.254974]  omap-mcbsp.2: alias pad_fck already exists
[    0.255187]  omap-mcbsp.3: alias pad_fck already exists
[    0.255371]  omap-mcbsp.4: alias pad_fck already exists
[    0.255950] gcxxx_int failed. gcx hardware is not present
[    0.256134] OMAP DMA hardware revision 0.0
[    0.256927] emif emif.1: emif_probe: device configured with addr = e0984000 and IRQ142
[    0.257293] emif emif.2: emif_probe: device configured with addr = e0986000 and IRQ143
[    0.259277] SmartReflex Recalibration delay = 86400000ms
[    0.259307] SmartReflex Class 1.5 initialized
[    0.259796] Reprogramming LPDDR2 timings to 800000000 Hz
[    0.271667] bio: create slab <bio-0> at 0
[    0.272583] VBAT: 3750 mV
[    0.272888] vwl1271: 1800 mV

please help me how to solve this ?? I'm using Head Tracker driver for MPU9150.


Regards
Kaushal