Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4517659ybl; Tue, 21 Jan 2020 22:54:33 -0800 (PST) X-Google-Smtp-Source: APXvYqxiOnIK7YEIL6pf7GHJZxolu4F2W9Y42rLUFX0cj+RI9X6WXKeXeNGBrnKku8fKQvturMc5 X-Received: by 2002:a54:4595:: with SMTP id z21mr5900653oib.136.1579676073383; Tue, 21 Jan 2020 22:54:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579676073; cv=none; d=google.com; s=arc-20160816; b=I9HCKnhsudVa2ZCB8zgynOLvN+gSqoOR6LqKcWTojc662EEGBsroO0gliIOV4yWssb Yet1KblnNAApL8WLr0iOqdkZekiNSLvgtvfsEiAQc7Q0Gb7lv55gZuCTX1XpHb9pZ7OV ho+Xlf+yvXzUNA2yp8FcJShWdvclausioux77XjQ8GJH/DUthafntKGUNg81lRZAGk5c oJgaQo3XlO8zVGnRo2vSTX79ceM31dukuHrVMBVQBxgl1lWtTaMEl4HTbTZsijUNiYH2 JKKCYkyiYZ1nt2fBBpUejOVLGeJOAfaimTDq1yXjopM5t27t400y5wzANzgb9giYgwiB +VkQ== 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=hWDA1wJTEUP+o/6FkPnsHhm3+yVXX1P3eiqaY4U4TzM=; b=kIowg2lLteJb3VT6tDDsiuKTDGpCr2/8LYQc3WFFxIkNUuYeMxZjbbaV6FlAUuKJD8 Wb0Z6Q1kBm4dLwRzD3YycdtKl7C59FGglkCE7+8+zZFy5eEFfgCq7YFsH1LiE4a1/63e G6z5vwbuO28QOP0Kge9TVZL9nHrq1qhLBH48pdVVzeH7Nrq8g8K1L5HqWuW4shd3zAAE 8FsMhQ74lu8dSkmndypj9+SkPavUbVM2G6y2fGxEERtfUUhKoarOoajdvRkMJtGpBV76 HjgyGVwfc6GNA2MkO7FEGlwaIPxrziYMrH8VVJGb16vCAVUJOkCU6qDfUSzppxrdY9Cl jGlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b="BPy5IQf/"; 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 z11si23642540otm.312.2020.01.21.22.54.21; Tue, 21 Jan 2020 22:54:33 -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="BPy5IQf/"; 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 S1729012AbgAVGx2 (ORCPT + 99 others); Wed, 22 Jan 2020 01:53:28 -0500 Received: from mailgw02.mediatek.com ([210.61.82.184]:39247 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726005AbgAVGx0 (ORCPT ); Wed, 22 Jan 2020 01:53:26 -0500 X-UUID: 8a949a9172a649fb9605372d833f32b9-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=hWDA1wJTEUP+o/6FkPnsHhm3+yVXX1P3eiqaY4U4TzM=; b=BPy5IQf/QVjLp/8J8hZOt7uJM0rtyPuhy2d+lBrHIHoVMoCbWlqbYkETXLThcNrbEYaOZRvWw57o1j3c5xHZU0rdF3SJsPVqV6eCEl5GCHf8jguv+TriYvVGp7F5Jqx5e/Iwl4rUKdTDv6Bb2rQl4BV1feJ8rm4Icf1CxyptlJQ=; X-UUID: 8a949a9172a649fb9605372d833f32b9-20200122 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 365753576; Wed, 22 Jan 2020 14:53:17 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs02n1.mediatek.inc (172.21.101.77) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 22 Jan 2020 14:52:04 +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 6/6] pinctrl: mediatek: Add support for pin configuration dump via debugfs. Date: Wed, 22 Jan 2020 14:53:14 +0800 Message-ID: <1579675994-7001-6-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-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 RnJvbTogTGlnaHQgSHNpZWggPGxpZ2h0LmhzaWVoQG1lZGlhdGVrLmNvbT4NCg0KQWRkIHN1cHBv cnQgZm9yIHBpbiBjb25maWd1cmF0aW9uIGR1bXAgdmlhIGNhdHRpbmcNCi9zeXMva2VybmVsL2Rl YnVnL3BpbmN0cmwvJHBsYXRmb3JtX2RlcGVuZGVudF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