Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp15321332ybl; Tue, 31 Dec 2019 05:43:53 -0800 (PST) X-Google-Smtp-Source: APXvYqwsWGOU1ZD6+RD9MwCmIoOkhRupFZFmTJBPEi6lgnZT7/oRRzI46TBoso0K3NaQGqCfj0VK X-Received: by 2002:a05:6830:689:: with SMTP id q9mr76950460otr.285.1577799833826; Tue, 31 Dec 2019 05:43:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577799833; cv=none; d=google.com; s=arc-20160816; b=Fw5uZcyHWyatJKuvtvY8Tm0m3o6y4lvzxNu/06hhBbATqzXsPjT5aQMYlz7Vso8EnO gWSnkyM4lD3ytcW+yNQ7yoK9g1EWrzooWqdtwG/tlP8a98Jft2RaJvLrlyLNI/44GXUx HZBHx/P1IMhD4/N+k2sE/OmaDwXk8AEt9CWme7aabKTEHvL4ckMiKDSXlzpa4e59AKc3 ccygq91f+Jihi+HdNdGbBjbqvasjI1PFVKgOhzzmL8ZsUO94QyFvlHXynNKZCQfvLXZf lHAHjFfuQ2hKCvhbNWX2GFn+33+RXw0bIN3XKVjFPmZgR1fTGZAW2MJeqc8TFAHCdlEw 5l0g== 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=z3pZFT+6t8ylWCp7AMGBvI067vp4npjbNdsiLxU09zM=; b=YQkfRjRzF0vmyV1xYjEVYJI1spJ7jUlgGw6GbTaZ8grxn19cP674kP2a/TP8WaqjvH tqYNmM1nzQZY7wi1auvnWoTZaeHG6fyBr9ih+BOAep+LA04kDn4n+GHNjdMNdcxaiTbA GXJdTgbXTJM85IfqsBK80rawI2chejM9niJxgIcm66m6x4jxAQLPJ6+soTGPU4+bhMdk pNZZuctwClShSJiF8/F1lNfiyB3EP5MTOO/oqIi47bhvTfsP91P8qIYTcv1vQ0wJ8zfs MTqcdXevMPh44oSqaqeYNxyPeUau6aTN1bZIeZOnp2cSFYXKc9xn7yu0j/IM8lE00jiE 86Ug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=SuPrK7A2; 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 h20si9066315otn.253.2019.12.31.05.43.41; Tue, 31 Dec 2019 05:43:53 -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=SuPrK7A2; 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 S1727117AbfLaNmC (ORCPT + 99 others); Tue, 31 Dec 2019 08:42:02 -0500 Received: from mailgw01.mediatek.com ([210.61.82.183]:3222 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726229AbfLaNmB (ORCPT ); Tue, 31 Dec 2019 08:42:01 -0500 X-UUID: 5c1b16cc26e54592b41cf2855c0e0db4-20191231 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=z3pZFT+6t8ylWCp7AMGBvI067vp4npjbNdsiLxU09zM=; b=SuPrK7A2wsSKEWknPVXkflkhacOSI812EAZI2Kh6yIHY+5xTpgeK1eUTUUgYrz9PA2Lcem1yvryAcst20y2Ndc4zPOwe/I1mniO/JhUfO0Zv2oE689ulPiS5AB7CKLzKeozMCGrkvEyVTlugDsR08a4vvSRZGE51Qw3ogCAaImM=; X-UUID: 5c1b16cc26e54592b41cf2855c0e0db4-20191231 Received: from mtkmrs01.mediatek.inc [(172.21.131.159)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 1506906342; Tue, 31 Dec 2019 21:41:51 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs08n2.mediatek.inc (172.21.101.56) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 31 Dec 2019 21:41:05 +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; Tue, 31 Dec 2019 21:41:17 +0800 From: Light Hsieh To: CC: , , , , , Light Hsieh Subject: [PATCH v7 6/6] Add support for pin configuration dump via debugfs. Date: Tue, 31 Dec 2019 21:41:47 +0800 Message-ID: <1577799707-11855-6-git-send-email-light.hsieh@mediatek.com> X-Mailer: git-send-email 1.8.1.1.dirty In-Reply-To: <1577799707-11855-1-git-send-email-light.hsieh@mediatek.com> References: <1577799707-11855-1-git-send-email-light.hsieh@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: 32219F344A537A986D604800AECCF3AE49384A06C2C055A05C0A4F98DFB81C412000: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 QWRkIHN1cHBvcnQgZm9yIHBpbiBjb25maWd1cmF0aW9uIGR1bXAgdmlhIGNhdHRpbmcNCi9zeXMv a2VybmVsL2RlYnVnL3BpbmN0cmwvJHBsYXRmb3JtX2RlcGVuZGVudF9wYXRo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