Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp15320934ybl; Tue, 31 Dec 2019 05:43:25 -0800 (PST) X-Google-Smtp-Source: APXvYqxLrG9HidyF7YHrOv7H7LUvkyCRj9/x3S0A8NzJ05J3TgLm63Xd3PjXZF7j+UucVPgFjDpa X-Received: by 2002:a9d:65cf:: with SMTP id z15mr83069898oth.238.1577799805220; Tue, 31 Dec 2019 05:43:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577799805; cv=none; d=google.com; s=arc-20160816; b=R60kKio6GnVgW1iM8+/DuHuzOlLSU55Ra5l7hQa/6Ec61YnDA1Zs0XZ3wBrTYB265C NY7WOTaZmt1KRfiQ4sIOLQ+x927BIeKxJxHJ/Fsn8zeeYL3qZPs8mynowe9bSlMSU/Yg oQize+pSrFs+dn+DNJodElcPt0kbYTzzxyCV2qOXeN3qKTxCxie8vfcQbcLaXCsI2h3N vYfu1HllUwMaL/438sLzg00YDrDS5OOeN9v2y7W+pl87fbOEJMEZ61I6ef3jZ280FOnK IyY0QQ9Qbnmg9t96o5tP9WBZC3DsgcglsCRETVGAtH2KJk32/Y2tbHdJFvKjUIJfLYtl s+MA== 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=ovw/5L5KUQvwakahmzrRWt8hUz9TgXmkAjJh/XPVrVM=; b=Rd1NpWS0hPJbBayr/wRW6Xwy8R10fwpK7yfZIO2wIOSsLENeCVcEZVmxuyKJNMro/U LlLcXNlJu9i53VgxN1qfgFQdkV7dc4jaVzgicSCxJCTKvkcRCgMuMGvQ4N8xPIAcdR95 udbg8UMqmwaECOPCjQ+rQPer4IowWiSVSkgOjRmt7eZHNB9OLZSXi/CHst8l6h4TQiuI npzVpWrWSY+SlohnOnD/G3t73lF3Xdct+S7h4kOrLr+VwblX4bl6DpvTQ+VV/EJin+oT QeXh5CtRCDSVqh1UepuRxZpqyd7c2nj6iDsicrNL+epb/BhLLfKJsTVda+V72moKPhs8 BS6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=soW4+Uj8; 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 c17si23167491otj.79.2019.12.31.05.43.13; Tue, 31 Dec 2019 05:43:25 -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=soW4+Uj8; 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 S1727169AbfLaNmM (ORCPT + 99 others); Tue, 31 Dec 2019 08:42:12 -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 S1726229AbfLaNmI (ORCPT ); Tue, 31 Dec 2019 08:42:08 -0500 X-UUID: a80561bb7126440187103987c8fdc717-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=ovw/5L5KUQvwakahmzrRWt8hUz9TgXmkAjJh/XPVrVM=; b=soW4+Uj8I1FWOJRq0kmrRPnsZRCe4bJXWSyjsMuIZ3XMSXH3TUfqWQmExUXhXT4pc26jXBhMCnZTyoOV+pqvW3eLaALKc/oSD0ab3FT4kbhFsRy9aKyEhR8gAb4bbVq6QwDCs5PrSBvSerCzLQwTZOqyiCrs/Q6oCrq2QHTNZg4=; X-UUID: a80561bb7126440187103987c8fdc717-20191231 Received: from mtkcas06.mediatek.inc [(172.21.101.30)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 1040652905; Tue, 31 Dec 2019 21:41:56 +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; 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:16 +0800 From: Light Hsieh To: CC: , , , , , Light Hsieh Subject: [PATCH v7 3/6] Refine mtk_pinconf_get() and mtk_pinconf_set() Date: Tue, 31 Dec 2019 21:41:44 +0800 Message-ID: <1577799707-11855-3-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: 9B17271DB44F190F0E9A6C723FA3F82DCD008452B17672C2812E0902A310BE242000: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 MS5SZWZpbmUgbXRrX3BpbmNvbmZfZ2V0KCk6DQogIFVzZSBvbmx5IG9uZSBvY2N1cnJlbmNlIG9m IHJldHVybiBhdCBlbmQgb2YgdGhpcyBmdW5jdGlvbi4NCg0KMi5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