From: Wolfram Sang <wsa@the-dreams.de>
To: Stijn Devriendt <highguy@gmail.com>
Cc: linux-i2c@vger.kernel.org, linux-sh@vger.kernel.org,
Magnus Damm <magnus.damm@gmail.com>,
Simon Horman <horms@verge.net.au>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Geert Uytterhoeven <geert@linux-m68k.org>,
LKML <linux-kernel@vger.kernel.org>,
linux-arm-kernel@lists.infradead.org,
Jean Delvare <jdelvare@suse.de>
Subject: Re: [PATCH 2/3] i2c: slave-eeprom: add eeprom simulator driver
Date: Wed, 26 Nov 2014 13:22:50 +0100 [thread overview]
Message-ID: <20141126122250.GA4397@katana> (raw)
In-Reply-To: <CAOY=C6F6TMyeDvNneBV6K5hVjoG+qk-1Y_R3oJkEiGxhLOoQ0A@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1923 bytes --]
> My bad, will minimize the overhead in the future.
Thanks!
> I think usable semantics could be that a slave driver can indicate at any
> point during an I2C read transaction that the next X bytes should be
> returned from a buffer and for a write transaction, that the next X bytes
> should be buffered before passed on to the driver. When the transaction
Yes, if we have something like that it should definately be that the
slave driver offers a buffer and the bus driver may accept the buffer or
not. Buffers should be opt-in and slave drivers will always have to
support byte-based transactions as the ultimate fallback because this is
how the vast majority of HW works (at least those I checked).
That makes me really wonder if there will be a case where performance is
so important that buffer handling is coded on top of the always needed
byte based handling?
More so, I'd think most slaves will have stuff like registers. So,
buffered writes usually won't make sense because setting bits should
cause an action immediately. And reading bits will have the problem of
data getting stale. I'd think this is the biggest use case of I2C.
Except for reading an EEPROM _once_ ;)
> ends or the adapter reaches the end of the buffer, it indicates this to
> the driver which can then either cleanup or otherwise act accordingly.
Or the adapter encounters an unexpected STOP. Cleanups need to handle
interrupted transactions as well. I'd think this is a bit more error
prone, because people would need to check a return value and compare it
to the number of bytes they wanted. Not a show stopper, but also nothing
I want to throw in too easily.
> But as you say, this can be added later on when the need arises.
I'd really say so.
> Just checked components we're using and stop/repeated-start both
> transition into the same state.
Good, thanks for checking! May I ask which components you are using?
Wolfram
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2014-11-26 12:22 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-18 16:04 [PATCH 0/3] i2c: slave support framework for Linux devices Wolfram Sang
2014-11-18 16:04 ` [PATCH 2/3] i2c: slave-eeprom: add eeprom simulator driver Wolfram Sang
2014-11-20 22:39 ` Stijn Devriendt
2014-11-22 18:12 ` Wolfram Sang
2014-11-25 22:07 ` Stijn Devriendt
2014-11-26 12:22 ` Wolfram Sang [this message]
2014-11-26 12:25 ` Alexander Kochetkov
[not found] ` <2A7C987F-15E0-46FD-A711-E7F5BA9893FC-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-11-26 12:49 ` Wolfram Sang
2014-11-21 7:19 ` Uwe Kleine-König
[not found] ` <20141121071941.GK27002-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2014-11-21 14:16 ` Uwe Kleine-König
2014-11-22 18:14 ` Wolfram Sang
2014-11-23 18:52 ` Uwe Kleine-König
2014-11-22 18:26 ` Wolfram Sang
2014-11-23 20:20 ` Uwe Kleine-König
[not found] ` <20141123202008.GE4431-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2014-11-24 20:40 ` Wolfram Sang
[not found] ` <1416326695-13083-1-git-send-email-wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
2014-11-18 16:04 ` [PATCH 1/3] i2c: core changes for slave support Wolfram Sang
2014-11-18 16:04 ` [PATCH 3/3] i2c: rcar: add " Wolfram Sang
2014-12-11 21:26 ` [PATCH 0/3] i2c: slave support framework for Linux devices Wolfram Sang
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=20141126122250.GA4397@katana \
--to=wsa@the-dreams.de \
--cc=geert@linux-m68k.org \
--cc=highguy@gmail.com \
--cc=horms@verge.net.au \
--cc=jdelvare@suse.de \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=magnus.damm@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).