Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp425396ybb; Wed, 25 Mar 2020 02:32:30 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsymOM7P0H7EOjfpuv1/ba0flKKGhxXwmYX3e+md4GkpUwj1vAn4AunXjOpCfXPmwzVJmnP X-Received: by 2002:a05:6808:abc:: with SMTP id r28mr1814933oij.161.1585128750032; Wed, 25 Mar 2020 02:32:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585128750; cv=none; d=google.com; s=arc-20160816; b=D2ctsGe8BD3qqBDcKsQxO5iGN3qY4kFv+/BryM7//eOZJB7zz8sfanWXwpW8byOZvA a5JK+6pEdVKEv6KJwaq6B1udUEIT6kKt5GQctxVcNW1D2yMTHRjuPXGh6juFsKisr2hc whv7eg7OY+NCboMGzzAK+paI3E8VVajUGwL3T2W/sFdiAC3bs7kFjo7nZOmBQx28D35S 7RwhPAX2PJfgLqnVW1cHK6NjcPM818vKlpJMF445M24Z8xDL+nKbN9agHF9YrigUwqmp a9Koh8p3aSgvZZ2reNYa0IGb98AHcmpLxKVkETdLO1TJapKWyLUwQZEW8YBMXh2ddMv5 rL7Q== 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=gcuqKepqLmO7eC+NcTPbHcySQGXOAWJEpP27E4J/m1c=; b=kDAFqgyRXGukTeSVVsTgGhiyDLV1ctXmCyImFCugyJeq45G4VPxTEAqKe77AjbXX68 KaeZDFPvMJ830ehu4GfPQAL1lq6Lc30AVnIJoZKGQWWaX7JzV0dhkuGdZcrV1YgcMwPm 5cHKAKXko4uhbRKESI3xeo+IFvwZ7rA8lAPP++o2BVby/94t8P76Cl4V5FwJtONhRgIX TeUOmSM1gPLrTnNHc5ny3PKS1negHhxEtPL1Aki7PUd7/eNK0WqejgEY+3IZY/J0n3K1 vE9TVMbYe3SEuauqUwwPJyxy5GtHHmmcREjiwztjCP8aXGrf+yb5PmmVITVRSGy4+GIE WNmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=jGoMo7Mp; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n4si1340311oie.121.2020.03.25.02.32.17; Wed, 25 Mar 2020 02:32:30 -0700 (PDT) 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; dkim=pass header.i=@mediatek.com header.s=dk header.b=jGoMo7Mp; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727439AbgCYJbz (ORCPT + 99 others); Wed, 25 Mar 2020 05:31:55 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:22729 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726264AbgCYJbx (ORCPT ); Wed, 25 Mar 2020 05:31:53 -0400 X-UUID: 6502607f7b5c485a965ec68ac5cc572e-20200325 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=gcuqKepqLmO7eC+NcTPbHcySQGXOAWJEpP27E4J/m1c=; b=jGoMo7MpjbBWTE/eXg0TbDj92WynBlndgVkx5hqaLizPVEWO+sEJtrAs/yBc8qrVh63lJu5HFRi+HZ9Ftdomk4kLsK1CBb0ZD7QfxbC4MFdbgfHmsaGZ1nzlByShDlOUmE0DfD6iQGqw7P8LLQu4+i9OhQ0ECoj6HAFHnPI1U4w=; X-UUID: 6502607f7b5c485a965ec68ac5cc572e-20200325 Received: from mtkcas06.mediatek.inc [(172.21.101.30)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 969955371; Wed, 25 Mar 2020 17:31:44 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs02n2.mediatek.inc (172.21.101.101) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 25 Mar 2020 17:31:41 +0800 Received: from mtkswgap22.mediatek.inc (172.21.77.33) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Wed, 25 Mar 2020 17:31:41 +0800 From: Hanks Chen To: Linus Walleij , Rob Herring , Mark Rutland , Matthias Brugger , Sean Wang CC: Andy Teng , , , , , Hanks Chen , Mars Cheng Subject: [PATCH v5 3/6] pinctrl: mediatek: avoid virtual gpio trying to set reg Date: Wed, 25 Mar 2020 17:31:31 +0800 Message-ID: <1585128694-13881-4-git-send-email-hanks.chen@mediatek.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1585128694-13881-1-git-send-email-hanks.chen@mediatek.com> References: <1585128694-13881-1-git-send-email-hanks.chen@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: 4FA0E5F8D5EAAEC00D93A7DE47850028B31962D46D1324751148755D0B91662E2000: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 Zm9yIHZpcnR1YWwgZ3Bpb3MsIHRoZXkgc2hvdWxkIG5vdCBkbyByZWcgc2V0dGluZyBhbmQ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