Re: [PATCH 17/20] pinctrl: Add usecount to pins for muxing
From: Linus Walleij
Date: Wed Feb 22 2012 - 12:21:16 EST
On Mon, Feb 20, 2012 at 7:45 AM, Stephen Warren <swarren@xxxxxxxxxx> 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@xxxxxxxxxx>
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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/