* Re: [PATCH] regulator: rk808: make better use of the gpiod API
[not found] ` <20150721144100.GU11162@sirena.org.uk>
@ 2015-07-22 0:13 ` Krzysztof Kozlowski
2015-07-22 7:13 ` Uwe Kleine-König
0 siblings, 1 reply; 2+ messages in thread
From: Krzysztof Kozlowski @ 2015-07-22 0:13 UTC (permalink / raw)
To: Mark Brown, Uwe Kleine-König
Cc: Greg Kroah-Hartman, Linus Walleij, Liam Girdwood, linux-next,
linux-kernel, Chris Zhong, kernel, linux-pm, Rafael J. Wysocki,
Ulf Hansson, Kevin Hilman
On 21.07.2015 23:41, Mark Brown wrote:
> On Tue, Jul 21, 2015 at 04:35:24PM +0200, Uwe Kleine-König wrote:
>> On Tue, Jul 21, 2015 at 10:09:32PM +0900, Krzysztof Kozlowski wrote:
>
>>> The function looks empty so it can be removed entirely.
>
>> I assumed that not having a remove function makes the device not
>> detachable. Not sure about that.
>
> No, of course not - the remove function is completely optional.
>
>> Looking at the code I found that not having a remove function can yield
>> surprises, though. If your driver has a probe but no remove function the
>> platform bus glue calls
>
>> dev_pm_domain_attach(_dev, true);
>
>> at probe time, but not
>
>> dev_pm_domain_detach(_dev, true);
>
>> at remove. I admit I don't know about that dev_pm_domain stuff, but it
>> looks wrong to only have one but not the other. Greg?
>
> That looks like a bug, yes.
Cc: linux-pm, Kevin, Rafael, Ulf
I agree, device should be detached from domain regardless of presence of
remove callback.
Documentation (like Documentation/driver-model/driver.txt) does not
mention that remove callback is necessary for unbinding devices. There
is no sense in storing empty removal callbacks.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] regulator: rk808: make better use of the gpiod API
2015-07-22 0:13 ` [PATCH] regulator: rk808: make better use of the gpiod API Krzysztof Kozlowski
@ 2015-07-22 7:13 ` Uwe Kleine-König
0 siblings, 0 replies; 2+ messages in thread
From: Uwe Kleine-König @ 2015-07-22 7:13 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Mark Brown, Greg Kroah-Hartman, Linus Walleij, Liam Girdwood,
linux-next, linux-kernel, Chris Zhong, kernel, linux-pm,
Rafael J. Wysocki, Ulf Hansson, Kevin Hilman
Hello,
On Wed, Jul 22, 2015 at 09:13:51AM +0900, Krzysztof Kozlowski wrote:
> On 21.07.2015 23:41, Mark Brown wrote:
> > That looks like a bug, yes.
>
> Cc: linux-pm, Kevin, Rafael, Ulf
Good idea. Note I already sent a patch to Greg that you might want to
look at, too:
http://article.gmane.org/gmane.linux.kernel/2001345
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-07-22 7:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20150721132945.7ffc443b@canb.auug.org.au>
[not found] ` <1437461993-14860-1-git-send-email-u.kleine-koenig@pengutronix.de>
[not found] ` <CAJKOXPfY4zYtWKa6U4mzBjtS87HZepOV_hHodU2QJaJrLcr9qQ@mail.gmail.com>
[not found] ` <20150721143524.GD9981@pengutronix.de>
[not found] ` <20150721144100.GU11162@sirena.org.uk>
2015-07-22 0:13 ` [PATCH] regulator: rk808: make better use of the gpiod API Krzysztof Kozlowski
2015-07-22 7:13 ` Uwe Kleine-König
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).