Re: [PATCH 2/2] pinctrl: tegra: use pinctrl-utils APIs for mapping

From: Stephen Warren
Date: Tue Aug 20 2013 - 16:28:35 EST


On 08/20/2013 06:12 AM, Laxman Dewangan wrote:
> Pin control utility functions provides the function for creating
> map lists.
>
> In place of implementing APIs locally in Tegra pin control driver
> for creating map lists, use the utility functions. This reduces
> the code size and avoid duplication.

This patch looks fine, so assuming the issue in patch 1/2 is fixed, this
patch,
Acked-by: Stephen Warren <swarren@xxxxxxxxxx>

One thought though:

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

> static const struct cfg_param {
> const char *property;
> enum tegra_pinconf_param param;
> @@ -212,12 +112,13 @@ static const struct cfg_param {
> {"nvidia,drive-type", TEGRA_PINCONF_PARAM_DRIVE_TYPE},
> };

If you add a new field to that struct that's a function pointer, which
parses the content of the property and gives back an unsigned log or
struct pinctrl_map, you could probably make most of
tegra_pinctrl_dt_subnode_to_map() be generic too...

But, that's certainly something for a separate patch if you want.
--
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/