Re: [PATCH v2 3/4] regulator-core: free requested GPIOs and managethe enable list

From: Mark Brown
Date: Sun Jan 27 2013 - 01:10:33 EST


On Tue, Jan 15, 2013 at 04:35:50AM +0000, Kim, Milo wrote:
> The regulator_ena_gpio_request() allocates the enable GPIO and add the list.
> Related resources should be released if they are not used any more.
> To free requested GPIO and remove it from the enable GPIO list,
> new function, 'regulator_ena_gpio_free()' is added.

Ah, sorry - I hadn't realised this patch had the cleanup code. This
needs a bit of an update - as I said for one of the earlier patches we
need to reference count to make sure we only free the GPIO when it has
no users. With this patch we will free the GPIO when the first
regulator to use it is freed which might mean other regulators are still
using it.

Attachment: signature.asc
Description: Digital signature