[meta-freescale] speed of /dev/i2c-2 in imx6q sabre-lite

Eric Nelson eric.nelson at boundarydevices.com
Wed Aug 14 09:12:52 PDT 2013


Hi Thanassis,

On 08/14/2013 08:40 AM, Thanassis Silis wrote:
> Hi Eric,
> kernel configuration is no stranger to me as I am a longtime slackware
> user, but thank you for the info. It is always nice to know I have not
> understood something the wrong way.
>

Sorry if I was being pedantic. I thought that's what you were asking
and folks come in with all kinds of background.

> What I do not know is how the IMX_I2C_BIT_RATE (which is 100kHz) is
> related to the imxi2c_platform_data structure.
> The file drivers/i2c/busses/i2c_imx.c doesn't include
> arch/arm/mach-mx6/board_nitrogen6x.c (or _sabrelite.c for that matter)
> or vice-versa. So is it correct to say that i2c-imx.c sets the bitrate
> earlier in the boot process and then the platform specific code,
> overwrites/alters that value to what is set in board_nitrogen6x.c ?

Nope. The driver's "probe" routine gets handed the imxi2c_platform_data
structure from the device registration procedure in
board-mx6_nitrogen.c.

IOW, there's a run-time path, not a compile-time path. Otherwise, every
driver would need to know about every board that used it.

If you look closely, all of the uses of IMX_I2C_BIT_RATE are conditional
on either missing "pdata" (platform data) or a zero value for bitrate.

Regards,


Eric



More information about the meta-freescale mailing list