Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1608061ybh; Tue, 14 Jul 2020 02:22:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy2zw0BdJxLbqWF7IPo+gnqEPUfu5lyX6gbTrWFNN/Us5QbkcXN4IEIGDuUpLku92XdLiIh X-Received: by 2002:a17:906:7b54:: with SMTP id n20mr3622419ejo.144.1594718562225; Tue, 14 Jul 2020 02:22:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594718562; cv=none; d=google.com; s=arc-20160816; b=RwZ/F48LNwlRM4zFtPCaRA9Q7pIlVz6wsHYfZIcn3ceo9OnlNiUK/VESV6S9xsMLoE l7Vm1nn08mYKi4UgvjU5K9BOCRTKhD68MzhNRoBW6Ltb0ed7Dw/c58jMz8QZ6OUCiieA fClaJGgCvP9w6OEUMcKgeQCKKcYvRvS22oGUYIwIpEiWRO3/7Sk3W3WWC2CnuwoKVNjQ Ewt/81ATZeRXbiN8nvlzNBDhrLjuPF351onX8r1W6LZakx43Extj2RtCW0NdrBa+F0o0 00pVnhfhLkPTOd7UwFiYCp3u1Z5qS9bkhX3A6dXWnCNtujUjNkR/WYdRBF/y8mXrZrG9 vpig== 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=ahmJ+iCRVTKXFtRtyDWGXYImsIg7jin0Qq9Vh0vVaIQ=; b=TS2znIdTQzCP29FWLS4eQOie87btgYN4+pkcrZ0otuvW6+iJEuVlBpcg5kFTR+ufd8 9lmWMJoLOni6XuPxnrBxpvSAS9mgRpsoqb7uEkbAUNX8I/oHPsI+NcnjtAV3bxjMFZvg lDVmrQFIv+wyYwZ6aKo1nLB/VvBrama7Wx7/BWsQUuWTD7hUgR+myyeG+6xxj0hhfkix leSBUF7RrTvcs+rEFkrz5Y+Qcqx+tGXOVg+U4FQh9zFx5iKAkDfz9+Ne9o5aQN8sT+G1 S7BXf64QUFeoS3TVD1qipt/DD/zLapZOHEittIrYkjpU6P1Kj4EAJIyziK1MwoEYNyIW c3qg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=pW76jng8; 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 q27si10498423eja.643.2020.07.14.02.22.18; Tue, 14 Jul 2020 02:22:42 -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=pW76jng8; 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 S1726971AbgGNJUT (ORCPT + 99 others); Tue, 14 Jul 2020 05:20:19 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:33230 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726431AbgGNJUR (ORCPT ); Tue, 14 Jul 2020 05:20:17 -0400 X-UUID: 806de7b976f94250945a44d82e6a5b6e-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=ahmJ+iCRVTKXFtRtyDWGXYImsIg7jin0Qq9Vh0vVaIQ=; b=pW76jng8pKScS9zz5dKU9N9TvGWQJtl+ZLwz3LCWdeUToEXeVUAM6BUa4oMzlEiSmKC7Iel/E1AyiTQKaqpTGhP3LFj9X49qcBNifQXAmfP0G3KZrv6CCGId7bRuknStfu/3Iv46CupJHnr1O85bl0nBHC2dRwmjRMDarcCRMEo=; X-UUID: 806de7b976f94250945a44d82e6a5b6e-20200714 Received: from mtkcas10.mediatek.inc [(172.21.101.39)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 1961975607; Tue, 14 Jul 2020 17:20:14 +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; Tue, 14 Jul 2020 17:20:08 +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; Tue, 14 Jul 2020 17:20:08 +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 v8 3/7] pinctrl: mediatek: avoid virtual gpio trying to set reg Date: Tue, 14 Jul 2020 17:19:58 +0800 Message-ID: <1594718402-20813-4-git-send-email-hanks.chen@mediatek.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1594718402-20813-1-git-send-email-hanks.chen@mediatek.com> References: <1594718402-20813-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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