All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <guenter.roeck@ericsson.com>
To: Wayne Tams <wayne.tams@gmail.com>
Cc: linux-i2c@vger.kernel.org,
	"lm-sensors@lm-sensors.org" <lm-sensors@lm-sensors.org>
Subject: Re: How can I use two command bytes for a block read?
Date: Fri, 12 Aug 2011 07:29:51 -0700	[thread overview]
Message-ID: <20110812142951.GA23938@ericsson.com> (raw)
In-Reply-To: <CAN=k24me3-OrpzHBww2J2_x62+iDtSRBTHwGH7pZ4RMqxSgpFA@mail.gmail.com>

On Fri, Aug 12, 2011 at 05:21:15AM -0400, Wayne Tams wrote:
> Hi,
> 
> I am having a little bother interfacing with a device that requires two command
> bytes for both reads and writes. I can perform a successful write using I2C
> writes but I would rather use the user-space i2c_smbus_ functions from
> i2c-dev.h. In the i2c-dev documentation (http://lxr.free-electrons.com/source/
> Documentation/i2c/smbus-protocol?v=2.6.35;a=arm#L225) there is a mention of a
> two byte command block read but there does not appear to be any supporting
> function in i2c-dev.h. Is there a patch available to add this functionality or
> could there be another approach?
> 
> Just to clarify I need my smbus read transaction to look like this:
> 
> 
> 
>  S Addr Wr [A] Comm1 [A] Comm2 [A] S Addr Rd [A] [Data] A [Data] A ... A [Data] NA P
> 
> Thanks
> 
> Wayne

Wrong mailing list. Try linux-i2c@vger.kernel.org (copied).

As a general hint, eeprom drivers such as drivers/misc/eeprom/at24.c do this;
you might want to have a look.

Guenter


_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

WARNING: multiple messages have this Message-ID (diff)
From: Guenter Roeck <guenter.roeck@ericsson.com>
To: Wayne Tams <wayne.tams@gmail.com>
Cc: linux-i2c@vger.kernel.org,
	"lm-sensors@lm-sensors.org" <lm-sensors@lm-sensors.org>
Subject: Re: [lm-sensors] How can I use two command bytes for a block read?
Date: Fri, 12 Aug 2011 14:29:51 +0000	[thread overview]
Message-ID: <20110812142951.GA23938@ericsson.com> (raw)
In-Reply-To: <CAN=k24me3-OrpzHBww2J2_x62+iDtSRBTHwGH7pZ4RMqxSgpFA@mail.gmail.com>

On Fri, Aug 12, 2011 at 05:21:15AM -0400, Wayne Tams wrote:
> Hi,
> 
> I am having a little bother interfacing with a device that requires two command
> bytes for both reads and writes. I can perform a successful write using I2C
> writes but I would rather use the user-space i2c_smbus_ functions from
> i2c-dev.h. In the i2c-dev documentation (http://lxr.free-electrons.com/source/
> Documentation/i2c/smbus-protocol?v=2.6.35;a=arm#L225) there is a mention of a
> two byte command block read but there does not appear to be any supporting
> function in i2c-dev.h. Is there a patch available to add this functionality or
> could there be another approach?
> 
> Just to clarify I need my smbus read transaction to look like this:
> 
> 
> 
>  S Addr Wr [A] Comm1 [A] Comm2 [A] S Addr Rd [A] [Data] A [Data] A ... A [Data] NA P
> 
> Thanks
> 
> Wayne

Wrong mailing list. Try linux-i2c@vger.kernel.org (copied).

As a general hint, eeprom drivers such as drivers/misc/eeprom/at24.c do this;
you might want to have a look.

Guenter


_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

  reply	other threads:[~2011-08-12 14:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-12  9:21 [lm-sensors] How can I use two command bytes for a block read? Wayne Tams
2011-08-12 14:29 ` Guenter Roeck [this message]
2011-08-12 14:29   ` Guenter Roeck
2011-08-12 14:53   ` Wayne Tams
2011-08-12 14:53     ` [lm-sensors] " Wayne Tams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110812142951.GA23938@ericsson.com \
    --to=guenter.roeck@ericsson.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=lm-sensors@lm-sensors.org \
    --cc=wayne.tams@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.