Received: by 10.223.185.116 with SMTP id b49csp3497020wrg; Mon, 26 Feb 2018 00:36:18 -0800 (PST) X-Google-Smtp-Source: AH8x225Wr8FCs3JDKNz/CQoFeLEZWnJMh5jYIytgt/lzcGdyKqEGTShbaVLQN15w+GjsQX4pQvK7 X-Received: by 10.98.217.76 with SMTP id s73mr9789589pfg.209.1519634178003; Mon, 26 Feb 2018 00:36:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519634177; cv=none; d=google.com; s=arc-20160816; b=fy4Syi1shbyUakqlO20CZgWeAOmINvEjSEu7w7c/jjBXQpUa/+T1KszXF3nn5e/8Xm XXPM8gDUtuzZwHL44dWMQekIl598BPqV5WoUAu9doCj14EfyJaOpeogwZqifHXXJpVtz Dip3oyjsZ3FhZyRJ0zxmCKgxcU50TvPLjhHTciQYZtx9xtHjVnglKurZMkwdfIwcIEGt rLR3ZWzOWNs9KaDFaKEaTBnzfqD4SPiq3rkysf7vq8aeKSl2G48nFPVyLFz3VKDtXMCH 0PIYtMLdP865YMXKqcPJPFWGkI9TGBML3x8F8WtELJX8MMz6a4dJoUupf+MI/i8v9u6R hkLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=LdCQwYhEip/3k0xFEjYRv4KLzN45SFr8ghAT79o4e9o=; b=wd8uL2vWsTorLZb5cy31F3eKP48klLm8dG+LqT3Yocr+okH8BZx27MNrDsn3LsGfZk Qz2aVWyr3Q/CDnTcBerw21hcsE+3ocnkszxv14skZIRwabJNnk+g6idytC2aR/z2IC9c R8qyK7dim+TcFhBDtabXnlZWgHeOJiUXh7bYRl6Sf4ncRXc82UOwec+mQm8ruMOoRW1o 0XwWp8IJFWsHo9w6YBO8ZCsZiIzumZB0ScrLT0F/xeFB7sNVMQDNrReyeEztos0cDr9V FBGyoFX9C80gsn7N6UI0AibGooJN+4cJXa5EmSop6YGlRFCjEXYA5SxxTUVk2+X7IDYu +EzA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l6si5241460pgr.292.2018.02.26.00.36.03; Mon, 26 Feb 2018 00:36:17 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752601AbeBZIe3 (ORCPT + 99 others); Mon, 26 Feb 2018 03:34:29 -0500 Received: from mailgw01.mediatek.com ([210.61.82.183]:35118 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1752034AbeBZIeS (ORCPT ); Mon, 26 Feb 2018 03:34:18 -0500 X-UUID: 552bcbc2f19e425899a6f76255290eb7-20180226 Received: from mtkcas07.mediatek.inc [(172.21.101.84)] by mailgw01.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 1729174754; Mon, 26 Feb 2018 16:34:14 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs01n2.mediatek.inc (172.21.101.79) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Mon, 26 Feb 2018 16:34:13 +0800 Received: from localhost.localdomain (10.17.3.153) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1210.3 via Frontend Transport; Mon, 26 Feb 2018 16:34:12 +0800 From: Zhiyong Tao To: , , , CC: , , , , , , , , , , , , , Zhiyong Tao Subject: [PATCH v2 4/4] pintcrl: support bias-disable of generic and special pins simultaneously Date: Mon, 26 Feb 2018 16:34:02 +0800 Message-ID: <1519634042-12063-5-git-send-email-zhiyong.tao@mediatek.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1519634042-12063-1-git-send-email-zhiyong.tao@mediatek.com> References: <1519634042-12063-1-git-send-email-zhiyong.tao@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org For generic pins, parameter "arg" is 0 or 1. For special pins, bias-disable is set by R0R1, so we need transmited "00" to set bias-disable When we set "bias-disable" as high-z property, the parameter should be "MTK_PUPD_SET_R1R0_00". Signed-off-by: Zhiyong Tao --- drivers/pinctrl/mediatek/pinctrl-mtk-common.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c index 3cf384f..e88ba04 100644 --- a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c +++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c @@ -301,8 +301,17 @@ static int mtk_pconf_set_pull_select(struct mtk_pinctrl *pctl, * resistor bit, so we need this special handle. */ if (pctl->devdata->spec_pull_set) { - ret = pctl->devdata->spec_pull_set(mtk_get_regmap(pctl, pin), - pin, pctl->devdata->port_align, isup, arg); + if (enable) { + ret = pctl->devdata->spec_pull_set( + mtk_get_regmap(pctl, pin), pin, + pctl->devdata->port_align, isup, + arg); + } else { + ret = pctl->devdata->spec_pull_set( + mtk_get_regmap(pctl, pin), pin, + pctl->devdata->port_align, isup, + MTK_PUPD_SET_R1R0_00); + } if (!ret) return 0; } -- 1.9.1