Olimex Support Forum

OLinuXino Android / Linux boards and System On Modules => iMX233 => Topic started by: akhil on December 22, 2018, 12:49:30 PM

Title: I2C Library Support
Post by: akhil on December 22, 2018, 12:49:30 PM
Hello,

        I wanted to know if there is any i2c library for this board? I found a file gpio-mmap for the gpios, Similarly is there any code for i2c as well?
Any help is greatly appreciated!

Thank you,
Akhil
Title: Re: I2C Library Support
Post by: lambda on December 23, 2018, 01:55:40 AM
See https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/i2c/busses/i2c-mxs.c
Title: Re: I2C Library Support
Post by: akhil on December 23, 2018, 06:52:07 PM
Hello,
             In this particular file that you shared, which all functions has to be called in order to intialize the I2C Bus? And "mxs_i2c_pio_trigger_write_cmd" is used to write data to the bus?
Title: Re: I2C Library Support
Post by: lambda on December 24, 2018, 01:29:33 PM
I only ever used this kernel module as is via /dev/ic2-0 - no idea how to directly interface with it manually.
Title: Re: I2C Library Support
Post by: gur468 on March 03, 2020, 08:43:27 PM
i am not very familiar to kernel module, can any one give some example to use this *.c for /dev/i2c-2.

as i am getting
"Error opening device '/dev/i2c-0'"