linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: wellsk40@gmail.com (Kevin Wells)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 01/13] ARM: LPC32XX: Initial architecture header files
Date: Sat, 20 Feb 2010 11:17:17 -0800	[thread overview]
Message-ID: <a08234131002201117t5bbd350ybaf14613cef0c54f@mail.gmail.com> (raw)
In-Reply-To: <a08234131002201112x66a595c4j235bf1a31aef4f92@mail.gmail.com>

2010/2/20 Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
>
> Hey Kevin,
>
> > +/*
> > + * Note!
> > + * Muxed GP pins need to be setup to the GP state in the board level
> > + * code prior to using this driver.
> This is done by the imx machines, too, and I wonder if it's worth to try
> to get rid of that or at least let the gpio_direction_... functions fail
> if the pin isn't muxed as gpio. ?Thoughts?
>
HI Uwe,

In the current function of the driver, the assumption is that if an out pin
is used, it has already been muxed correctly, so requesting an output
for a pin not muxed as a GPI/O will work fine and even setting it's pin
level will work, but the level won't appear on the external pin. If
something decides to switch the mux after that state is programmed,
then the currently programmed output level will show up on that pin.

For state muxing, I would prefer to not have the GPIO driver change an
existing mux state to make a GPIO work. I don't return an error now
when a output state is used and is not muxed for an output state. But
its painless to add this.

GPI pins and GPIO pins configured as inputs always work regardless
of the muxed pin state and would never need to have a fail check, its
basically a raw pin state read.

> I didn't check the alternative functionalities for the gpios on lpc32xx,
> but what happens if any gpio is requested and the direction configured?
> Does it interfer with system functions? ?(E.g. if a pin is used in a
> dedicated say i2c function, does it make the i2c driver non-functional
> if I do gpio_direction_output(i2cpin, 1)?)
>

Setting a GPIO direction or output state will not effect a peripheral pin
(on this part) when muxed for the peripheral. (ie, setting a GPIO to output
and switching it to low when its shared with a UART pin and the mux is
setup for UART).

thanks,
Kevin

> Best regards
> Uwe
>
> --
> Pengutronix e.K. ? ? ? ? ? ? ? ? ? ? ? ? ? | Uwe Kleine-K?nig ? ? ? ? ? ?|
> Industrial Linux Solutions ? ? ? ? ? ? ? ? | http://www.pengutronix.de/ ?|

  parent reply	other threads:[~2010-02-20 19:17 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-19 23:25 LPC32XX architecture files (updated v4) wellsk40 at gmail.com
2010-02-19 23:25 ` [PATCH 01/13] ARM: LPC32XX: Initial architecture header files wellsk40 at gmail.com
2010-02-20 16:12   ` Uwe Kleine-König
     [not found]     ` <a08234131002201112x66a595c4j235bf1a31aef4f92@mail.gmail.com>
2010-02-20 19:14       ` Kevin Wells
2010-02-20 19:17       ` Kevin Wells [this message]
2010-02-22 21:41         ` Kevin Wells
2010-02-23  8:02           ` Uwe Kleine-König
2010-02-19 23:25 ` [PATCH 02/13] ARM: LPC32XX: Debug and IRQ macros wellsk40 at gmail.com
2010-02-19 23:25 ` [PATCH 03/13] ARM: LPC32XX: Clock driver wellsk40 at gmail.com
2010-02-20 16:33   ` Russell King - ARM Linux
2010-02-23 21:28     ` Kevin Wells
2010-02-19 23:26 ` [PATCH 04/13] ARM: LPC32XX: GPIO, timer, and IRQ drivers wellsk40 at gmail.com
2010-02-19 23:26 ` [PATCH 05/13] ARM: LPC32XX: System suspend support wellsk40 at gmail.com
2010-02-19 23:26 ` [PATCH 06/13] ARM: LPC32XX: Serial support code wellsk40 at gmail.com
2010-02-20 16:34   ` Russell King - ARM Linux
2010-02-19 23:26 ` [PATCH 07/13] ARM: LPC32XX: Misc support functions wellsk40 at gmail.com
2010-02-19 23:26 ` [PATCH 08/13] ARM: LPC32XX: Phytec 3250 platform support wellsk40 at gmail.com
2010-02-19 23:26 ` [PATCH 09/13] ARM: LPC32XX: Arch config menu supoport and makefiles wellsk40 at gmail.com
2010-02-19 23:26 ` [PATCH 10/13] ARM: LPC32XX: Default PHY3250 kernel config (ramdisk) wellsk40 at gmail.com
2010-02-19 23:26 ` [PATCH 11/13] ARM: Add support for the LPC32XX arch wellsk40 at gmail.com
2010-02-19 23:26 ` [PATCH 12/13] i2c: " wellsk40 at gmail.com
2010-02-19 23:26 ` [PATCH 13/13] WATCHDOG: " wellsk40 at gmail.com

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=a08234131002201117t5bbd350ybaf14613cef0c54f@mail.gmail.com \
    --to=wellsk40@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.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).