Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1899436pxb; Thu, 16 Sep 2021 19:33:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzx/XEiQOyzKtF6mbGL2t3rHPVrrIrqV4BilDAPc+WpFjFMfLd8yc7FA0zZT6bH3gtPXzDw X-Received: by 2002:a05:6e02:10c4:: with SMTP id s4mr5852465ilj.285.1631845988785; Thu, 16 Sep 2021 19:33:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631845988; cv=none; d=google.com; s=arc-20160816; b=bgM2CPlo9D6ETWDuVnDS2dm17Kj0/aBYaV9Za/JNlWddT7bOCdtJ8fdae5VMt74bxI EJQhsKhp9AgQmAVDgTdjMpnAg+WUC2PyERrHuRv6zxlvj7Ko4g4AK1yCorYoAXpIL6wl bYYM9VwXaKNiOAtj5Fjf0m2Okeo6XcxYL1sGo1rEzjkzlhI9BulAtYMSr/ePnl6tR5XJ 8/teOcH8uSIPeKiqyKnL/G+po09GO6e3/A0JIt8UuHGUZVUQxyfJn6zowMd/jlj2NwJf 8mlYHesWAzjWcmBVpobWH6lbGjaBrqH7VgELDl4DaWmHkN6Wa6UjWbM3b7FI+J3BImCA KSeA== 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=KBEBpzOnchwKQpectpMK71ioEVk0xeTfSLY+H6eHYUI=; b=uTziMDu49TDNPnilINoBL2yEMXJ7xUNgqnS1GbWBXyyXo7bsr8yxpr6wTx969CnM1H AfiAKKZk//fKRoGMjdXtSHZ1Pwz8P0W2GrHbm6d0/5KiHsiBdisy4KPdAPbLERDubnFJ bKe1f1J31tkKY/9V0LPeLME5jXwKrDyKe2J6DuyH1P68WhoEcLoH28J5TQQBUx/Lu9jH 20DwQamAHn9H3xO22m7Rc4R00b6J+Q0tsFwbEfEjQVzBR04pUASOri3aRakNHTD7jqRs Bl6MdaMdRvzKg5+dyrTIL3ZfG0T2T8inYXGvq0o6MqcvMu2O7llKgHC4RzD6XNGBg1on eoaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=OoQix2xI; 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=pass (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 c1si4473717jaa.58.2021.09.16.19.32.57; Thu, 16 Sep 2021 19:33:08 -0700 (PDT) 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=@linuxfoundation.org header.s=korg header.b=OoQix2xI; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345935AbhIPRNq (ORCPT + 99 others); Thu, 16 Sep 2021 13:13:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:35940 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349469AbhIPRFw (ORCPT ); Thu, 16 Sep 2021 13:05:52 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2FF4F61B32; Thu, 16 Sep 2021 16:35:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631810140; bh=pTIOSYSSrv+8dmgfomR8eI6/xfAstEHMdPBwJYumySc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OoQix2xIpVLdLCyJ1pHeeP20zGW6b3lbc4moHdrhnvAv7Sp4gy+acyZAro7r/VcCe FYdbd0kD3oHAjerkI9D5xbqIlvTNtMN1tOou1A53UN6Iwcey8VAvEP48lgWJy4tgr1 KJVMwx/nl4QrE6GWLVaxYFne3EIQ3nzmt96SXqaQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Paul Cercueil , =?UTF-8?q?=E5=91=A8=E7=90=B0=E6=9D=B0=20 ?= , Linus Walleij Subject: [PATCH 5.14 032/432] pinctrl: ingenic: Fix bias config for X2000(E) Date: Thu, 16 Sep 2021 17:56:21 +0200 Message-Id: <20210916155811.907165070@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210916155810.813340753@linuxfoundation.org> References: <20210916155810.813340753@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: Paul Cercueil commit 7261851e938f4b0fe8c0f5a8e627ae90e1ba9875 upstream. The ingenic_set_bias() function's "bias" argument is not a "enum pin_config_param", so its value should not be compared against values of that enum. This should fix the bias config not working on the X2000(E) SoCs. Fixes: 943e0da15370 ("pinctrl: Ingenic: Add pinctrl driver for X2000.") Cc: # v5.12 Signed-off-by: Paul Cercueil Tested-by: 周琰杰 (Zhou Yanjie) Link: https://lore.kernel.org/r/20210717174836.14776-2-paul@crapouillou.net Signed-off-by: Linus Walleij Signed-off-by: Greg Kroah-Hartman --- drivers/pinctrl/pinctrl-ingenic.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/drivers/pinctrl/pinctrl-ingenic.c +++ b/drivers/pinctrl/pinctrl-ingenic.c @@ -3441,17 +3441,17 @@ static void ingenic_set_bias(struct inge { if (jzpc->info->version >= ID_X2000) { switch (bias) { - case PIN_CONFIG_BIAS_PULL_UP: + case GPIO_PULL_UP: ingenic_config_pin(jzpc, pin, X2000_GPIO_PEPD, false); ingenic_config_pin(jzpc, pin, X2000_GPIO_PEPU, true); break; - case PIN_CONFIG_BIAS_PULL_DOWN: + case GPIO_PULL_DOWN: ingenic_config_pin(jzpc, pin, X2000_GPIO_PEPU, false); ingenic_config_pin(jzpc, pin, X2000_GPIO_PEPD, true); break; - case PIN_CONFIG_BIAS_DISABLE: + case GPIO_PULL_DIS: default: ingenic_config_pin(jzpc, pin, X2000_GPIO_PEPU, false); ingenic_config_pin(jzpc, pin, X2000_GPIO_PEPD, false);