From: David Brownell <david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
To: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
Cc: "Aguirre Rodriguez,
Sergio Alberto" <saaguirre-l0cyMroinI0@public.gmane.org>,
"linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"Hiremath, Vaibhav" <hvaibhav-l0cyMroinI0@public.gmane.org>
Subject: Re: Calling an I2C camera sensor with SMBUS API?
Date: Fri, 12 Dec 2008 08:46:48 -0800 [thread overview]
Message-ID: <200812120846.48960.david-b@pacbell.net> (raw)
In-Reply-To: <20081212164426.27b4f5cd-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
On Friday 12 December 2008, Jean Delvare wrote:
> > So, should this automatically discard using SMBUS api for my case, or am
> > I missing something else? (like a SMBUS 16-bit expansion or so)
>
> You are correct, SMBus messaging implies an 8-bit command field (which
> is most frequently used for register addressing.) There are no 16-bit
> command variants.
How about the "proc call" ... 16 bits to the slave, 16 bits back?
That would be like a "read 16 bit register with 16 bit address".
ISTR we had that a routine supporting that at one point (and the
infrastructure for it is still there, emulation and all) but it was
removed because it was still seeking its first use.
> For writes, we can cheat because there is no
> direction change between the address and the data,
Cheat how?
> but for reads
> there's simply nothing we can do to work around this limitation. So,
> unless your device is write-only, you indeed can't use the SMBus-level
> API for 16-bit register addresses and you have to stick to the
> I2C-level API.
If addresses and data are both 16 bits, I only see how to do reads,
not writes, within the scope of the SMBus calls. Of course, SMBus
also supports byte and (small-)counted-array data too.
- Dave
> --
> Jean Delvare
>
>
next prev parent reply other threads:[~2008-12-12 16:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-11 23:55 Calling an I2C camera sensor with SMBUS API? Aguirre Rodriguez, Sergio Alberto
[not found] ` <A24693684029E5489D1D202277BE894415E6E424-EovWT4A8QTWIQmiDNMet8wC/G2K4zDHf@public.gmane.org>
2008-12-12 15:44 ` Jean Delvare
[not found] ` <20081212164426.27b4f5cd-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2008-12-12 16:46 ` David Brownell [this message]
[not found] ` <200812120846.48960.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
2008-12-12 17:07 ` Jean Delvare
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=200812120846.48960.david-b@pacbell.net \
--to=david-b-ybekhbn/0ldr7s880joybq@public.gmane.org \
--cc=hvaibhav-l0cyMroinI0@public.gmane.org \
--cc=khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=saaguirre-l0cyMroinI0@public.gmane.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox