Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp15320414ybl; Tue, 31 Dec 2019 05:42:49 -0800 (PST) X-Google-Smtp-Source: APXvYqzpHmYETXu3ebjbA6fEBVthCqbhLeAAhyJNbWB/A9jxmYxNOka8vVuAHEOj1uRLDqfgNdoi X-Received: by 2002:a9d:1d02:: with SMTP id m2mr75130246otm.45.1577799769431; Tue, 31 Dec 2019 05:42:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577799769; cv=none; d=google.com; s=arc-20160816; b=Jag8c1EIchW08VFgROc4Y01opQQ8XDqBK9jEULs3PrDGUoYih23EFxdCaY0meaY7oe eimHjprobhp0SBKdAiuJ9yTrSNnkIz/jh/+TuLY0wcnaD9mZwSMRCjxOS/rwRgwh0BJB JrDE1fT++/RpfmwRKRVMGEDFBwx0G2A1DPQDuX+G/0OqfgQniKUob6sggNmUdeah+Vzf gwYULmMhsH5rhCgYG1jQqtXmNDF9NyywHfx4dOkB90ykYBopTH8vVwQtFw237kP4Pwrb U86yaZPq7xaCsjW2ybHhGMYKW567R/n3Fpuq0zpI4U3L+VYfcQBFBv7M1AWikmaNC+HV ZV7w== 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=iF7bo0bD8duTIrSbLoimLZ9b/gptBGQwd48GDl2KccQ=; b=u0dvsSwMtsBgo9wT+8EjPAdNKpdJAluALPp5vBKxFwOat7cBIBSDkW+L5l1DRkocx4 Je1+caoK3PfV4Q/yObPQs9JpCq6pfDJbwjbZKPMFm9BcZmCbo5jLP5v9QnIL/ZMLATM2 Y6mou3KN3KYzixhZT520U6GZ+/582DzLU7gpPn5fZ+RVZm77Cxjg193gl/EwrEMsxwhM D3T1tmWoceMgBoaRqr7LOtmpPpn4qDg+o9buYFiazksK/ubq4HWpuJLscPHRasnXBhOU PfFm2o9RGu6bOZpH9xrNaBnooPnlIDECGuczNyw+uLY3fVF41QvLfmdPFshB/1CQkeyA AMjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b="kc/WTTbh"; 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 m17si22831475otr.17.2019.12.31.05.42.36; Tue, 31 Dec 2019 05:42:49 -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="kc/WTTbh"; 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 S1727056AbfLaNl4 (ORCPT + 99 others); Tue, 31 Dec 2019 08:41:56 -0500 Received: from mailgw02.mediatek.com ([210.61.82.184]:59088 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726060AbfLaNl4 (ORCPT ); Tue, 31 Dec 2019 08:41:56 -0500 X-UUID: 7cdea56ea6634489b398695278f284c2-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=iF7bo0bD8duTIrSbLoimLZ9b/gptBGQwd48GDl2KccQ=; b=kc/WTTbh0K4/uCPp+ggzU5eNBAcT8mJ+UFq/KGkSsgZ1qZYFaXsQMkr4Nkb+fpmgrpR74jGJOMr79uvZUGLJUx4Ax7y9sbmPBApwBpYv9n6US243aIhfynzLxo1OLZooho1kCjB+D01A5JDnGUG6UeXSOcX+sMKUDzSU2AM7t9g=; X-UUID: 7cdea56ea6634489b398695278f284c2-20191231 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 1633579298; Tue, 31 Dec 2019 21:41:50 +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; Tue, 31 Dec 2019 21:42:19 +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 4/6] Refine mtk_pinconf_get() Date: Tue, 31 Dec 2019 21:41:45 +0800 Message-ID: <1577799707-11855-4-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-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 Q29ycmVjdCBjYXNlcyBmb3IgUElOX0NPTkZJR19TTEVXX1JBVEUsIFBJTl9DT05GSUdfSU5QVVRf U0NITUlUVF9FTkFCTEUsDQphbmQgUElOX0NPTkZJR19PVVRQVVRfRU5BQkxFIC0NClVzZSB2YXJp YWJsZSByZXQgdG8gcmVjZWl2ZSB2YWx1ZSBpbiBtdGtfaHdfZ2V0X3ZhbHV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