iMx-25 Setting i2c speed

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iMx-25 Setting i2c speed

Jump to solution
1,045 Views
raghavendraning
Contributor I

Hi,

   Currently my i2c communication is happening at 100k speed.I wanted to change it.I tried it by changing

in drivers/i2c/busses/i2c-imx.c file(IMX_I2C_BIT_RATE),but no use.Can anybody guide me..? 

Labels (1)
0 Kudos
1 Solution
653 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hello,raghavendra,

     Open linux/arch/arm/mach-mx25/mx25_3stack.c, and adjust the following code, then Try :

static struct imxi2c_platform_data mxci2c_data = {
.bitrate = 100000, /* if you want 10K , .biitrate = 10000;*/
};

/*!
* Board specific initialization.
*/
static void __init mxc_board_init(void)
{
.....
#ifdef CONFIG_I2C
mxc_register_device(&mxc_i2c_device0, &mxci2c_data);
i2c_register_board_info(0, mxc_i2c_board_info,
    ARRAY_SIZE(mxc_i2c_board_info));
#endif
....
}

Recompile linux kernel , then check if i2c bit rate is right.

Regards,

Weidong

View solution in original post

0 Kudos
1 Reply
654 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hello,raghavendra,

     Open linux/arch/arm/mach-mx25/mx25_3stack.c, and adjust the following code, then Try :

static struct imxi2c_platform_data mxci2c_data = {
.bitrate = 100000, /* if you want 10K , .biitrate = 10000;*/
};

/*!
* Board specific initialization.
*/
static void __init mxc_board_init(void)
{
.....
#ifdef CONFIG_I2C
mxc_register_device(&mxc_i2c_device0, &mxci2c_data);
i2c_register_board_info(0, mxc_i2c_board_info,
    ARRAY_SIZE(mxc_i2c_board_info));
#endif
....
}

Recompile linux kernel , then check if i2c bit rate is right.

Regards,

Weidong

0 Kudos