Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4518070ybl; Tue, 21 Jan 2020 22:55:10 -0800 (PST) X-Google-Smtp-Source: APXvYqxplY5puhjxiM+0el+SUPrNF+B40HTRmRxX5MuzQqSYp5Gcnekbkjdv20vL+/qc2S65QrtL X-Received: by 2002:a05:6808:486:: with SMTP id z6mr6048912oid.117.1579676110513; Tue, 21 Jan 2020 22:55:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579676110; cv=none; d=google.com; s=arc-20160816; b=Z41tnQqo/3pQy3UUyM4lmI2g55jIfnmopVgpYyWGp4rOgp9p3AWgvG5vkg1/J4eEpY 4d+sQuYqVQKnRuEFMK3al/9Odz5KGs6HUKB5BMDqwLotx+GXRMTaSuk7VgyrP3dlFo5F ZRfZkAv3I1dxMIJHJIBMeB2XQBkrh2LwevIKcAmChDsuo8PrW3qOhubPak7hYvnKxl/M aXRcwQYm2LbS08jTdbOfo6tKDf8VFnMBonFHHZLpa6Ue0ac5RFUUt2RtOwOSSDpikt7Y AYRf+DpyS1Ejmoqbo4hg41OQ/BIA4CB0hlCs+m+jFC86i/c1tbmR42QcRafy1Iw0HY7J KbqA== 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=XLnfeFsVP7+lObeG2kZyjx3ChT/tGZ7CtkpoKbbsxmE=; b=JKgrx4TU78qZO/arLSiim2njXAieUskvf+EjE51az6y+FJfqKgdX8t8Fx16sJ3W07w eh2J6PIfEVkfxzXvJAbzICa+BNV3NAjuF4a2RenkS2u18lfT0yXvkzt0okbMYZKaDFI3 SJIhpAKSYYYlvJmg8CJU0d1YT2onVboxoMUNX4g6G9WyewT8u7PMS0AkRnp2V3ZywJd7 CDnjtZfbFmgTmVgRd+7hMVdgjo0gjvCWMwn2Xc1eSiMUrEoccybOv8dPS0baJxB5j8yk G6dVYsAMkQunhhQpBcyIffWarsKzV0Wc4h2y6NiWOwdzj8ICwRHnd05WPemcGsaYKzN2 hi6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=LZTVUBMm; 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 c21si24317914oto.176.2020.01.21.22.54.59; Tue, 21 Jan 2020 22:55:10 -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=LZTVUBMm; 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 S1726170AbgAVGxX (ORCPT + 99 others); Wed, 22 Jan 2020 01:53:23 -0500 Received: from mailgw01.mediatek.com ([210.61.82.183]:7311 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725836AbgAVGxW (ORCPT ); Wed, 22 Jan 2020 01:53:22 -0500 X-UUID: 7606855ac520402e89c83d3d69de9116-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=XLnfeFsVP7+lObeG2kZyjx3ChT/tGZ7CtkpoKbbsxmE=; b=LZTVUBMme/ZNyYUioCv2KP95m9iUiZey22jTckc4h5iCoSnXY/BA8q0cAKHqtWyHdeYX8mx/Nakk30dBPJ3/f/EvXx3s6vd2Tr8Em5Eat/DGtJgknfNp2hAakSQJu5V6OJZeO1AjtN2vaZGv3TKpc+0NNYOD6zgXcGbnvCob2no=; X-UUID: 7606855ac520402e89c83d3d69de9116-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 1346624163; Wed, 22 Jan 2020 14:53:18 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs08n1.mediatek.inc (172.21.101.55) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 22 Jan 2020 14:54: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; Wed, 22 Jan 2020 14:51:58 +0800 From: To: CC: , , , , , Light Hsieh Subject: [PATCH v8 3/6] pinctrl: mediatek: Refine mtk_pinconf_get() and mtk_pinconf_set() Date: Wed, 22 Jan 2020 14:53:11 +0800 Message-ID: <1579675994-7001-3-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 RnJvbTogTGlnaHQgSHNpZWggPGxpZ2h0LmhzaWVoQG1lZGlhdGVrLmNvbT4NCg0KMS5SZWZpbmUg bXRrX3BpbmNvbmZfZ2V0KCk6DQogIFVzZSBvbmx5IG9uZSBvY2N1cnJlbmNlIG9mIHJldHVybiBh dCBlbmQgb2YgdGhpcyBmdW5jdGlvbi4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