logo

Could not compile stylesheet for simplistic. Using last compiled stylesheet.

I2C bus 2 for gpio missing

posted in IGEPv2
Friday, January 24 2014, 11:55 AM
peter
peter
Offline
0
Hi

I have an accelerometer which I wired into gpio pins 23, 24 of the igepv2.

I have 2 IGEPv2 boards for testing

Board #1 = the default configuration supplied by ISEE. It works fine with the accelerometer. i2cdetect -l command shows 3 i2c busses.
i2c-1
i2c-2 ==> this is where the accelerometer shows up if it is wired in
i2c-3


Board #2 = my configuration (search Kernel 3.9.11 and directFB in this post for details). The accelerometer does not work here.
i2cdetect -l shows only 2 i2c busses.
i2c-1
i2c-3
Where is i2c-2?

My xconfig for Linux has 4 i2c-related options selected
x enable compatibility for old user space
x I2C device interface
x autoselect pertinent helper modules
m GPIO based bitbanging I2C
Responses (3)
  • Accepted Answer

    Monday, January 27 2014, 09:30 AM - #permalink
    0
    Hi Peter,

    Looks like you missed to register the i2c.2 bus in board file. You can register the i2c bus in your board file with:

    omap_register_i2c_bus(2, 100, NULL)

    Hope it helps you.
    The reply is currently minimized Show
  • Accepted Answer

    peter
    peter
    Offline
    Wednesday, January 29 2014, 06:48 AM - #permalink
    0
    Hi eballetbo

    Thanks for responding. As suggested, I updated the kernel file arch/arm/mach-omap2/board-igep0020.c
    with
    omap_register_i2c_bus(2, 100, NULL);

    placing it right after the lines
    omap_register_i2c_bus(3, 100, igep2_i2c3_boardinfo,
    ARRAY_SIZE(igep2_i2c3_boardinfo));


    I reran make and got the following message...
    arch/arm/mach-omap2/board-igep0020.c: In function 'igep0020_init':
    arch/arm/mach-omap2/board-igep0020.c:447: error: too few arguments to function 'omap_register_i2c_bus'

    I tried
    omap_register_i2c_bus(2, 100, NULL, NULL);
    and got warning
    CC arch/arm/mach-omap2/board-igep0020.o
    arch/arm/mach-omap2/board-igep0020.c: In function 'igep0020_init':
    arch/arm/mach-omap2/board-igep0020.c:447: warning: passing argument 4 of 'omap_register_i2c_bus' makes integer from pointer without a cast
    arch/arm/plat-omap/include/plat/i2c.h:27: note: expected 'unsigned int' but argument is of type 'void *'

    Lots of warnings but it works!!!!!!

    Thanks so much eballetbo
    Peter
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, January 29 2014, 12:32 PM - #permalink
    0
    Hi Peter,

    Probably omap_register_i2c_bus(1, 100, NULL, 0) removes the warnings ...
    The reply is currently minimized Show
Your Reply

SUPPORT


This email address is being protected from spambots. You need JavaScript enabled to view it.
This email address is being protected from spambots. You need JavaScript enabled to view it.
IGEP Community Wiki
IGEP Community Forum
IGEP Community Online Chat