Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1248726ybh; Thu, 23 Jul 2020 04:20:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwbTsefFaaQVuHaNaoTH/xdtwrI1g9Xwz9sT4zK7iiWZ6vCwGeZ8oTOEBrH2W2pgnkgJPFk X-Received: by 2002:a17:906:6d4d:: with SMTP id a13mr3787812ejt.146.1595503242848; Thu, 23 Jul 2020 04:20:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595503242; cv=none; d=google.com; s=arc-20160816; b=uK5B62EzsU+H4jzIdmzuKkn5LxM1omGGh5g6NWxU6MYgZ++2Nja+Rv9iGaO0KhGX4w mIVl2phXSJHeKI+7Y1o91ItbO5JRL+3BCuv4NKBFFCIZIOgyHDHqKoyAdJTkoCNr6kCz 7eF6ZXIFB/rVpf6EdUqLOfhd4kkUKU7uIZZHVnMfjFcCxLSy16QMOl8UeINYb9I2nbZM KqjfTm2lKh+ND9rjC+ZQtvrEp3ovCYootTS/mM5uZ0AToBsVAYl1Ovb3/YYjeK92/lkq fOWehhpQoWRXgJ3b9aZMWQbK0tkzoCy76LPO0Zhk1KLbO46WMcbwDCCEc8RsaLD2KRVm r3fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=IAYQHxickWHe2ZE7HNcFpZYh+SYPG0KsSHSyyPGPmIU=; b=w/DZ0J4okJ7MJGDCW4dfki6Z1eLM7VAgkcnmz7hx4mVcm8ymcXJnIVaIFLv62qMYwL +UXiYW4AT9DxGiM2HAq9g+71iCQy6K+E3/Bpd0WoPPXcLnw+OSZYNLQbRuT5qC5ervTj TDju0uwsJ1GZZ89lFrgiYffcaSJf6VEFIhezkplln47gXAS/zVfKpiWM+nRvFLxi+hyX zAlDzBWzpWCBUzhb2ntoXDLG/ybyRotyYwtnR4k1xdsI9CWpJkwKqn1Z0QbDgOlYvsq5 nludYepfNoygmYESMXnhUHlmC4Np8Ejz4+2Ub6rjy/+78+qNDqoFrc/i0Bs54GnJQYid ip5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=GQs477h5; 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=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u9si1766747ejx.100.2020.07.23.04.20.20; Thu, 23 Jul 2020 04:20:42 -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=@mediatek.com header.s=dk header.b=GQs477h5; 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=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728570AbgGWLUI (ORCPT + 99 others); Thu, 23 Jul 2020 07:20:08 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:37873 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727769AbgGWLUH (ORCPT ); Thu, 23 Jul 2020 07:20:07 -0400 X-UUID: a60ed0f0ddbd4722a29382f602a7be42-20200723 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=IAYQHxickWHe2ZE7HNcFpZYh+SYPG0KsSHSyyPGPmIU=; b=GQs477h5fAfcpLX+GOk9Ghm5B7mto9ZocWKzkMXRMztroT1zT0RdTP2rWgyz7xQHI9f+DZTBdglq4LTx5VlLAChx4bH+RWMFTbFeb4JNkR/v2wLvFwr/yCIsSQNGOcxIcdrXMSXeiFszXFXtsNh8J/SUIBRrBVz6Qb89kGQO9SA=; X-UUID: a60ed0f0ddbd4722a29382f602a7be42-20200723 Received: from mtkcas10.mediatek.inc [(172.21.101.39)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 1786912797; Thu, 23 Jul 2020 19:20:02 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs02n2.mediatek.inc (172.21.101.101) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 23 Jul 2020 19:19:58 +0800 Received: from mtkswgap22.mediatek.inc (172.21.77.33) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 23 Jul 2020 19:19:59 +0800 From: Hanks Chen To: Linus Walleij , Rob Herring , Matthias Brugger , Michael Turquette , Stephen Boyd , Sean Wang CC: mtk01761 , Andy Teng , , , , , , , CC Hwang , Loda Chou , Hanks Chen , Mars Cheng Subject: [PATCH v9 3/7] pinctrl: mediatek: avoid virtual gpio trying to set reg Date: Thu, 23 Jul 2020 19:19:53 +0800 Message-ID: <1595503197-15246-4-git-send-email-hanks.chen@mediatek.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1595503197-15246-1-git-send-email-hanks.chen@mediatek.com> References: <1595503197-15246-1-git-send-email-hanks.chen@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: 1E47C6615EB965B77944190983D9BF6B97ABBFC08EB39DA51C9A6004CB1D90A02000:8 X-MTK: N Content-Transfer-Encoding: base64 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Zm9yIHZpcnR1YWwgZ3Bpb3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