Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Linux - Kernel This forum is for all discussion relating to the Linux kernel.


  Search this Thread
Old 01-13-2012, 01:18 AM   #1
LQ Newbie
Registered: Jan 2012
Location: Russia, Vladimir
Posts: 1

Rep: Reputation: Disabled
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.: line 233), but I can not find how to use it.
Any ideas?
Old 01-15-2012, 11:01 AM   #2
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,551

Rep: Reputation: 161Reputation: 161
Look for i2c_smbus_xfer. Is it what you need?
Old 01-29-2012, 09:01 PM   #3
LQ Newbie
Registered: Jan 2012
Posts: 1

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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] memcpy fails to copy data, but byte by byte assignment work venu_s Programming 7 07-08-2011 04:29 AM
Bit shifting 6-byte value into a u64 ranthal Linux - Kernel 5 07-07-2009 10:26 PM
LBA address to actual byte offset x0563511 Linux - Hardware 3 02-25-2009 07:14 PM
How to send byte from serial port neutron001 Linux - Software 9 03-31-2008 06:48 PM
issues reg ICMP timestamp and address mask request bzlaskar Linux - Networking 0 09-12-2007 01:13 AM

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

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration