Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1260840ybt; Thu, 18 Jun 2020 04:37:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwgdzyMA+ROM5MxXE5Smbw4KvSnh0Hby7UzwKqq2yY36lFNlX0sz1uxqPLBv6sNP748qPEw X-Received: by 2002:aa7:c908:: with SMTP id b8mr3647624edt.76.1592480261781; Thu, 18 Jun 2020 04:37:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592480261; cv=none; d=google.com; s=arc-20160816; b=G199rGmJ9zn5VJuIoHGSq+cEf1xpgKYLU1+fE7mlIM7cSqeTHdQwwykf2G0q55TUI7 JrEkJjc3zCYF0+gwUUmDPQDD8u/hahDEb2uKrjCDe9ZVzpJJMbIVTXMw2Zr/G38Ft5bQ n1Q0oV19F4/u1JqqcTb4XXp5fSv2QAyPHXDf9ZpYp/KAa3RcJBqguE+Ae5BWKMHVcE4O 0PdbNWRaVZXmBrQxvp4el1RXoyQIq1/Bx4pzr9+88vOy4IN0GhxPj5a9nNTY8Y2XkYoj /Le21wyVJ62fHNiYwfztRVsiY4cDc8bMif8pqk9TV4LP/uhnhx1CMaFE6XZzEDMFXXMG Qgyg== 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=hw1Pb8jVQk9FC4VBMjRDMJKfMp8kJn7O5WM3f/NAK3Y=; b=ocvcB+QbIlbfj9g7qbUhpm5aDgxp7DqoiP0s/Jxjj3nyiTuWa6X2qWvFMAxsS4lOgk vtR9ShMDd+IKJKt/NVPqQY4HJAuy28hk90guzgvBIBqRXJY1t9iL26duEpZPxJWNI9b/ Bq+JFEFSIN9ftuTL52tkNLeBNb2XWNO9Pe4ItNkZimErNGzfvCK2XWw4biGZzyholruu MqrY1pUqaKpayypMXFix/mlpf763G9lSsbGgX0O8m3P8S3yG7bQNutiyFR0J1aFfY4qY 9T6o75Y92x4NsiLdFLARtR5lskz2oFm83STlk5CJcIq+qkEq9konxkA66Bas7owiAGRj gD0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=I9pzrWDe; 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 a9si1875123edm.76.2020.06.18.04.37.17; Thu, 18 Jun 2020 04:37:41 -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=I9pzrWDe; 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 S1729611AbgFRLez (ORCPT + 99 others); Thu, 18 Jun 2020 07:34:55 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:21807 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1728261AbgFRLeL (ORCPT ); Thu, 18 Jun 2020 07:34:11 -0400 X-UUID: 727a8d93be484cf38b0cce88d0ec8727-20200618 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=hw1Pb8jVQk9FC4VBMjRDMJKfMp8kJn7O5WM3f/NAK3Y=; b=I9pzrWDeR3L1ilz8GlkAFVNlwhrc38UXhd9YtRESy9AfoWZOPapGnwkhGd0bbZ6P1vJ1j1Jp9Tm1srnjv1NoF6Kiw0q3v/HJSDojKY81TuCXVEDJwWB+ariMDb8y73PedUnpFIySOhK5Ke9r17xJaZRfBYLgApTKg4AJH2dxAtI=; X-UUID: 727a8d93be484cf38b0cce88d0ec8727-20200618 Received: from mtkexhb02.mediatek.inc [(172.21.101.103)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 218966080; Thu, 18 Jun 2020 19:34:05 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs01n1.mediatek.inc (172.21.101.68) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 18 Jun 2020 19:34:02 +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.1497.2 via Frontend Transport; Thu, 18 Jun 2020 19:34:02 +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 v6 3/7] pinctrl: mediatek: avoid virtual gpio trying to set reg Date: Thu, 18 Jun 2020 19:33:34 +0800 Message-ID: <1592480018-3340-4-git-send-email-hanks.chen@mediatek.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1592480018-3340-1-git-send-email-hanks.chen@mediatek.com> References: <1592480018-3340-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 b3VsZCBiZWhhdmUgYXMg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