lkml.org 
[lkml]   [2012]   [Feb]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 17/20] pinctrl: Add usecount to pins for muxing
From
On Mon, Feb 20, 2012 at 7:45 AM, Stephen Warren <swarren@nvidia.com> wrote:

> Multiple mapping table entries could reference the same pin, and hence
> "own" it. This would be unusual now that pinctrl_get() represents a single
> state for a client device, but in the future when it represents all known
> states for a device, this is quite likely. Implement reference counting
> for pin ownership to handle this.
>
> Signed-off-by: Stephen Warren <swarren@nvidia.com>

Seems like a good straight-forward way to solve this.

> diff --git a/drivers/pinctrl/core.h b/drivers/pinctrl/core.h
> index 1290995..64ae1b8 100644
> --- a/drivers/pinctrl/core.h
> +++ b/drivers/pinctrl/core.h
> @@ -92,6 +92,7 @@ struct pin_desc {
>        bool dynamic_name;
>        /* These fields only added when supporting pinmux drivers */
>  #ifdef CONFIG_PINMUX
> +       unsigned usecount;

kerneldoc for this? Preferably verbose...

Thanks,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2012-02-22 18:23    [from the cache]
©2003-2011 Jasper Spaans