Linux I2C development
 help / color / mirror / Atom feed
* I2C reads and writes
@ 2008-10-06  8:42 naveen krishna ch
       [not found] ` <ef0d8a250810060142k620ccd0h346724f7f8f507c6-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: naveen krishna ch @ 2008-10-06  8:42 UTC (permalink / raw)
  To: i2c-GZX6beZjE8VD60Wz+7aTrA


[-- Attachment #1.1: Type: text/plain, Size: 446 bytes --]

Hi all,

I am working on a device driver (One touch). The registers of which are
16bit wide and are addressed by 16 bit address.
The SMBus supports 16 bit read but address cannot be 16 bit in that case.

I used the i2c_transfer, i2c_master_send and i2c_master_recv  combinations
to read and write data to and from the
registers of the device. Is this a good and neater way to do so. If not can
anyone suggest me a better one.


-- 
Thanks,
Nayva

[-- Attachment #1.2: Type: text/html, Size: 527 bytes --]

[-- Attachment #2: Type: text/plain, Size: 157 bytes --]

_______________________________________________
i2c mailing list
i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org
http://lists.lm-sensors.org/mailman/listinfo/i2c

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

* Re: I2C reads and writes
       [not found] ` <ef0d8a250810060142k620ccd0h346724f7f8f507c6-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2008-10-06  9:18   ` Jean Delvare
  0 siblings, 0 replies; 2+ messages in thread
From: Jean Delvare @ 2008-10-06  9:18 UTC (permalink / raw)
  To: naveen krishna ch; +Cc: i2c-GZX6beZjE8VD60Wz+7aTrA

Hi Nayva,

On Mon, 6 Oct 2008 14:12:22 +0530, naveen krishna ch wrote:
> I am working on a device driver (One touch). The registers of which are
> 16bit wide and are addressed by 16 bit address.
> The SMBus supports 16 bit read but address cannot be 16 bit in that case.

Correct.

> I used the i2c_transfer, i2c_master_send and i2c_master_recv  combinations
> to read and write data to and from the
> registers of the device. Is this a good and neater way to do so. If not can
> anyone suggest me a better one.

This is the right way, yes.

-- 
Jean Delvare

_______________________________________________
i2c mailing list
i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org
http://lists.lm-sensors.org/mailman/listinfo/i2c

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

end of thread, other threads:[~2008-10-06  9:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-06  8:42 I2C reads and writes naveen krishna ch
     [not found] ` <ef0d8a250810060142k620ccd0h346724f7f8f507c6-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-10-06  9:18   ` Jean Delvare

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox