[U-Boot] [PATCH 1/2] efikamx: Configure the pins as GPIOs prior to using gpio_get_value.
Mike Frysinger
vapier at gentoo.org
Mon Nov 21 22:22:33 CET 2011
On Monday 21 November 2011 15:53:45 Marek Vasut wrote:
> > On Monday 21 November 2011 14:29:50 Marek Vasut wrote:
> > > > On Monday 21 November 2011 09:20:49 Marek Vasut wrote:
> > > > > > Configure the pins as GPIOs prior to using gpio_get_value
> > > > > >
> > > > > > + else {
> > > > > > + mxc_request_iomux(MX51_PIN_GPIO1_8, IOMUX_CONFIG_ALT0);
> > > > > > *absent = gpio_get_value(IOMUX_TO_GPIO(MX51_PIN_GPIO1_8));
> > > > > > -
> > > > > > + }
> > > > >
> > > > > NAK. There should be some common function for setting up iomux of
> > > > > those pins. You souldn't set it in repeatedly called functions.
> > > >
> > > > that's what gpio_request() is for
> > >
> > > I mean in efika.c ... there should be a common place for these iomux
> > > configurations being done. This is unrelated to gpio ...
> >
> > not really ... imo, if someone does gpio_request(PIN), the gpio core
> > should take care of putting it into GPIO mode. people shouldn't have to
> > pinmux_request(PIN, GPIO_MODE) before doing gpio_request(PIN).
>
> Of course ... considering there's always one correct setting for the pin to
> be in GPIO mode, which I suspect might not be completely true today
> anymore.
i find it hard to envision a pinmux system where individual pins would have
different pinmux configurations to get it into GPIO mode. probably be saner to
have gpio_request() do the right thing and wait for someone to come forward
with the unusual setup -- worry about it then.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20111121/a31056ea/attachment.pgp>
More information about the U-Boot
mailing list