mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00:00
pinctrl: aspeed: Fix GPI only function problem.
[ Upstream commit9b92f5c51e] Some gpio pin at aspeed soc is input only and the prefix name of these pin is "GPI" only. This patch fine-tune the condition of GPIO check from "GPIO" to "GPI" and it will fix the usage error of banks D and E in the AST2400/AST2500 and banks T and U in the AST2600. Fixes:4d3d0e4272("pinctrl: Add core support for Aspeed SoCs") Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com> Reviewed-by: Andrew Jeffery <andrew@aj.id.au> Link: https://lore.kernel.org/r/20201030055450.29613-1-billy_tsai@aspeedtech.com Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
439bbd2f93
commit
6726fbff19
@@ -286,13 +286,14 @@ int aspeed_pinmux_set_mux(struct pinctrl_dev *pctldev, unsigned int function,
|
|||||||
static bool aspeed_expr_is_gpio(const struct aspeed_sig_expr *expr)
|
static bool aspeed_expr_is_gpio(const struct aspeed_sig_expr *expr)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* The signal type is GPIO if the signal name has "GPIO" as a prefix.
|
* The signal type is GPIO if the signal name has "GPI" as a prefix.
|
||||||
* strncmp (rather than strcmp) is used to implement the prefix
|
* strncmp (rather than strcmp) is used to implement the prefix
|
||||||
* requirement.
|
* requirement.
|
||||||
*
|
*
|
||||||
* expr->signal might look like "GPIOT3" in the GPIO case.
|
* expr->signal might look like "GPIOB1" in the GPIO case.
|
||||||
|
* expr->signal might look like "GPIT0" in the GPI case.
|
||||||
*/
|
*/
|
||||||
return strncmp(expr->signal, "GPIO", 4) == 0;
|
return strncmp(expr->signal, "GPI", 3) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool aspeed_gpio_in_exprs(const struct aspeed_sig_expr **exprs)
|
static bool aspeed_gpio_in_exprs(const struct aspeed_sig_expr **exprs)
|
||||||
|
|||||||
Reference in New Issue
Block a user