From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Mon, 14 May 2012 13:31:35 +0200 Subject: [U-Boot] [PATCH 1/2] GPIO: Extend the cmd_gpio API by gpio_{from, to}_string() In-Reply-To: <201205140151.26092.vapier@gentoo.org> References: <1335905416-22535-1-git-send-email-marex@denx.de> <201205140151.26092.vapier@gentoo.org> Message-ID: <201205141331.35475.marex@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 Dear Mike Frysinger, > On Tuesday 01 May 2012 16:50:14 Marek Vasut wrote: > > The gpio_from_string() call shall parse the incoming GPIO name taken > > from the command line and return the GPIO number used within U-Boot or > > return -1 on error. > > i.e. the already existing name_to_gpio() func You mean blackfin specific macro crap? Let's actually drop that and switch over to this one. That was my intention from start. > > The gpio_to_string() on the other hand allows nicer reporting of GPIO > > name in the output of cmd_gpio. > > i don't see the value in this. we already have the string name from the > user, so all you've implemented is: > gpio_to_string(gpio_from_string(argv[])) > at which point, argv[] works fine. This allows for taking multiple different inputs, while reporting one unified output. > -mike Best regards, Marek Vasut