From mboxrd@z Thu Jan 1 00:00:00 1970 From: Heiko Schocher Date: Mon, 20 Jul 2009 11:48:51 +0200 Subject: [U-Boot] [PATCH 0/2] arm nomadik: gpio and i2c In-Reply-To: <20090720093102.GA4423@mail.gnudd.com> References: <4A6437A7.40909@denx.de> <4A6422FC.6030508@invitel.hu> <20090719171353.5A910832E416@gemini.denx.de> <20090720080955.GA2640@mail.gnudd.com> <20090720093102.GA4423@mail.gnudd.com> Message-ID: <4A643D83.1040600@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello Alessandro, Alessandro Rubini wrote: >> what with deinit_pin(pin, function)? That would be in shape with init_pin()? > > No, it's not clear what it is. I'd rename "init" to "setup", adding an AF ok. > argument. So I can setup it as AF2, or as GPIO-OUT, or whatever. No I don;t understand you ;-) What means AF? Ah, while typing this, my brain parsed AF to Alternate Function, right? So, I am fine with that. >> (There, we could also unset the marker, that this pin is no longer used >> for gpio ...) > > No, I wouldn't like the marker. It's a boot loader, it shouldn't > overdo sanity checks. Most of the times it runs the same "bootcmd" > over and over. In the rare but important case it's a debugging tool, it > shouldn't force policy, in my opinion (I already have problems with the > kernel gpiolib, that doesn't let me fix mishaps at will). Ok, it was just a thought. If others agree I am fine with it. >> Also, a board can have more then one gpio adapter, how we address >> such a case? > > As Wolfgang suggested, we don't. If atmel calls it PORTC-12 I have no > problem calling it gpio-76 by concatentating the ports as 0..31, > 32..64, ... It's still better to have a gpio command than doing "mw > " over and over. Huh, missed I an Email? Didn;t see a response from Wolfgang ... Ah, yes, this is also an option, so we need to configure when adding a gpio_adapter, with which GPIO number the GPIOs in this adapter starts and how many GPIOs are accessible through it... OK, I am also fine with such an option. > In my old-fashioned way, it should be as simple as possible, but no simpler. ;-) bye Heiko -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany