From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Frysinger Date: Tue, 22 Nov 2011 16:07:08 -0500 Subject: [U-Boot] [PATCH 1/2] efikamx: Configure the pins as GPIOs prior to using gpio_get_value. In-Reply-To: <4ECB5A33.5040502@denx.de> References: <1321884585-12501-1-git-send-email-fabio.estevam@freescale.com> <201111211622.34820.vapier@gentoo.org> <4ECB5A33.5040502@denx.de> Message-ID: <201111221607.09360.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Tuesday 22 November 2011 03:15:47 Stefano Babic wrote: > On 21/11/2011 22:22, Mike Frysinger wrote: > >> 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. > > In fact it would be nicer if gpio_request() takes care of the pinmux, > in the way I can see on the davinci SOCs. However, on the IMXs a > single GPIO can be connected (not at the same time, of course) to > different PADs, depending on a general setup (GPR register) or if the > daisy chain in the multiplexer is activated. if it's different physical pins, then perhaps it should be different GPIO numbers ? > The second point I will arise is that, mainly due to the different > internal layout but also for historical reasons, the setup and the > provided function for the multiplexer is very different among the SOCs. > > Only mx35 and mx5 expone the same interface (mxc_request_iomux), while > mx31/mx25/mx27/mx28 have its own. Because we use and we want to use > the GPIO framework, the gpio driver, common to all IMX SOCs, should be > able to set up the multiplexer independently from the SOC type, that > means we should have the same interface for the multiplexer, and we > have not (yet ?). this is shaking out in Linux with the pinmux framework, so probably best to grit our teeth until that's done and then adopt what they implement. -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: