LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (http://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   How to send SMBus 2-byte command (16-bit reg address)? (http://www.linuxquestions.org/questions/linux-kernel-70/how-to-send-smbus-2-byte-command-16-bit-reg-address-923541/)

auwerk 01-13-2012 12:18 AM

How to send SMBus 2-byte command (16-bit reg address)?
 
Hi! I'm developing driver for sensor chip (camera), that is connected to SoC (TI DaVinci) via I2C interface. I started with reading sources of the drivers for similar devices. They all use i2c_smbus_* functions to make queries. The problem is that this functions are expecting 8-bit command (register address), but datasheet says that register address in I2C queries must be 16-bit. There's some mention of the similar thing in Kernel Documentation (for. ex.: http://git.kernel.org/?p=linux/kerne...smbus-protocol line 233), but I can not find how to use it.
Any ideas?

Mara 01-15-2012 10:01 AM

Look for i2c_smbus_xfer. Is it what you need?

UserA 01-29-2012 08:01 PM

I also faced with this problem. You should use i2c_master_send/recv only. (only for not x86 arch's)


All times are GMT -5. The time now is 06:50 AM.