How do I change the default I2C bus frequency (speed), e.g. I have a I2C device which can only run at lower speed

In Digi Embedded Linux DEL-5.2 Change it here:
  arch/arm/mach-s3c2443/mach-cc9m2443js.c:793 :  .bus_freq = ..

for example:
a value of 400 * 1000 leads to output: s3c2410-i2c s3c2410-i2c: bus frequency set to 379KHz
a value of 200 * 1000 leads to output: s3c2410-i2c s3c2410-i2c: bus frequency set to 130KHz

static struct s3c2410_platform_i2c cc9m2443_i2c_info = {
 .flags          = 0,
 .bus_freq = 400 * 1000,    <- this value to change
 .max_freq = 500 * 1000,
 .bus_num = CONFIG_I2C_S3C2410_ADAPTER_NR,
};

Last updated: Oct 21, 2024

Recently Viewed

No recently viewed articles

Did you find this article helpful?