From: Ben Dooks <ben-i2c-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>
To: "Håvard Skinnemoen"
<hskinnemoen-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Eran Duchan <pavius-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>,
linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Grant Likely
<grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
Subject: Re: i2c-gpio performance issue w/MPC8xx @ 50 MHz
Date: Wed, 4 May 2011 22:50:49 +0100 [thread overview]
Message-ID: <20110504215049.GX15795@trinity.fluff.org> (raw)
In-Reply-To: <BANLkTik_mBMHJt-MzcSQfdnAhseBM5KwFg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On Sun, May 01, 2011 at 03:04:21PM -0700, Håvard Skinnemoen wrote:
> Hi Eran,
>
> Hmm. i2c-gpio overrides the udelay specified by the platform? That
> shouldn't happen. It does try to come up with some reasonable defaults
> if the platform doesn't specify any though.
[snip]
> You can probably create a minimal i2c-platform driver which just
> passes the platform-specific callbacks to i2c-algo-bit. I think it
> should be a new bus driver though...passing those callbacks to
> i2c-gpio would basically eliminate the very small amount of
> functionality this driver provides while making it more complex.
>
> i2c-gpio currently has 225 lines of code. I think it should be
> possible to write a i2c-platform driver in less than 100 lines.
> Probably worthwhile for 3x performance, although probably not if the
> GPIO hardware has concurrency issues.
I suppose this would work, but is it worth the additional code for what
may not be much of a win?
> > That being said, if you use GPIOs, it would certainly be better to find
> > out whether the extra delay you've been observing could be removed.
> > Properly requesting the GPIOs you need is definitely cleaner than
> > accessing the I/O port (or whatever) directly. Direct access can be
> > unreliable if other code is using GPIOs nearby.
>
> If your hardware allows you to control individual pins without
> affecting others, it's probably ok to bypass the GPIO layer (although
> you should probably still request the pins to prevent others from
> using them). If not, you should expect a lot of trouble.
yeuck.
--
Ben Dooks, ben-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org, http://www.fluff.org/ben/
Large Hadron Colada: A large Pina Colada that makes the universe disappear.
next prev parent reply other threads:[~2011-05-04 21:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-19 20:53 i2c-gpio performance issue w/MPC8xx @ 50 MHz Eran Duchan
[not found] ` <BANLkTikaS8yOTcO+OChvutB0syWdVBsh8g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-05-01 8:26 ` Jean Delvare
[not found] ` <20110501102603.7993da58-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
2011-05-01 22:04 ` Håvard Skinnemoen
[not found] ` <BANLkTik_mBMHJt-MzcSQfdnAhseBM5KwFg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-05-02 8:48 ` Eran Duchan
[not found] ` <BANLkTi=+JxbLfvjrh8A_KQ58CeJJB0wKjw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-05-05 18:54 ` Håvard Skinnemoen
[not found] ` <BANLkTikaifXi9+G-3=QAihqxZqPAuBSuGw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-05-05 19:48 ` Jean Delvare
2011-05-04 21:50 ` Ben Dooks [this message]
[not found] ` <20110504215049.GX15795-SMNkleLxa3Z6Wcw2j4pizdi2O/JbrIOy@public.gmane.org>
2011-05-05 18:42 ` Håvard Skinnemoen
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=20110504215049.GX15795@trinity.fluff.org \
--to=ben-i2c-elnmno+kys3ytjvyw6ydsg@public.gmane.org \
--cc=grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org \
--cc=hskinnemoen-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=pavius-Re5JQEeQqe8AvxtiuMwx3w@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;
as well as URLs for NNTP newsgroup(s).