Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp5955247ybl; Sun, 22 Dec 2019 19:12:01 -0800 (PST) X-Google-Smtp-Source: APXvYqyddc6/xTNTCeT8levoGdDMb66UZ2NP/U2aNR6/VL8vFj2EypuRJ9wgz3FQ2dmf7s3MQB/B X-Received: by 2002:a9d:768b:: with SMTP id j11mr29917258otl.116.1577070721141; Sun, 22 Dec 2019 19:12:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577070721; cv=none; d=google.com; s=arc-20160816; b=ZxspZUxOyzlLZtrOVhfBSgMGPsQKv4YhOdMA86xuImypD1YGauqTYgj0kk6D+LuxCD WoY7epRDw5AFscy83e+AUqJLGGxiv9Dfxswc/l2M0u5V8JoIflPCFGLRNKIT8JKH1KgB ClO8nAN63WRJl89imN1V7zc2Y1mCl+rsyzSmJg8thQazlNX2jaDR2ED9CU6x7Cuii0BV JBgbI57xVLrH52Y88BayJmysOQwdcTZmKVxxSrFbRyVDEQP2p1g1Pmaw8po+b9dbvUUU uHrAF8+eHrw39bTSxgeP6xiPQVE/yZ2OUjIC1MsYAgehWiQ4fk7VBmT9+07fXHkwl9el hSIw== 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 :date:references:in-reply-to:cc:to:from:subject:message-id :dkim-signature; bh=1gjqBsxQJFzTJYcXv+4xkR26006Bc8pqbfyHt8iDVik=; b=l3t+1KJsrqaIPTkm9omIMjwDZCxt8lGCo6grhOEgqeDGmh1jFyDSDedIrMrFhlhLaG t1MBbNydZG/PoViQJ8veOm2YNTyJeoAtIIzVEYyus++VUqj53Zojj5y8T5WozfBze2i3 YH0wOiOwp1lc23B+p8Lg1rtXPxtAT5FCEl+BY2jYfMStw/kbaTwPyq3KQ/qvkMwWBj04 SZAuk7/eO9J2COHD6VVHM3SWl4V3gfuevhNt59lQONjLeV8Fm4F6D32knYo6L4p7FM2U rf04BiZlHVgiQgmEmkFA+MLdoDL0pp4C9iKHdbS8S9dUi5Qv0+X7E+g9sPjAgbg3fWkI WsJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=bltNlyAc; 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 q124si8126591oig.228.2019.12.22.19.11.49; Sun, 22 Dec 2019 19:12:01 -0800 (PST) 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=bltNlyAc; 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 S1726623AbfLWDLJ (ORCPT + 99 others); Sun, 22 Dec 2019 22:11:09 -0500 Received: from mailgw01.mediatek.com ([210.61.82.183]:1861 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726393AbfLWDLI (ORCPT ); Sun, 22 Dec 2019 22:11:08 -0500 X-UUID: 50313d1214cd47cd8d8ff6424397f7d6-20191223 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:MIME-Version:Date:Content-Type:References:In-Reply-To:CC:To:From:Subject:Message-ID; bh=1gjqBsxQJFzTJYcXv+4xkR26006Bc8pqbfyHt8iDVik=; b=bltNlyAcaQK0NROYx4CJosBHds/na0LlyG2rB2vmu2OT42YBTic+cwnHz4E7K6I+LZ1BxQkr6/CTdOiaszTFk05aif+OslcdjvtkCAkyNnHLkrY5XgbCHZcAMjsUGxouo346EPUrzkzbRYiQ/nNU1lR5sfGgsu+bDrvBeX4UFf0=; X-UUID: 50313d1214cd47cd8d8ff6424397f7d6-20191223 Received: from mtkcas09.mediatek.inc [(172.21.101.178)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 956786830; Mon, 23 Dec 2019 11:11:02 +0800 Received: from mtkcas09.mediatek.inc (172.21.101.178) by mtkmbs08n1.mediatek.inc (172.21.101.55) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 23 Dec 2019 11:10:59 +0800 Received: from [172.21.77.33] (172.21.77.33) by mtkcas09.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Mon, 23 Dec 2019 11:11:12 +0800 Message-ID: <1577022724.7468.20.camel@mtkswgap22> Subject: Re: [PATCH v2 05/11] pinctrl: mediatek: avoid virtual gpio trying to set reg From: Hanks Chen To: Linus Walleij CC: Mars Cheng , Matthias Brugger , Rob Herring , Marc Zyngier , Stephen Boyd , Sean Wang , CC Hwang , Loda Chou , "linux-kernel@vger.kernel.org" , "moderated list:ARM/Mediatek SoC support" , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , , mtk01761 , linux-clk In-Reply-To: References: <1566206502-4347-1-git-send-email-mars.cheng@mediatek.com> <1566206502-4347-6-git-send-email-mars.cheng@mediatek.com> Content-Type: text/plain; charset="UTF-8" Date: Sun, 22 Dec 2019 21:52:04 +0800 MIME-Version: 1.0 X-Mailer: Evolution 3.2.3-0ubuntu6 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 T24gRnJpLCAyMDE5LTA4LTIzIGF0IDEwOjU3ICswMjAw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