Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp373564ybb; Wed, 25 Mar 2020 01:15:12 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtYLAVCyQSEhPxHm2vAYkfW9V9uZNzko3zuDT4Qij+fLgyG05lVqQEhmDleAyNpIHhkV09W X-Received: by 2002:a9d:5e9:: with SMTP id 96mr1568055otd.307.1585124112627; Wed, 25 Mar 2020 01:15:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585124112; cv=none; d=google.com; s=arc-20160816; b=cv1eP+TgrwGDC//cytoMteTvFHcR14jB5J/8FL/23CgyPEQfIO+iPLQDfREstj/E7t SKG9Z8WuWCP1FJxWxaSdTPwV4fqZhnPihowZ23WQxdw6YVW2WD3ERBv5tJnAXBoIw41M yPqoTVbctVwyKcK0vhw0O1H4U5FlE3c2vcABIqRBiGdIBeV5hx1cblR6FQbocJA4IspF ZoUw0FMSMT6e8bIiDVkBP2Bv32jIOinvCX0Oc+e8/u5V8EgH4R7ANQw7T0e+TT9PYwgE xth+9sJZoIiwDbKlXJQONBhc4yHneGYvOfHChUKnRNAVYOpho9ZGYDfVWKekpNVDXrxi JoLg== 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=dJ7gn4TdaczOjZjHPmp781H0hrs3QHnrPcfrTh+H9UM=; b=kHPahnpZCUn77rOl+JybtcfYyxNuprunRB5AdSLajxk3pgUYpGt53YbcHWFtr8D2WQ YTlh1JPvY8ptc7DQd4j2ix0OM5bbc2jGGgTtjnXazuDYH9ZeiANpxfLOWXb2wrA0j8Vp ugwRVCXAMdn/1lA7Q6e8cjZDADpXE7XALwaY3fVNYD7r9gO6ZyyQ2voGTd2EXP3jKLqL brOWv8W26EeHsg+Hzd1b8do++dR9uCnZYC01xPsZQUwO++XVqOO5Yc9HkOs+MZBQcY+g GJGsP4wSwFyzGZnt1xkExY+Z2KkGT/O9Ox9UdkLKWp2gGcLoJcP3BiCVqtF2YVzN3Qvf 218g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=KPHfVEc2; 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 q6si11030426otg.84.2020.03.25.01.15.01; Wed, 25 Mar 2020 01:15:12 -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=KPHfVEc2; 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 S1727280AbgCYINe (ORCPT + 99 others); Wed, 25 Mar 2020 04:13:34 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:26224 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726073AbgCYINd (ORCPT ); Wed, 25 Mar 2020 04:13:33 -0400 X-UUID: 5cca7a9598cc4ad38bc9ca209b44d65f-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=dJ7gn4TdaczOjZjHPmp781H0hrs3QHnrPcfrTh+H9UM=; b=KPHfVEc2qSFNnAbq7jElZDp6cma6sTHdiB6qXXh5CHfryshgTptuPNG3lm6V+UNr1g959e4bsvJPVaud62LYti4C4VIS5SQmEYbAz/u3TCL/3/H/+k29Qz9F/gns7RRiZKOg7I1MH5iBVkaZRXfE1TW7pvc6n03VFood078Y2wk=; X-UUID: 5cca7a9598cc4ad38bc9ca209b44d65f-20200325 Received: from mtkcas08.mediatek.inc [(172.21.101.126)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 1756567163; Wed, 25 Mar 2020 16:13:27 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs07n1.mediatek.inc (172.21.101.16) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 25 Mar 2020 16:13:25 +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.1395.4 via Frontend Transport; Wed, 25 Mar 2020 16:13:25 +0800 From: Hanks Chen To: Linus Walleij , Rob Herring , Mark Rutland , Matthias Brugger , Sean Wang CC: Andy Teng , , , , , Hanks Chen , Mars Cheng Subject: [PATCH v4 3/6] pinctrl: mediatek: avoid virtual gpio trying to set reg Date: Wed, 25 Mar 2020 16:12:41 +0800 Message-ID: <1585123964-10791-4-git-send-email-hanks.chen@mediatek.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1585123964-10791-1-git-send-email-hanks.chen@mediatek.com> References: <1585123964-10791-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 b3VsZCBiZWhhdmUgYXMgZXhwZWN0ZWQgZm9yIGVpbnQgZnVuY3Rpb24u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