Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4517802ybl; Tue, 21 Jan 2020 22:54:48 -0800 (PST) X-Google-Smtp-Source: APXvYqwWanW3qC4kZzrtRLnzaSPmHtidCREJoHcze6TPmXheLNHnOe63biUiXTgQOSankMIkjLFw X-Received: by 2002:a9d:4d8d:: with SMTP id u13mr6272232otk.299.1579676087976; Tue, 21 Jan 2020 22:54:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579676087; cv=none; d=google.com; s=arc-20160816; b=PvAtthsLV39gJZlJor49r2c8MPYdhj5JuQVc5tJH+nMsU6mzdNmdBPYWPd4D0FoTZ3 E3tYsHeIBEwwLbhn9/pFgs5AuEv13FvgAG2+/FmRRoNp//GAFNFfLRUFmh0AQMlPUMhe EKjVXnWczRDhuyGS/OfHYdpBy/VxcYyhXeIavSDNoq63sdDzIvbntF2L/tomw5Eq4gt+ UKqwCq6Geu8oAgdeCphfVsEHgOM7DuVeqctHDcj9NESzo/ZPEMxgua0V013NGaL491e7 WigaECW2AWHhY7FwCi8Mpj/Wm9H14sEohCSg2gMxDacNk4M/ASPAv38tHPLxKi0IXt0m JUoA== 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=KYKiD5j0ZkuE2k7CXv0OEhneTSIarHmN4pmbVSrJZz8=; b=K0ttWvFYdvCl/h7fLwD/K/tCc52lbpGZF5DuZ3XdR1+L0YXw4eLP7dbq0q12im18ym xBBl0AdWSljhcuM9fLm29NK25qkU4olcZjau0RmO434VeJWp+qXmd3/kdN0VqRKTBDkL lVnajilqDRDCikEBOxIcGCZnnyQXM5r34CKVyVR/yJFwvuYikubNhRHRqwGbPcskn2X0 sRrjFhZWQBGZ2A0RtErQsmU1YBQ/7mh1PoD25D1om42OW6cLGPy8fJGOM5LZ05MMloKs UyVRGMmmD6ClbVs6KhNNh9ZOBE/pKNtDik4LSQIN9ya+5JDlIHcDUzO/2uush0sQheO2 ePsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=eghCJLxe; 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 q8si23224747otk.283.2020.01.21.22.54.36; Tue, 21 Jan 2020 22:54:47 -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=eghCJLxe; 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 S1729092AbgAVGxg (ORCPT + 99 others); Wed, 22 Jan 2020 01:53:36 -0500 Received: from mailgw01.mediatek.com ([210.61.82.183]:59883 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725943AbgAVGxX (ORCPT ); Wed, 22 Jan 2020 01:53:23 -0500 X-UUID: 1f616583f71844a0896fea33dd6be950-20200122 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=KYKiD5j0ZkuE2k7CXv0OEhneTSIarHmN4pmbVSrJZz8=; b=eghCJLxeziOYKvwI4vWWwkGf2rnRVXpNblJVhYYadSKHYCGcvg/zemHUZAWD7gAUVu8CCRgf6Nrwl1JScQDBzD3UZG7pkYzrdQi//cs7/f3ilsF/z1zSIkd3xT8iPT8CF06Ldc/x7M32fUl3GMZ2NAjY6mXgYAlyL/J00rOqxYs=; X-UUID: 1f616583f71844a0896fea33dd6be950-20200122 Received: from mtkcas07.mediatek.inc [(172.21.101.84)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 510908576; Wed, 22 Jan 2020 14:53:18 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs02n2.mediatek.inc (172.21.101.101) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 22 Jan 2020 14:52:13 +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, 22 Jan 2020 14:51:58 +0800 From: To: CC: , , , , , Light Hsieh Subject: [PATCH v8 4/6] pinctrl: mediatek: Refine mtk_pinconf_get() Date: Wed, 22 Jan 2020 14:53:12 +0800 Message-ID: <1579675994-7001-4-git-send-email-light.hsieh@mediatek.com> X-Mailer: git-send-email 1.8.1.1.dirty In-Reply-To: <1579675994-7001-1-git-send-email-light.hsieh@mediatek.com> References: <1579675994-7001-1-git-send-email-light.hsieh@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: E6CD82C4D7810ABB8729827AAB2874B5D67870C461F194C83EDB7B24F76FD18F2000: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 RnJvbTogTGlnaHQgSHNpZWggPGxpZ2h0LmhzaWVoQG1lZGlhdGVrLmNvbT4NCg0KQ29ycmVjdCBj YXNlcyBmb3IgUElOX0NPTkZJR19TTEVXX1JBVEUsIFBJTl9DT05GSUdfSU5QVVRfU0NITUlUVF9F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