[PATCH v2] pinctrl: reserve pins when states are activated

Stephen Warren swarren at wwwdotorg.org
Fri Oct 19 12:18:47 EDT 2012


On 10/19/2012 07:05 AM, Linus Walleij wrote:
> From: Linus Walleij <linus.walleij at linaro.org>
> 
> This switches the way that pins are reserved for multiplexing:
> 
> We used to do this when the map was parsed, at the creation of
> the settings inside the pinctrl handle, in pinmux_map_to_setting().
> 
> However this does not work for us, because we want to use the
> same set of pins with different devices at different times: the

> diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c

> @@ -689,7 +691,6 @@ static void pinctrl_put_locked(struct pinctrl *p, bool inlist)
>  			case PIN_MAP_TYPE_MUX_GROUP:
>  				if (state == p->state)
>  					pinmux_disable_setting(setting);
> -				pinmux_free_setting(setting);

Personally, I would keep that function, and just remove the body. I
believe that even though it currently doesn't have to do anything, it
provides documentation for where any required cleanup would be placed if
needed in the future.

If you still want to remove the function, pinconf_free_setting() should
also be removed, since that's empty right now.

Irrespective,

Acked-by: Stephen Warren <swarren at nvidia.com>



More information about the linux-arm-kernel mailing list