pinctrl: aspeed: Fix GPI only function problem.
Subsystems (4)
Billy Tsai
reviewerPATCH 1/1 pinctrl: aspeed: Fix GPI only function problem.
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".
--- drivers/pinctrl/aspeed/pinctrl-aspeed.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/aspeed/pinctrl-aspeed.c +1 -1
@@ -292,7 +292,7 @@ static bool aspeed_expr_is_gpio(const struct aspeed_sig_expr *expr)* * expr->signal might look like "GPIOT3" in the GPIO 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)
Signature · 1 line
2.17.1
Hi Billy,
Quoted 5 lines · Billy Tsai
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".
Signed-off-by Billy Tsai <[email protected]>
I'd like it if we were a bit more specific in the commit message, and even better if we update the comment in the code. A quick look at the code suggests this issue affects GPIO banks D and E in the AST2400 and AST2500, and banks T and U in the AST2600.
Functionally I think the patch is fine.
Cheers,
Andrew
Quoted 23 lines
--- drivers/pinctrl/aspeed/pinctrl-aspeed.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/pinctrl/aspeed/pinctrl-aspeed.c +1
-1@@ -292,7 +292,7 @@ static bool aspeed_expr_is_gpio(const structaspeed_sig_expr *expr) * * expr->signal might look like "GPIOT3" in the GPIO 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)Signature · 1 line
2.17.1
Joel Stanley
maintainerQuoted 8 lines · Andrew Jeffery
Hi Billy,
Quoted 4 lines · Billy Tsai
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".
Quoted 8 lines
Quoted 1 line
Signed-off-by Billy Tsai <[email protected]>I'd like it if we were a bit more specific in the commit message, and even better if we update the comment in the code. A quick look at the code suggests this issue affects GPIO banks D and E in the AST2400 and AST2500, and banks T and U in the AST2600.
Functionally I think the patch is fine.
Also add this line:
Cheers,
Joel
Quoted 28 lines
Cheers,
Andrew
Quoted 23 lines
--- drivers/pinctrl/aspeed/pinctrl-aspeed.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/pinctrl/aspeed/pinctrl-aspeed.c +1
-1@@ -292,7 +292,7 @@ static bool aspeed_expr_is_gpio(const structaspeed_sig_expr *expr) * * expr->signal might look like "GPIOT3" in the GPIO 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)
--
2.17.1
Billy Tsai
reviewerPATCH v2 1/1 pinctrl: aspeed: Fix GPI only function problem.
In reply to Billy TsaiSome 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.
--- drivers/pinctrl/aspeed/pinctrl-aspeed.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/pinctrl/aspeed/pinctrl-aspeed.c +4 -3
@@ -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) {/* -* 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 * 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)
Signature · 1 line
2.17.1
Quoted 9 lines · Billy Tsai
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 4d3d0e4272d8 ("pinctrl: Add core support for Aspeed SoCs")Signed-off-by Billy Tsai <[email protected]>
Thanks Billy. Generally the Fixes: tag should be part of the trailer block, hopefully Linus is happy to remove the newline for us!
Quoted 9 lines · Billy Tsai
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 4d3d0e4272d8 ("pinctrl: Add core support for Aspeed SoCs")Signed-off-by Billy Tsai <[email protected]>
Thanks Billy, patch applied for fixes!
Yours,
Linus Walleij