Hi,
I'm finding accessing I2C from user space on the EVM365 thoroughly confounding. I've been reading .../Documentation/i2c and that hasn't been much help.
To begin with the constant to set SLAVE_ADDRESS via ioctl() is defined in <linux/i2c.h> rather than <i2c-dev.h>. I thought the former was to be used by kernel drivers.
Looking through <linux/i2c.h> I can see the smbus calls that I would like to use but they take a structure not a file descriptor as their first argument.
What I would like to do is read from a register-based device. For instance I'd like to read a 16-bit value at register 0x00 (version).
Since I was able to open the i2c-0 device and it appeared to set the slave address I then tried (guessing) to read three bytes and set the first byte as the register address of interest. Not surprisingly, this did not work. Can someone point me to some good examples?
Thanks,
Ken