[meta-freescale] how to access i2c bus on imx6q sabrelite

Thanassis Silis djnass_18 at hotmail.com
Wed Jul 24 03:44:48 PDT 2013


Hi there!
well, I am attempting to open /dev/i2c-2 directly from my application. 

I do get a file descriptor (i2c_fd!=-1) , but then sending the same data as I do from, i2cset does not yield the same result..


> Date: Wed, 24 Jul 2013 09:46:14 +1000
> Subject: Re: [meta-freescale] how to access i2c bus on imx6q sabrelite
> From: phil at blackmoth.com.au
> To: djnass_18 at hotmail.com
> CC: meta-freescale at yoctoproject.org
> 
> On Wed, Jul 24, 2013 at 2:30 AM, Thanassis Silis <djnass_18 at hotmail.com> wrote:
> > if, however, i try:
> >
> > i2cset 2 0x5A 0x1A 1
> >
> > it works! The "2" was a reasonable choice resembling i2c-2, but looking into
> > i2cset.c (& i2cbusses.c),
> > it seems that the code is looking into /dev/i2c/X, where X= the number given
> > in the argument).
> > But I have no "folder" /dev/i2c/.
> 
> The code first tries /dev/i2c/2, and when that fails it tries
> /dev/i2c-2. You can confirm this using strace.
> 
> > This is puzzling. What is more, I don't know how to access the i2c-2 bus
> > from my application, as
> 
> Your application can do the same as i2cset.
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/meta-freescale/attachments/20130724/91def37d/attachment.html>


More information about the meta-freescale mailing list