lkml.org 
[lkml]   [2013]   [May]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] pinctrl: sink pinctrldev_list_mutex
From
On Tue, May 28, 2013 at 5:14 PM, Stephen Warren <swarren@wwwdotorg.org> wrote:
> [Me]
>> But it'd be even cooler to actually just iterate over the
>> pinctrl_list och handles and orphan them, and later recouple
>> them if a driver is loaded back in.
>
> Hmm. What happens if the client driver wants to select a different state
> while the pinctrl driver itself isn't loaded? I'm not sure how workable
> that is. I think the only way to make it work would be to cache enough
> information in the struct pinctrl that it could be activated even if the
> driver wasn't loaded. That seems a little scary.

Yes it looks like that would lead to a bit of scalability problem in the
struct pinctrl. If for nothing else than for the fact that it will eat
memory and such :-(

> I'd be fine if there was a requirement to unload all drives that were
> clients of the pinctrl driver before you could unload the pinctrl
> driver, just like any other driver/subsystem. This would work fine at
> least for testing with just hogs, which while not great for full-system
> testing would surely be fine at least when first developing the pinctrl
> driver.

Yes ... so if we call
get_device(pctldev->dev)/put_device(pctldev->dev)
for any successful pinctrl_get() which is not a hog,
we increase the refcount so that the device core will disallow
unloading of the driver.

Now I need to figure out how to do that.

Yours,
Linus Walleij


\
 
 \ /
  Last update: 2013-05-29 19:01    [W:0.049 / U:0.516 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site