Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp3816484ybh; Tue, 17 Mar 2020 07:08:44 -0700 (PDT) X-Google-Smtp-Source: ADFU+vusGDLsinox81s0okWqWNsVsFR5u8fraNidn+pRIQJR2sx4Q8EC+DleZ7DMjJu4+sx3q40Z X-Received: by 2002:aca:4a08:: with SMTP id x8mr3698254oia.158.1584454124134; Tue, 17 Mar 2020 07:08:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584454124; cv=none; d=google.com; s=arc-20160816; b=0ONDH+ogCzkNSiatg/2B+KFH3ptNi4xIX8tNJXxh4pnb4dqBDpZqlKHpAIRkPXbirs kB7ja5Q1HiU16sisq3HhWlSSUeAvKnUYfd9Y/GqhjU75vEOoD6lQH5uaGWBveNHtq4v7 nCPReMiYQjsDKlT+v5S+ddq2G6XRejngjuioj2qu4NjHrL2Q+f56gr13Vywu0PlLa9Sr 2ZW731GbCyMsTZ6HRuU4tpUTsy4wa67Z1A+Fy2gpLA3uzos3w3MJWpQZSFYLGGo8Uu4I 8IwurgHf9KsXSZ1Rn+j7DqItyhsknjx7FQ6JS4BQWZqzr6OuLW8fG62ekPFbrEYPOx25 vSRw== 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=um5eftLgAqDSQ5dx2pz0krbBgQtP9qnWiOJNsrDGPupUPwEoxu3W7wrG3wdj1huZq8 TaDb+w0YwIiLVkhD+8UoUVFyULYDHisdSFusb1HZjt85K/tQAo9SCkh+0OK13xYMfW0+ UqyHwIMLHCV084EtDq+NQzVzuTa6S5c6AGc4PwvV92w7rZpQSf/ilS9hN2CxLCCse6uD ABGXhX7uIn12b0N+fV2rht+KFxXB1Ur6ST1g+JGBHaJoocYdOMefCsbTEKy29awJQlsf zl9pf26/OTtm3nQ7JKVKxJnCn+OHMwNGDdQRrS+fwZF1RJPxrfqxvIQ5YxYQaGBpYnZe Gocw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=MyZFVhIG; 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 t19si1835793oif.250.2020.03.17.07.08.23; Tue, 17 Mar 2020 07:08:44 -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=MyZFVhIG; 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 S1726852AbgCQOHA (ORCPT + 99 others); Tue, 17 Mar 2020 10:07:00 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:34753 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726287AbgCQOG7 (ORCPT ); Tue, 17 Mar 2020 10:06:59 -0400 X-UUID: f461fb353aee4a2fa48829640e2621e7-20200317 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=MyZFVhIGhp2C+YAQlq6W12tNfo7aYr7daMjMjQO0bfY1lIU1nJzNe8yjAl0NqdgHVFzj4OhiVJsYij2JUzNcpnOn6Z5T/o/6v1rk4Q8rb21lWn4A98uZwRGPOW3gQVNYAyfjUT6UN7FZTKAd8JPLV+ZP3FSFTSGenXKG9tbawTs=; X-UUID: f461fb353aee4a2fa48829640e2621e7-20200317 Received: from mtkcas06.mediatek.inc [(172.21.101.30)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 302896276; Tue, 17 Mar 2020 22:06:54 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs08n2.mediatek.inc (172.21.101.56) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 17 Mar 2020 22:06:14 +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; Tue, 17 Mar 2020 22:06:07 +0800 From: Hanks Chen To: Linus Walleij , Rob Herring , Mark Rutland , Matthias Brugger , Sean Wang CC: Andy Teng , , , , , Hanks Chen , Mars Cheng Subject: [PATCH v3 3/6] pinctrl: mediatek: avoid virtual gpio trying to set reg Date: Tue, 17 Mar 2020 22:06:44 +0800 Message-ID: <1584454007-2115-4-git-send-email-hanks.chen@mediatek.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1584454007-2115-1-git-send-email-hanks.chen@mediatek.com> References: <1584454007-2115-1-git-send-email-hanks.chen@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: FDDBC871B4EAA0324395034B2F5104235B5519A7A8F0DCE7866260D532CFA4A62000: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 Zm9yIHZpcnR1YWwgZ3Bpb3MsIHRoZXkgc2hvdWxkIG5vdCBkbyByZWcgc2V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