Re: [PATCH 2/3] regulator: Only free GPIOs if the core requested them

2018-11-30 Thread Linus Walleij
On Fri, Nov 23, 2018 at 3:25 PM Mark Brown wrote: > However even with patch 3 I think it'd be better to base this off the > rest of Linus' series for converting to descriptors (which is currently > sitting waiting for some more testing) since that will convert > everything to descriptors and so r

Re: [PATCH 2/3] regulator: Only free GPIOs if the core requested them

2018-11-23 Thread Mark Brown
On Thu, Nov 22, 2018 at 05:30:14PM +, Charles Keepax wrote: > Currently, the regulator core will take ownership of any GPIO passed > into it. Makes end driver code fairly error prone as the normal devm_ > patterns of allocation don't work. Update the regulator core to only > free the GPIO if it

Re: [PATCH 2/3] regulator: Only free GPIOs if the core requested them

2018-11-23 Thread Marek Szyprowski
Hi Charles, On 2018-11-22 18:30, Charles Keepax wrote: > Currently, the regulator core will take ownership of any GPIO passed > into it. Makes end driver code fairly error prone as the normal devm_ > patterns of allocation don't work. Update the regulator core to only > free the GPIO if it request

Re: [PATCH 2/3] regulator: Only free GPIOs if the core requested them

2018-11-22 Thread Linus Walleij
On Thu, Nov 22, 2018 at 6:30 PM Charles Keepax wrote: > Currently, the regulator core will take ownership of any GPIO passed > into it. Makes end driver code fairly error prone as the normal devm_ > patterns of allocation don't work. Update the regulator core to only > free the GPIO if it request

[PATCH 2/3] regulator: Only free GPIOs if the core requested them

2018-11-22 Thread Charles Keepax
Currently, the regulator core will take ownership of any GPIO passed into it. Makes end driver code fairly error prone as the normal devm_ patterns of allocation don't work. Update the regulator core to only free the GPIO if it requested it, this allows the drivers to manage the GPIO lifetime as th