mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-06-29 23:43:21 -04:00
pinctrl: aspeed: Force to disable the function's signal
When the driver want to disable the signal of the function, it doesn't need to query the state of the mux function's signal on a pin. The condition below will miss the disable of the signal: Ball | Default | P0 Signal | P0 Expression | Other -----+---------+-----------+-----------------------------+---------- E21 GPIOG0 SD2CLK SCU4B4[16]=1 & SCU450[1]=1 GPIOG0 -----+---------+-----------+-----------------------------+---------- B22 GPIOG1 SD2CMD SCU4B4[17]=1 & SCU450[1]=1 GPIOG1 -----+---------+-----------+-----------------------------+---------- Assume the register status like below: SCU4B4[16] == 1 & SCU4B4[17] == 1 & SCU450[1]==1 After the driver set the Ball E21 to the GPIOG0: SCU4B4[16] == 0 & SCU4B4[17] == 1 & SCU450[1]==0 When the driver want to set the Ball B22 to the GPIOG1, the condition of the SD2CMD will be false causing SCU4B4[17] not to be cleared. Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com> Acked-by: Andrew Jeffery <andrew@aj.id.au> Link: https://lore.kernel.org/r/20220818101839.28860-1-billy_tsai@aspeedtech.com Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
1ebfe7e361
commit
cf517fef60
1 changed files with 1 additions and 10 deletions
|
@ -92,19 +92,10 @@ static int aspeed_sig_expr_enable(struct aspeed_pinmux_data *ctx,
|
||||||
static int aspeed_sig_expr_disable(struct aspeed_pinmux_data *ctx,
|
static int aspeed_sig_expr_disable(struct aspeed_pinmux_data *ctx,
|
||||||
const struct aspeed_sig_expr *expr)
|
const struct aspeed_sig_expr *expr)
|
||||||
{
|
{
|
||||||
int ret;
|
|
||||||
|
|
||||||
pr_debug("Disabling signal %s for %s\n", expr->signal,
|
pr_debug("Disabling signal %s for %s\n", expr->signal,
|
||||||
expr->function);
|
expr->function);
|
||||||
|
|
||||||
ret = aspeed_sig_expr_eval(ctx, expr, true);
|
return aspeed_sig_expr_set(ctx, expr, false);
|
||||||
if (ret < 0)
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
if (ret)
|
|
||||||
return aspeed_sig_expr_set(ctx, expr, false);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue