Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3851370pxb; Tue, 17 Nov 2020 05:23:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJwbzK0onvWvcWBXzQ2EFjDBdAtoWT99H6Nq2thBH0F1iA7eRnI9QSPZcodDOehmuCkHjQ8n X-Received: by 2002:a50:ef03:: with SMTP id m3mr20560815eds.212.1605619415134; Tue, 17 Nov 2020 05:23:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605619415; cv=none; d=google.com; s=arc-20160816; b=S+qUJ2zfhLYfAevsro8y+/l05dVdra0OI7Y1PVlb5jOSzTlaECBc1mZPwbHcBQcYiw UwnZL5c/DxvL4rX6nELoXg3tYVuUJaf9J823EOIHdL5BrnWv5XhWJDi1ziqx2cC5ibCN aAK+T7CrbDO+3FrWGItmrlCinwauaYo0/JzO4sIe+PIpI624kn8+WQAmpIg76dn4wpb9 RR7TpE7gXL7vwcaTlVMOx6Zio/rKmVNA9Oy3nQfKVYZqWXmVM8CGUb45m2uAR91DiaVE BalhUSk42Ov7H3CHbNABkImMUA7BbHiP37lidjxGy0hA4texXL2vRLsbLkRcRcHyJQqD 5N6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=2UlY01Ph4hA84duinkdGO2jSkh5p4J+qOaPb2j/rTCA=; b=A2/xf0gDtLaFE9Oh/uFgTZPoBbjhLVo1jBrS/X59qnzpdZhNlbmuOPfWHocRpd9esM w2lUHAseVKr/mYfbAKrWEPdp0Ytog3U7E6lhzTFMz9dTcdDEPA/aSZGPr6p+1wBTct5N Xjqie/ESWjhftwyw0wZq4zfyG/hAIlJ1Di0fns6ARW6VsMur7YAc4mZecY5XwKMQwckF SyBaBDo6BUeaB0mJSb+LvDpw5RVQ8ghQ3ZKq7c0CmXMHE0rfhOEcRU7tcNEQn22sPqTF nP9IZqu9k/AGapgB5dvlydHxeR58O09tHPTFxnNrHPZ8CJ5wBkK5p4Pa9TRA3RSWR9Gt eDaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="SjZv0t/F"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v5si46143ejj.588.2020.11.17.05.23.11; Tue, 17 Nov 2020 05:23:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="SjZv0t/F"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730726AbgKQNSv (ORCPT + 99 others); Tue, 17 Nov 2020 08:18:51 -0500 Received: from mail.kernel.org ([198.145.29.99]:47812 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729850AbgKQNQB (ORCPT ); Tue, 17 Nov 2020 08:16:01 -0500 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0DB382151B; Tue, 17 Nov 2020 13:15:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605618960; bh=CkhcIAxtkUpPBXKvzqUuIpv/4DMVZZlllOGxLQYcRts=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SjZv0t/F+o3IuffrhMsAV35U9wnHtokvavdE3Sz6PPPD4wOcHpkJrSq8CgQYKm3zs IxtSYI2OpWdEaRBtR0rUmerVkndY3FtI6RdvDvBiao6v08ggSi7DKrnJE+JhauElng ORnFat5F3shYEVbqiH/KlqVXWJtXtSzKcDcdr70Y= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Billy Tsai , Andrew Jeffery , Linus Walleij , Sasha Levin Subject: [PATCH 4.14 36/85] pinctrl: aspeed: Fix GPI only function problem. Date: Tue, 17 Nov 2020 14:05:05 +0100 Message-Id: <20201117122112.799838542@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201117122111.018425544@linuxfoundation.org> References: <20201117122111.018425544@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Billy Tsai [ 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 Reviewed-by: Andrew Jeffery Link: https://lore.kernel.org/r/20201030055450.29613-1-billy_tsai@aspeedtech.com Signed-off-by: Linus Walleij Signed-off-by: Sasha Levin --- 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