From: Jean Delvare <khali@linux-fr.org>
To: "Maciej W. Rozycki" <macro@linux-mips.org>
Cc: David Brownell <david-b@pacbell.net>,
linux-mips@linux-mips.org, mgreer@mvista.com,
rtc-linux@googlegroups.com, Atsushi Nemoto <anemo@mba.ocn.ne.jp>,
linux-kernel@vger.kernel.org, i2c@lm-sensors.org, ab@mycable.de
Subject: Re: [RFC][PATCH 4/4] RTC: SMBus support for the M41T80,
Date: Sat, 10 May 2008 09:08:01 +0200 [thread overview]
Message-ID: <20080510090801.74da049d@hyperion.delvare> (raw)
In-Reply-To: <Pine.LNX.4.55.0805092202380.10552@cliff.in.clinika.pl>
On Fri, 9 May 2008 22:22:11 +0100 (BST), Maciej W. Rozycki wrote:
> > > You can issue a block read of up to 5 bytes (6 if you add the PEC byte
> > > which is not interpreted by the controller in any way). And you can issue
> > > a block write of up to 4 bytes (5 with PEC). That's clearly not enough
> > > for the m41t81 let alone a generic implementation.
> >
> > Right. Possibly worth updating i2c-sibyte to be able to perform
> > those calls through the "smbus i2c_block" calls; but maybe not.
> > (Those calls aren't true SMBus calls, but many otherwise-SMBus-only
> > controllers can handle them, hence the i2c_smbus_* prefix.)
>
> I am not sure such a limited functionality is worth the hassle of making
> it available to clients in a reasonably clean way. How common an
> extension of this kind is among SMBus controllers? I would say if there
> are other controllers providing it (perhaps for a different range of
> transfer lengths) and clients benefitting from it, it might be worth
> adding it for this controller as well. Otherwise perhaps let's wait till
> somebody complains about the lack of this functionality?
The problem is that the interface for client drivers to query the
adapters capabilities is rather limited. There's just one bit for I2C
block read, so if an adapter has limitations in the size of requests it
can accept (beyond the traditional 32-byte limit that comes from SMBus)
it can't express it. This means that client drivers should expect
transaction requests to fail even if they checked that the transaction
type in question was supported. Most client drivers don't actually
expect that.
My advice would be to only bother implementing restricted support for a
transaction type if there's a big benefit in doing so. And then, double
check that all the client drivers that are likely to be used with the
adapter in question, are robust enough to deal with the restrictions
gracefully.
--
Jean Delvare
next prev parent reply other threads:[~2008-05-10 7:08 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-07 8:20 [RFC][PATCH 4/4] RTC: SMBus support for the M41T80, David Brownell
[not found] ` <200805070120.03821.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
2008-05-07 22:28 ` Maciej W. Rozycki
[not found] ` <Pine.LNX.4.55.0805072226180.25644-j8+e0ZhYU2SU0huXySazC6sMm+1xrEX8@public.gmane.org>
2008-05-07 23:25 ` David Brownell
[not found] ` <200805071625.20430.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
2008-05-08 7:46 ` Jean Delvare
[not found] ` <20080508094620.5e6c973b-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2008-05-09 8:39 ` David Brownell
2008-05-09 0:43 ` Maciej W. Rozycki
2008-05-09 8:08 ` [i2c] " Jean Delvare
2008-05-09 20:55 ` Maciej W. Rozycki
2008-05-09 21:21 ` Jean Delvare
2008-05-10 2:21 ` Maciej W. Rozycki
2008-05-10 6:53 ` Jean Delvare
2008-05-10 16:36 ` David Brownell
2008-05-20 9:20 ` Jean Delvare
2008-05-09 9:18 ` David Brownell
2008-05-09 21:22 ` Maciej W. Rozycki
2008-05-10 7:08 ` Jean Delvare [this message]
2008-05-09 14:17 ` Atsushi Nemoto
2008-05-08 7:34 ` [RFC][PATCH 4/4] RTC: SMBus support for the M41T80 Jean Delvare
[not found] ` <20080508093456.340a42b0-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2008-05-09 19:18 ` Maciej W. Rozycki
[not found] ` <Pine.LNX.4.55.0805091917370.10552-j8+e0ZhYU2SU0huXySazC6sMm+1xrEX8@public.gmane.org>
2008-05-09 20:27 ` Jean Delvare
2008-05-10 1:35 ` Maciej W. Rozycki
2008-05-10 8:35 ` Jean Delvare
2008-05-11 1:59 ` Maciej W. Rozycki
2008-05-11 7:40 ` Jean Delvare
2008-05-12 2:45 ` Atsushi Nemoto
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=20080510090801.74da049d@hyperion.delvare \
--to=khali@linux-fr.org \
--cc=ab@mycable.de \
--cc=anemo@mba.ocn.ne.jp \
--cc=david-b@pacbell.net \
--cc=i2c@lm-sensors.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=macro@linux-mips.org \
--cc=mgreer@mvista.com \
--cc=rtc-linux@googlegroups.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox