From: Anton Vorontsov <avorontsov@ru.mvista.com>
To: Michael Barkowski <michaelbarkowski@ruggedcom.com>
Cc: linuxppc-dev@ozlabs.org, Timur Tabi <timur@freescale.com>
Subject: Re: [PATCH v2] qe_lib: Set gpio data before changing the direction to output
Date: Wed, 19 Aug 2009 17:32:27 +0400 [thread overview]
Message-ID: <20090819133227.GA29934@oksana.dev.rtsoft.ru> (raw)
In-Reply-To: <4A8BFE6C.9030604@ruggedcom.com>
On Wed, Aug 19, 2009 at 09:30:20AM -0400, Michael Barkowski wrote:
> Anton Vorontsov wrote:
> > On Tue, Aug 18, 2009 at 05:33:00PM -0500, Timur Tabi wrote:
> >> Anton Vorontsov wrote:
> >>> On Tue, Aug 18, 2009 at 05:20:44PM -0400, Michael Barkowski wrote:
> >>>> This avoids having a short glitch if the desired initial value is not
> >>>> the same as what was previously in the data register.
> >>>>
> >>>> Signed-off-by: Michael Barkowski <michaelbarkowski@ruggedcom.com>
> >>> Acked-by: Anton Vorontsov <avorontsov@ru.mvista.com>
> >> I don't have the time to test this patch, so I abstain from acking. :-)
> >> If Anton likes it, that's good enough for me.
> >
> > You made me doubt for a moment. :-) Thanks for the suspiciousness.
> >
> > What happens if a pin was previously configured as input? Does our
> > write to the data register survive? For MPC8xxx GPIO controllers
> > it does. And randomly taken QE spec says:
> >
> > A write to CPDAT is latched, and if the corresponding CPDIR
> > bits have configured the port pin as an output, the latched
> > value is driven onto the respective pin. However, if the
> > corresponding CPDIR bits have configured the port pin as an
> > input, the latched value is prevented from reaching the pin.
> >
> > I guess we're safe, but Michael, could you actually test it
> > (if not already)?
> >
>
> I had tested it before with the pin initially configured as "disabled".
>
> I have now also tested it with the pin initially configured as "input".
>
> The value written to CPDAT seems to survive and is driven onto the pin
> once CPDIR is changed to 1, just as noted in the spec.
>
> Tested on 8360, by probing with a logic analyzer.
Great, thanks a lot! I think the patch is perfect.
--
Anton Vorontsov
email: cbouatmailru@gmail.com
irc://irc.freenode.net/bd2
next prev parent reply other threads:[~2009-08-19 13:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-18 20:59 [PATCH] qe_lib: Set gpio data before changing the direction to output Michael Barkowski
[not found] ` <20090818210805.GA1725@oksana.dev.rtsoft.ru>
2009-08-18 21:20 ` [PATCH v2] " Michael Barkowski
2009-08-18 21:33 ` Anton Vorontsov
2009-08-18 22:33 ` Timur Tabi
2009-08-18 22:56 ` Anton Vorontsov
2009-08-19 13:30 ` Michael Barkowski
2009-08-19 13:32 ` Anton Vorontsov [this message]
2009-08-25 14:44 ` Kumar Gala
[not found] ` <4A8B183D.2030202@freescale.com>
2009-08-18 21:23 ` [PATCH] " Michael Barkowski
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=20090819133227.GA29934@oksana.dev.rtsoft.ru \
--to=avorontsov@ru.mvista.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=michaelbarkowski@ruggedcom.com \
--cc=timur@freescale.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).