lkml.org 
[lkml]   [2020]   [Nov]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.14 36/85] pinctrl: aspeed: Fix GPI only function problem.
    Date
    From: Billy Tsai <billy_tsai@aspeedtech.com>

    [ Upstream commit 9b92f5c51e9a41352d665f6f956bd95085a56a83 ]

    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 <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>
    ---
    drivers/pinctrl/aspeed/pinctrl-aspeed.c | 7 ++++---
    1 file changed, 4 insertions(+), 3 deletions(-)

    diff --git a/drivers/pinctrl/aspeed/pinctrl-aspeed.c b/drivers/pinctrl/aspeed/pinctrl-aspeed.c
    index 7f13ce8450a34..5249033ed413e 100644
    --- a/drivers/pinctrl/aspeed/pinctrl-aspeed.c
    +++ b/drivers/pinctrl/aspeed/pinctrl-aspeed.c
    @@ -458,13 +458,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)
    --
    2.27.0


    \
     
     \ /
      Last update: 2020-11-17 15:01    [W:4.569 / U:0.220 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site