[PATCH] pinctrl: Replace list_*() with get_*_count()

Stephen Warren swarren at wwwdotorg.org
Fri Mar 30 12:23:26 EDT 2012


On 03/29/2012 11:55 PM, Viresh Kumar wrote:
> Most of the SoC drivers implement list_groups() and list_functions() routines
> for pinctrl and pinmux. These routines continue returning zero until the
> selector argument is greater than total count of available groups or functions.
> 
> This patch replaces these list_*() routines with get_*_count() routines, which
> returns the number of available selection for SoC driver. pinctrl layer will use
> this value to check the range it can choose.
> 
> This patch fixes all user drivers for this change. There are other routines in
> user drivers, which have checks to check validity of selector passed to them. It
> is also no more required and hence removed.
> 
> Documentation updated as well.
> 
> Signed-off-by: Viresh Kumar <viresh.kumar at st.com>

This looks fine to me, so:

Acked-by: Stephen Warren <swarren at wwwdotorg.org>

One small issue to fix though: In pinctrl-tegra.c, you've removed all
the range-checkes from the ops functions, except you forgot to update
tegra_pinctrl_disable().

This is simple enough I don't think I need to test it; it doesn't
actually apply to my local tree since it conflicts with all the pinctrl
DT work I have.



More information about the linux-arm-kernel mailing list