Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1598895ybh; Tue, 14 Jul 2020 02:06:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzMiUp0rr71GIHYwnFBFMyN12nAtY02++I2yV64y/h13OWvHmj1NofcJlhx+m8l6MjtoVzl X-Received: by 2002:a17:906:494a:: with SMTP id f10mr3802583ejt.428.1594717560569; Tue, 14 Jul 2020 02:06:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594717560; cv=none; d=google.com; s=arc-20160816; b=o5gpSm1OM1wfZ0+UDxXm4eVu1ElYXoR99Ap4n0Ha6WFYV4cOQQROUz1bZIm3U9SR0K 4b4k9ciOC1msldJZpQMwS8olKleEbDWbAHpx8D5gzgKvwnnLkj5VhUv0qfuUpk8HBknR QtCG/9M62CPbuWveKE/EG3XxNqILicMh5h+LyL1jVIVvgsMaYyVldD5fD4D/uu2oKoq5 R9/7f9b22nDXxN6oBcfKcR6doFiys2oJC90GS/WFWr96Sc3Qf53KhJkMyNb9bIJQ62Pb 8e856rJXW5AGwYioZzBil20zLbpQ8kx6h4DncptivlcqSO3CXW/+QrQgYMz0vKegbTCg bsvQ== 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=5TKcrLGCtY1B7wgKh4ZcQSHuqGbEX2NNJvS+KYOZ5/Y=; b=nrv1r53li4neIw2EHNqD6dCNFKn7NTLkdTST4EvXRGvWd4+ybsthzrXYuTe0rnGUqq jd0MfF//aPaHfpI+aKLypr4KlyjnZAtq7t4DCdhjEAOZGlfwi+zPVhXevVY9+dVYP0e7 9u1AujMj2Gn+n2CoEZSva+nqZ7Gs9ZqQdehgHJquCp/gaa4rJNAZgmNd5dZW5SF9UToj znWD3gxvPGS+2EYzDPUf3IStN94IOmYn+spLREHbi/LcGxCa52iidqJy0HzB5WxUISuT W2SYNXPOxpsqrEX2hwYu3biAG4PbJwSPrBKjNcu36Q4A8aUZdX/mHio7U6nOzPnDX3/A WkPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=sXtIFdOJ; 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 g22si12305502edj.310.2020.07.14.02.05.38; Tue, 14 Jul 2020 02:06:00 -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=sXtIFdOJ; 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 S1727081AbgGNJFD (ORCPT + 99 others); Tue, 14 Jul 2020 05:05:03 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:62045 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726801AbgGNJEy (ORCPT ); Tue, 14 Jul 2020 05:04:54 -0400 X-UUID: 89a592a092c944cb9b3354f589a1edeb-20200714 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=5TKcrLGCtY1B7wgKh4ZcQSHuqGbEX2NNJvS+KYOZ5/Y=; b=sXtIFdOJogAooJfC7kK/AOPhvjID7fHNrZNqUIWkZTHUJixoRwkcOtXjz59MIJ2AjZqAqs6K8mYrDSUeMliB/7u441NRXRLdO3d/L8c2W8vbNcZJ6V3MI9B9Bh9U2k8ejk5Bm9JQ54pweQfjo3kh1t5ab+1nQF8iUsVhNKIExYQ=; X-UUID: 89a592a092c944cb9b3354f589a1edeb-20200714 Received: from mtkexhb02.mediatek.inc [(172.21.101.103)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 2125612332; Tue, 14 Jul 2020 17:04:50 +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; Tue, 14 Jul 2020 17:04:41 +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; Tue, 14 Jul 2020 17:04:42 +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 3/7] pinctrl: mediatek: avoid virtual gpio trying to set reg Date: Tue, 14 Jul 2020 17:04:35 +0800 Message-ID: <1594717479-8160-4-git-send-email-hanks.chen@mediatek.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1594717479-8160-1-git-send-email-hanks.chen@mediatek.com> References: <1594717479-8160-1-git-send-email-hanks.chen@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain 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 Zm9yIHZpcnR1YWwgZ3Bpb3MsIHRoZXkgc2hvdWxkIG5vdCBkbyByZWcgc2V0dGluZyBhbmQNCnNo b3VsZCBiZWhhdmUgYXMgZXhwZWN0ZWQ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