Re: [PATCH] regulator: wm8994: Don't use devres for enable GPIOs

2018-11-21 Thread Marek Szyprowski
Hi Mark, On 2018-11-21 13:19, Mark Brown wrote: > On Wed, Nov 21, 2018 at 10:26:30AM +0100, Marek Szyprowski wrote: > >> from wm8994_ldo_remove(), switched to regulator_register() in >> wm8994_ldo_probe() and added regulator_unregister() in >> wm8994_ldo_remove(). This way the warning is gone. If

Re: [PATCH] regulator: wm8994: Don't use devres for enable GPIOs

2018-11-21 Thread Mark Brown
On Wed, Nov 21, 2018 at 10:26:30AM +0100, Marek Szyprowski wrote: > from wm8994_ldo_remove(), switched to regulator_register() in > wm8994_ldo_probe() and added regulator_unregister() in > wm8994_ldo_remove(). This way the warning is gone. If there is any I don't understand why you'd need to swit

Re: [PATCH] regulator: wm8994: Don't use devres for enable GPIOs

2018-11-21 Thread Charles Keepax
On Wed, Nov 21, 2018 at 10:26:30AM +0100, Marek Szyprowski wrote: > On 2018-11-20 18:25, Marek Szyprowski wrote: > > On 2018-11-20 18:01, Charles Keepax wrote: > > [ cut here ] > > WARNING: CPU: 0 PID: 1 at drivers/gpio/gpiolib.c:2421 > > regulator_ena_gpio_free+0x70/0xa0 >

Re: [PATCH] regulator: wm8994: Don't use devres for enable GPIOs

2018-11-21 Thread Marek Szyprowski
Hi, On 2018-11-20 18:25, Marek Szyprowski wrote: > Hi Charles, > > On 2018-11-20 18:01, Charles Keepax wrote: >> We need to manage the life time of the enable GPIO against the regulator >> device but the OF node lives on the parent MFD device. As such we can't >> use the devm functions which assum

Re: [PATCH] regulator: wm8994: Don't use devres for enable GPIOs

2018-11-20 Thread Marek Szyprowski
Hi Charles, On 2018-11-20 18:01, Charles Keepax wrote: > We need to manage the life time of the enable GPIO against the regulator > device but the OF node lives on the parent MFD device. As such we can't > use the devm functions which assume the same device will be used for > both. > > Reported-by

[PATCH] regulator: wm8994: Don't use devres for enable GPIOs

2018-11-20 Thread Charles Keepax
We need to manage the life time of the enable GPIO against the regulator device but the OF node lives on the parent MFD device. As such we can't use the devm functions which assume the same device will be used for both. Reported-by: Marek Szyprowski Signed-off-by: Charles Keepax --- This patch