"I2C_RDWR" ioctl returning EINVAL on Freescale mxc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

In my userspace driver for a temp sensor on a i2c bus, i am using the
/dev interface.  When i use plain read/write syscalls , they seem to
work just fine. But when i use a combined read/write using the IOCTL
"I2C_RDWR", i get a return of invalid argument i.e EINVAL from the
kernel space i2c dev/bus driver.

int rest  = ioctl(_fd, I2C_RDWR,  trans );

So basically res gets a value<1 on execution. I am putting in the
correct slave address. i have double checked on it. What could be the
other obvious reasons? Could endian ness be an issue as well although
the userspace is really invisible and if that had been the case i
would not have got acks from the slave for a i2c scan on the bus.
i checked the kernel bus driver code for the reason, but cannot figure
out just by reading the code at this point  as i have a broken h/w.
iam using the freescale  mxc i2c bus driver on the kernel side.

Any clues?
Thanks in advance.
-Alfred.
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux