[PATCH v3] pinctrl: Pass all configs to driver on pin_config_set()

Linus Walleij linus.walleij at linaro.org
Wed Aug 28 07:44:59 EDT 2013

On Mon, Aug 26, 2013 at 4:41 AM, Sherman Yin <syin at broadcom.com> wrote:

> When setting pin configuration in the pinctrl framework, pin_config_set() or
> pin_config_group_set() is called in a loop to set one configuration at a time
> for the specified pin or group.
> This patch 1) removes the loop and 2) changes the API to pass the whole pin
> config array to the driver.  It is now up to the driver to loop through the
> configs.  This allows the driver to potentially combine configs and reduce the
> number of writes to pin config registers.
> All c files changed have been build-tested to verify the change compiles and
> that the corresponding .o is successfully generated.
> Signed-off-by: Sherman Yin <syin at broadcom.com>
> Reviewed-by: Christian Daudt <csd at broadcom.com>
> Reviewed-by: Matt Porter <matt.porter at linaro.org>
>   drivers/pinctrl/pinconf.c             |   42 ++++----
>   drivers/pinctrl/pinctrl-tegra.c       |   69 ++++++------
>   include/linux/pinctrl/pinconf.h       |    6 +-
> Reviewed-by: Stephen Warren <swarren at nvidia.com>
>   On Tegra (Tegra114 Dalmore board, on top of next-20130816),
> Tested-by: Stephen Warren <swarren at nvidia.com>
> ---
> Please refer to the discussion with Linus W. "[PATCH] ARM: Adds pin config API
> to set all configs in one function" here:
> http://lists.infradead.org/pipermail/linux-arm-kernel/2013-May/166567.html
> All c files changed have been build-tested to verify the change compiles and
> that the corresponding .o are successfully generated.
> [v2]    rebased on LinusW's linux-pinctrl.git "devel" branch.  Fixed and build-
>         tested pinctrl-sunxi.c
> [v3]    rebased on linux-pinctrl.git:devel as of 2013.08.25. Applied API change
>         to new driver pinctrl-palmas.c. Re build-tested all files.

OK it appears to work flawlessly on ux500 as well, and with
Stephen's Tested-by and Laurent's ACK, there is really no
reason for me not to apply this right off. And no reason to
prolong this much needed change.

So patch applied for v3.12.

Let's see if something nasty happens in linux-next or this
is a go.

Linus Walleij

More information about the linux-rpi-kernel mailing list