Re: [PATCH v5] pinctrl: to avoid duplicated calling enable_pinmux_setting for a pin
From: Stephen Warren
Date: Thu Jun 05 2014 - 11:49:32 EST
On 06/05/2014 12:50 AM, fwu@xxxxxxxxxxx wrote:
> From: Fan Wu <fwu@xxxxxxxxxxx>
>
> What the patch did:
> 1.To call pinmux_disable_setting ahead of pinmux_enable_setting in each time of
> calling pinctrl_select_state
> 2.Remove the HW disable operation in in pinmux_disable_setting function.
> 3.Remove the disable ops in struct pinmux_ops
> 4.Remove all the disable ops users in current code base.
...
The overall concept, plus the bcm2835, and Tegra driver parts,
Acked-by: Stephen Warren <swarren@xxxxxxxxxx>
That said ...
> diff --git a/drivers/pinctrl/pinctrl-tegra.c b/drivers/pinctrl/pinctrl-tegra.c
> -static void tegra_pinctrl_disable(struct pinctrl_dev *pctldev,
> - unsigned function, unsigned group)
> -{
> - struct tegra_pmx *pmx = pinctrl_dev_get_drvdata(pctldev);
> - const struct tegra_pingroup *g;
> - u32 val;
> -
> - g = &pmx->soc->groups[group];
> -
> - if (WARN_ON(g->mux_reg < 0))
> - return;
> -
> - val = pmx_readl(pmx, g->mux_bank, g->mux_reg);
> - val &= ~(0x3 << g->mux_bit);
> - val |= g->func_safe << g->mux_bit;
> - pmx_writel(pmx, val, g->mux_bank, g->mux_reg);
Those last 5 lines don't exist in the latest code, so this patch won't
apply cleanly. You probably want to rebase this on top of LinusW's
latest pinctrl development branch.
--
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/