linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* multiple byte read/write to I2C device
@ 2011-06-24 21:34 Xianghua Xiao
       [not found] ` <BANLkTi=VObOHgC3HsXuOF2rRVzNwbvGHsg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Xianghua Xiao @ 2011-06-24 21:34 UTC (permalink / raw)
  To: linux-i2c-u79uwXL29TY76Z2rM5mHXA

It appears i2cget/i2cset can only handle up to 2 bytes at once, I have
an I2C device that needs to send 4 bytes R/W, can i2cget/i2cset do
that?

Thanks,
Xianghua

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: multiple byte read/write to I2C device
       [not found] ` <BANLkTi=VObOHgC3HsXuOF2rRVzNwbvGHsg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2011-06-26 20:47   ` Jean Delvare
  0 siblings, 0 replies; 2+ messages in thread
From: Jean Delvare @ 2011-06-26 20:47 UTC (permalink / raw)
  To: Xianghua Xiao; +Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA, Guenter Roeck

On Fri, 24 Jun 2011 16:34:15 -0500, Xianghua Xiao wrote:
> It appears i2cget/i2cset can only handle up to 2 bytes at once, I have
> an I2C device that needs to send 4 bytes R/W, can i2cget/i2cset do
> that?

The SVN version of i2cset has support for block writes. This was
contributed by Guenter Roeck in:
http://www.lm-sensors.org/changeset/5911/i2c-tools/trunk/tools

i2cget indeed still lacks support for block reads, but that shouldn't
be too hard to implement, now that the way got paved by i2cset. In the
meantime you may be able to abuse i2cdump's "i" mode and grep the
output, but performance will suffer.

-- 
Jean Delvare

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-06-26 20:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-24 21:34 multiple byte read/write to I2C device Xianghua Xiao
     [not found] ` <BANLkTi=VObOHgC3HsXuOF2rRVzNwbvGHsg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-06-26 20:47   ` Jean Delvare

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).