Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1452149ybt; Thu, 2 Jul 2020 06:00:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwyB6wN5CSjBArhQz71USkD8Z6uohNLomppcPWSqMN6YbrCAKOrNb156FegTnTkvUBzxEH3 X-Received: by 2002:a17:906:c083:: with SMTP id f3mr21283993ejz.530.1593694830468; Thu, 02 Jul 2020 06:00:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593694830; cv=none; d=google.com; s=arc-20160816; b=IIbxrwiue2yoiX08VZEL/m3zTPZTH+/UF0ZTO+XSOtnT2R1CWTKy32FVpTdLCHWbZs rPrdUh/mqyIeDVxntoCVQGPQWAqt5BWRqbjwu4FG+7/HTeXaqsJCVDBP8bBPfkEwtHAp W0wpNH5QhnRgUDQrpSKfc5kRS1Szk/Octg90038oFysFTpp6LFWtTf88zLxlTI5NXYu4 K+1ug3ObP5GVl/NVZTKuS+Gf82yE9b6EzkONnmA7d+IlXbEVpOlc6b0CXCAd2Gr9WFj7 b6oNJ63I8NPFi3PZKwuIiDdoOWmdc27UtIMyhLyUtBbqf+WGdt5TWkLDQxyfj1Csg8xC 9UJA== 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=5TKcrLGCtY1B7wgKh4ZcQSHuqGbEX2NNJvS+KYOZ5/Y=; b=G+/Ukl+H+uSwYg9oQbLzxerk4/HKZssvbQb8uaeiH5kx4WpptANGfIx3dnR49xuCpr Xs9RDts4dOW5BO1SMrQto2xgh0sx69FZjnJooIMmSXkNtbs9l5o9HqGITDx6nGMI4yHR jfNTxkSk9cUOZGTe4QnIeeiIwwUBg9LI7aTHAs/jf4A/L+Q1EYGqZS2OAwhCskGoy+Uo yIEe6hO/wnbBfHfGDTDioVh018ZYtJ0+3Y0S00qE09KZeXARc3epjqrwKH8x6Ul/6XWu sekQz280Ifsh1NDREDk07lWI3yZ4rts7PrETPRWZ4EXe+dGQsWBpw0Xv5x348mjA/Ecu rHmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=HbpZpXSD; 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 lf11si6180878ejb.475.2020.07.02.06.00.07; Thu, 02 Jul 2020 06:00:30 -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=HbpZpXSD; 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 S1729150AbgGBM5f (ORCPT + 99 others); Thu, 2 Jul 2020 08:57:35 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:25527 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1728991AbgGBM5d (ORCPT ); Thu, 2 Jul 2020 08:57:33 -0400 X-UUID: 8aa1b68a6cfa4dad88604f01b4b98b99-20200702 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=5TKcrLGCtY1B7wgKh4ZcQSHuqGbEX2NNJvS+KYOZ5/Y=; b=HbpZpXSDw6qV9gPdkohD/z1CON/FA18xs/TCagC+Kul+oeJBm6FIaiJkcrXRQ/UtkZDAyTL32mstaP3h8GtCdALmPkZ+0+F3xV84uOai23QtRmAYRo5b8fFcvFw2KZkLTBx4W84fN2rXIElOEpf2xH7i/LXY99K21G8re7izTWY=; X-UUID: 8aa1b68a6cfa4dad88604f01b4b98b99-20200702 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 1285532543; Thu, 02 Jul 2020 20:57:28 +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, 2 Jul 2020 20:57:23 +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, 2 Jul 2020 20:57:25 +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 v7 3/7] pinctrl: mediatek: avoid virtual gpio trying to set reg Date: Thu, 2 Jul 2020 20:57:06 +0800 Message-ID: <1593694630-26604-5-git-send-email-hanks.chen@mediatek.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1593694630-26604-1-git-send-email-hanks.chen@mediatek.com> References: <1593694630-26604-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 b3VsZCBiZWhhdmUgYX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