* Re: How can I use two command bytes for a block read?
[not found] <CAN=k24me3-OrpzHBww2J2_x62+iDtSRBTHwGH7pZ4RMqxSgpFA@mail.gmail.com>
@ 2011-08-12 14:29 ` Guenter Roeck
2011-08-12 14:53 ` Wayne Tams
0 siblings, 1 reply; 2+ messages in thread
From: Guenter Roeck @ 2011-08-12 14:29 UTC (permalink / raw)
To: Wayne Tams; +Cc: linux-i2c, lm-sensors@lm-sensors.org
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: How can I use two command bytes for a block read?
2011-08-12 14:29 ` How can I use two command bytes for a block read? Guenter Roeck
@ 2011-08-12 14:53 ` Wayne Tams
0 siblings, 0 replies; 2+ messages in thread
From: Wayne Tams @ 2011-08-12 14:53 UTC (permalink / raw)
To: Guenter Roeck; +Cc: linux-i2c, lm-sensors@lm-sensors.org
[-- Attachment #1.1: Type: text/plain, Size: 1253 bytes --]
Oops apologies, though your advice helped, problem solved.
Thanks
Wayne
On Fri, Aug 12, 2011 at 3:29 PM, Guenter Roeck
<guenter.roeck@ericsson.com>wrote:
> 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
>
>
[-- Attachment #1.2: Type: text/html, Size: 1864 bytes --]
[-- Attachment #2: Type: text/plain, Size: 153 bytes --]
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-08-12 14:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CAN=k24me3-OrpzHBww2J2_x62+iDtSRBTHwGH7pZ4RMqxSgpFA@mail.gmail.com>
2011-08-12 14:29 ` How can I use two command bytes for a block read? Guenter Roeck
2011-08-12 14:53 ` Wayne Tams
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox