From: Mike Frysinger Date: Mon, 7 Nov 2011 14:02:59 -0500 Subject: [U-Boot] =?iso-8859-1?q?=5BPATCH_v8_2/4=5D_gpio=3A_Replace_ARM_gp?= =?iso-8859-1?q?io=2Eh_with_the_common=09API_in_include/asm-generic?= In-Reply-To: <74CDBE0F657A3D45AFBB94109FB122FF173F9A503D@HQMAIL01.nvidia.com> References: <20111103155325.44c2c88d0c424b184c7272e8@freescale.com> <201111071239.59834.vapier@gentoo.org> <74CDBE0F657A3D45AFBB94109FB122FF173F9A503D@HQMAIL01.nvidia.com> Message-ID: <201111071403.01055.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 Monday 07 November 2011 12:02:16 Stephen Warren wrote: > Mike Frysinger wrote at Monday, November 07, 2011 10:40 AM: > > On Monday 07 November 2011 11:35:33 Stephen Warren wrote: > > > Joe Hershberger wrote at Friday, November 04, 2011 8:25 PM: > > > > -void gpio_free(int gp) > > > > +int gpio_free(unsigned gpio) > > > > { > > > > + return 0; > > > > } > > > > > > If you're doing a cleanup pass on this driver, you may as well make > > > gpio_free() do something; it should probably clear > > > gpio_names[gpio].name and perhaps set the pin back to SFIO - in other > > > words, undo gpio_reqeust(). > > > > i think the decision made in Linux was that freeing a GPIO should not > > cause it to change tristate or anything. all it should do is mark it as > > "available" so something else can request it. > > OK, I'll buy that, but presumably gpio_names[gpio].name should still be > cleared to indicate the pin is free? if the tegra code is using the gpio_names[] array to determine whether a pin is allocated, then gpio_free() should take care of clearing it -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/20111107/9c93588d/attachment.pgp