Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1125141pxb; Fri, 20 Nov 2020 01:35:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJxBpDQ/tC+a1WPtLJgEapOn4/UIjwDuSKk2/ZyagZOczCjZZ0Q6VRWYsyZfn5AMuzOyDg4V X-Received: by 2002:a17:906:7813:: with SMTP id u19mr5563659ejm.153.1605864912122; Fri, 20 Nov 2020 01:35:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605864912; cv=none; d=google.com; s=arc-20160816; b=pzK2C37BjaeeMWB6WKYvGFkWDwP0OFVDUc2LiHBPXhp6+02pNB0vRyxTLm/TcPYzCR pe+yPIEWML9jcr+575DU2Lh9g1qdPVFFpOJrJUF5eObatMTwP/dCqF4S8W0vX0imW/Pw GvHrK7UL08JKVdKGLXbHOIRrIqdlaLAk0KdBNuO73+i3rgazubyFMpk1kd3R9ZfzHntX Y6rg8QKHBPnJ5Xo8nOOlwsYeTrKwOQHi7XmrjdYux55CawCI6vb26E+ZcJoB9PoLXdun eYhTN5bx+UijgXihD5mZyn5ScUDkHVbEi+/iNlCnChkLQ6+nUGz9Bpc9bWBUiAtLWYZu ySfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=/2I9ZPxlPxrcfl5InK/CMC9MgbGMqTgDPcJPRlPJLbY=; b=CIRo8wkc15DNPmiGYWyWPQSIKzNeDafq6C2JmjmASfUKwj9MnLtURslK90LOLLWxE3 cw0SHj4lU4zSBTqBM1iOhNWnj6LPc/cc9IsxMfTiWmwM4l9eJvPps+wtGEpSWSrqB08U LX5Rv2T6veqBJIVTW5kyPNXFy3LIcmEW4S/hgR71aNyCc3mNrZcQ7fv6iPbfMS3kvcI2 mUn9ls4OeeLgVTH4srb6f0f8XBE3VR0WsE+jL1ZaNs9bREOJHBJSgt/1he5iHSyz+XPk OFxpRV1AHVnapWt6ubvjX657fJOZ4jVB8r5u/nsvS3w5E1Os+CH1lsWW8yLQHQwIFlvu F3cw== ARC-Authentication-Results: i=1; mx.google.com; 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=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v22si1436148edl.293.2020.11.20.01.34.49; Fri, 20 Nov 2020 01:35:12 -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; 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=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727681AbgKTJbR (ORCPT + 99 others); Fri, 20 Nov 2020 04:31:17 -0500 Received: from mailgw01.mediatek.com ([210.61.82.183]:55334 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727591AbgKTJbK (ORCPT ); Fri, 20 Nov 2020 04:31:10 -0500 X-UUID: aaaa45181b4c4c9092ec3788acec7136-20201120 X-UUID: aaaa45181b4c4c9092ec3788acec7136-20201120 Received: from mtkexhb01.mediatek.inc [(172.21.101.102)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.14 Build 0819 with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 306028507; Fri, 20 Nov 2020 17:31:04 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs08n1.mediatek.inc (172.21.101.55) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 20 Nov 2020 17:31:02 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Fri, 20 Nov 2020 17:31:01 +0800 From: Zhiyong Tao To: , , , , CC: , , , , , , , , , , , , , , , Subject: [PATCH] pinctrl: fix low level output voltage issue Date: Fri, 20 Nov 2020 17:30:58 +0800 Message-ID: <20201120093058.7248-2-zhiyong.tao@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20201120093058.7248-1-zhiyong.tao@mediatek.com> References: <20201120093058.7248-1-zhiyong.tao@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch is used to fix low level output voltage issue. A pin is changed from input pull-up to output high. The Dout value of the pin is default as 0. If we change the direction of the pin before the dout value of the pin, It maybe produce a low level output voltage between "input pull-up" and "output high". Signed-off-by: Zhiyong Tao --- drivers/pinctrl/mediatek/pinctrl-paris.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/pinctrl/mediatek/pinctrl-paris.c b/drivers/pinctrl/mediatek/pinctrl-paris.c index 623af4410b07..039ce9be19c5 100644 --- a/drivers/pinctrl/mediatek/pinctrl-paris.c +++ b/drivers/pinctrl/mediatek/pinctrl-paris.c @@ -247,13 +247,13 @@ static int mtk_pinconf_set(struct pinctrl_dev *pctldev, unsigned int pin, err = mtk_hw_set_value(hw, desc, PINCTRL_PIN_REG_SR, !!arg); break; case PIN_CONFIG_OUTPUT: - err = mtk_hw_set_value(hw, desc, PINCTRL_PIN_REG_DIR, - MTK_OUTPUT); + err = mtk_hw_set_value(hw, desc, PINCTRL_PIN_REG_DO, + arg); if (err) goto err; - err = mtk_hw_set_value(hw, desc, PINCTRL_PIN_REG_DO, - arg); + err = mtk_hw_set_value(hw, desc, PINCTRL_PIN_REG_DIR, + MTK_OUTPUT); break; case PIN_CONFIG_INPUT_SCHMITT: case PIN_CONFIG_INPUT_SCHMITT_ENABLE: -- 2.18.0