Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3851829pxb; Tue, 17 Nov 2020 05:24:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJyVlhcRUWLTdNNVjIqKGhDdns1YBvJddCVsbzJk3+nqaHaoZCx8RfC9UZEW44tJCtpInBWV X-Received: by 2002:aa7:dcd6:: with SMTP id w22mr21020534edu.19.1605619453695; Tue, 17 Nov 2020 05:24:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605619453; cv=none; d=google.com; s=arc-20160816; b=fFiGCjCT9CyaOtOcmmcizEpMJQo5JKyHcPf7Tk8hKbbyDpv2uNqqyt7iWALp0xNq8I 31vDQXTfvoRB6F8wH6D6G//I5FtwAfi6B/MyOv+PDuPBOkUZFxqfInYBO3xBdM+CObMm GSgQLx9soGgqI8olm+s8XoKLlcdB4uNL2oz0X8ut+iPep2mKgPXqGOyNEpl0zjjLEEE+ C4dNv2dXHBDzhzK+xgCpluBRQnP0vY3J6CObmBEJMTh3SAp8dTjwFsNWk2wu/RecE7Zs kWmGX6+lzkZDAswWm+/LdbqTrSPw/u4zkrm6YDPR3GGJvJgFFzkzZeAp/RZ/IsdukPUJ u6ig== 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=EA/VogyIj3TQ0mr7B6igHtwFaTwnUfLMqWUb6u50IVE=; b=Kmtrep0bzFubidqXkrLJtdDSxXeMSbyR3A3SoNwXdagL76n6ZJ3qmBWF4BkaXY/hc4 POR3gqv8EhzQwHBne/4IXViA4ejqKl+UevTKXsBoTVO0hw6jqjysFd5Hz99NbV8lKnip M8XLyNNs0K/gl4mbDys2bWnZdPpvTGlm8LGPjpVvdJLdzCC29TGD612zP1J0XtWU1pmJ q3HfeJgG34ldl423tPjwZB0z2sVMM/ddywsip6Ed24tBGnWuIGh17DdU/ylXHects+La Cj/9i5hUyVyGJBaM68Kar34L8gKLL4Uzw2cA5FVF1Tj45oULQgBvnsaAOCC/xsoplM4Y lreA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=TKtvbpaA; 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 w25si14041922edt.600.2020.11.17.05.23.51; Tue, 17 Nov 2020 05:24:13 -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=TKtvbpaA; 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 S1730371AbgKQNTm (ORCPT + 99 others); Tue, 17 Nov 2020 08:19:42 -0500 Received: from mail.kernel.org ([198.145.29.99]:52530 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730089AbgKQNTb (ORCPT ); Tue, 17 Nov 2020 08:19:31 -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 23546241A6; Tue, 17 Nov 2020 13:19:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605619170; bh=otGF3tFWRZuxgNpNpyVXE9oMqbgHk+Af2ftSH8muxbw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TKtvbpaA8Ov02J8oEqWd1W/Z97AfMZ7VTUNfFTjLqZlywYgm+tQSvbiRMDdtYhiac im9uUr9PHSrwglVMzvb5iEG3O2AHtUBBGjrBcHMEscxI75AnI0iQJ1X+yj+cynox2M A5fZJziDSFttHfpaRKaafnf7iFGXLieMAQZ8QYpU= 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.19 052/101] pinctrl: aspeed: Fix GPI only function problem. Date: Tue, 17 Nov 2020 14:05:19 +0100 Message-Id: <20201117122115.629811440@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201117122113.128215851@linuxfoundation.org> References: <20201117122113.128215851@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 aefe3c33dffd8..8dec302dc067a 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