Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3881393pxb; Tue, 17 Nov 2020 06:07:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJzQPL1msKLEB4T7LQRXPhq2qX6ytUoSNG7pnZCoq/6Rf2oMoLyVEpB9Mq6pgpgpYHiu7GTi X-Received: by 2002:adf:eb4d:: with SMTP id u13mr24251270wrn.146.1605622029125; Tue, 17 Nov 2020 06:07:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605622029; cv=none; d=google.com; s=arc-20160816; b=UM6oGHifc8svmq2q8ynm7PZY6hepyJ6LtXcCSXMfYSWFI/z3SZFSmD9VufQE//OuCM 1qlVaQNC9cQKqXhKjWE8G+mzx7YG0Znb4PFTMDxlrw8pIWIXIe95t+9nDkFJ+qApkRVm YwnTaLxij5EUTOBb23+7w4bIIr3Qpot4gckciD/Qs8LpQN5JrL/Px5t4RdVTkEyBymMF RsEbL5xNju3puaxdg0Jy+6YFEZxuw4qpkufdyM8BlPgWyAfB86nUA6SadQRhlKJGRqig 4JLyFz3l1adIVqmJH5B1Pc/4tqnOVic/UUfNQpZiIwS1H55cX9ymX830lblrTxVWWGYK /DjA== 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=SdAtLPr+AIm3jvR2rM01dGmOBJfSlNoOufZDfwBD4s4=; b=qYXDg0/SDDVErTaRx6twA+E1GIBQhmk509bq7kb14m4rhON6wojWEKhwfvF+gT1ohT 3QyVLuvaMetcetDs5PNqbahN/RfU2vJWLiZIilzGrwLeMAIwylRAGsfzCjI1fWDNlENH Nz0CgN68McvvHDBS6vXT4XRW8ZMyFPQwWOF1vWR9o3OWwpKLG/w30u6ohfI15Gh6lDNp DnLgVm8XFSlfVFvyzXkvve6ax5ywPzHEi42yLT25mwMRu1AW/Y3romvsmlPRf7ommprQ 05+Bkwy0HC0F40UV3z+PVzJlh3MBsmQCXmm80Hmre3VAX1e7OPG5lg1Rrtl2yrWGlc4Z feVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=nW+KM+tI; 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 c15si1342713eja.406.2020.11.17.06.06.44; Tue, 17 Nov 2020 06:07:09 -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=nW+KM+tI; 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 S1729797AbgKQNMN (ORCPT + 99 others); Tue, 17 Nov 2020 08:12:13 -0500 Received: from mail.kernel.org ([198.145.29.99]:41930 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729764AbgKQNMB (ORCPT ); Tue, 17 Nov 2020 08:12: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 C9B38241A7; Tue, 17 Nov 2020 13:11:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605618720; bh=fdHiExIBCAOQ/abc1stNSW5WonDv6IjbpthKI0wu+mI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nW+KM+tIIW0UV0GP0iLlP21fagJPD7rMA0cxAO4mI5S3lFxjmX9hcBXpRPGuu8yIs 8rnKAhW2QWLcuIE8lkdXq+8MSb6YDkzcOvW1CtFEdHIsSiJCNSNU0WJiE7/iYCiGcH FlLf8QxZacqGKjHp5w6zLRw1WJlEpll+yLLbUKn8= 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.9 36/78] pinctrl: aspeed: Fix GPI only function problem. Date: Tue, 17 Nov 2020 14:05:02 +0100 Message-Id: <20201117122110.871999315@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201117122109.116890262@linuxfoundation.org> References: <20201117122109.116890262@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 49aeba9125319..23d2f0ba12db5 100644 --- a/drivers/pinctrl/aspeed/pinctrl-aspeed.c +++ b/drivers/pinctrl/aspeed/pinctrl-aspeed.c @@ -387,13 +387,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