Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4517730ybl; Tue, 21 Jan 2020 22:54:40 -0800 (PST) X-Google-Smtp-Source: APXvYqyZY2WNT2iLg/jtBimVpibRdFPzoJB1r7hCo82t8RySW102A8qNMB7EjDU51RVlbUNGt26a X-Received: by 2002:aca:1011:: with SMTP id 17mr5873430oiq.72.1579676080276; Tue, 21 Jan 2020 22:54:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579676080; cv=none; d=google.com; s=arc-20160816; b=RQRLKdItYx9AeekswWVaHkv2yepAC/JsZ5hGICZcD8LeWg5WFJq3Qk1VlKxINlC+zn rJv9MK0egaHG6VyssvwWdpHCciTCUXr8flRtrjWg7iryHQr61nYL6BnBg6jtozH6GhGO w3ntr5bMs1mLh8MbB1deTJw51L6TuhXk/5XekEBZ2648GfkG3H61Z/3xJNVjLjPZRpEG a9B838mS9Qipf0B4t3MusrVTJiN8IeuVYS5ToCsg+6LRmRKYLiFBZwAQ4CRH5mGT1Ip+ TeEQOR0ILXVtfyMp4xPBeinCl+W1OX/he7a9+S2PYuIs7BODvXQhdo79pxf4O9TFMFW4 E0Fg== 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=7OjjstGC5xIIjdBfkyYXXt4Wjc81fNGRpa4Ftl+Dwdw=; b=QTX+P6+9YEWJOv/+8AIhKY72cMYmgjTuHasuv2/l5+EVfX4IVcomH0jJ7ULNBmezj2 UMsCyOHaXj25kY/UdrCEO75UWA3U8SFLmLw0biKskm+xyUBbJNkIFgQGUzQeJ9ETLH0E FQXSMB0z//xsuLNqPUYFbHCMXGSoRmzTbc5dixcREqCDIGotPjkFduEMYjk/45U7t1OF Qg5hXbjvrGRMU76baN/3u5KifoiLj81cck7y7yqsz0RV6pozf6fcZRX7R5JiLw1OhVPT mnFf6r2FaZAE2fdxcgFE2pl8Dwi7P0WiI+vmXemIoRk78fUXjzy5VH5Fyt9Dgk+k7q0X T8CQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=axBQbYyH; 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 z194si20914101oia.50.2020.01.21.22.54.28; Tue, 21 Jan 2020 22:54:40 -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=axBQbYyH; 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 S1729049AbgAVGxb (ORCPT + 99 others); Wed, 22 Jan 2020 01:53:31 -0500 Received: from mailgw02.mediatek.com ([210.61.82.184]:7754 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725883AbgAVGxa (ORCPT ); Wed, 22 Jan 2020 01:53:30 -0500 X-UUID: 075dc211d6584a7ab46d399130398334-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=7OjjstGC5xIIjdBfkyYXXt4Wjc81fNGRpa4Ftl+Dwdw=; b=axBQbYyHdyALkoD0HFP/PHTCuEETLM+BlAYen1UK55C85JFIy9iIE33qY8Mq2R8hNQEXBSv5x+5ZGeaP3eJYVzvP1Vii8cN3Eyq4DzSpWzJrV8GlJh8wXw6aFY0ixpz5zYiMMBktxjYNE7U8/sMjsmQgaZycPA9k9IvDGyl51XU=; X-UUID: 075dc211d6584a7ab46d399130398334-20200122 Received: from mtkcas07.mediatek.inc [(172.21.101.84)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 1812003967; Wed, 22 Jan 2020 14:53:18 +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; Wed, 22 Jan 2020 14:51:43 +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 5/6] pinctrl: mediatek: Backward compatible to previous Mediatek's bias-pull usage Date: Wed, 22 Jan 2020 14:53:13 +0800 Message-ID: <1579675994-7001-5-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-TM-SNTS-SMTP: 251766DBEF914E5B8469C5B2B635538D4A613EB88F702CEC8F17E9D8F3BFD35E2000: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 RnJvbTogTGlnaHQgSHNpZWggPGxpZ2h0LmhzaWVoQG1lZGlhdGVrLmNvbT4NCg0KUmVmaW5lIG10 a19waW5jb25mX3NldCgpL210a19waW5jb25mX2dldCgpIGZvciBiYWNrd2FyZCBj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Zl90b19jb25maWdfcGFyYW0oKmNv bmZpZyk7DQotCWludCBlcnIsIHJlZywgcmV0ID0gMTsNCisJaW50IHB1bGx1cCwgZXJyLCByZWcs IHJldCA9IDE7DQogCWNvbnN0IHN0cnVjdCBtdGtfcGluX2Rlc2MgKmRlc2M7DQogDQogCWlmIChw aW4gPj0gaHctPnNvYy0+bnBpbnMpIHsNCkBAIC04OSwyMiArODksMzEgQEAgc3RhdGljIGludCBt dGtfcGluY29uZl9nZXQoc3RydWN0IHBpbmN0cmxfZGV2ICpwY3RsZGV2LA0KIA0KIAlzd2l0Y2gg KHBhcmFtKSB7DQogCWNhc2UgUElOX0NPTkZJR19CSUFTX0RJU0FCTEU6DQotCQlpZiAoaHctPnNv Yy0+Ymlhc19kaXNhYmxlX2dldCkNCi0JCQllcnIgPSBody0+c29jLT5iaWFzX2Rpc2FibGVfZ2V0 KGh3LCBkZXNjLCAmcmV0KTsNCi0JCWVsc2UNCi0JCQllcnIgPSAtRU5PVFNVUFA7DQotCQlicmVh azsNCiAJY2FzZSBQSU5fQ09ORklHX0JJQVNfUFVMTF9VUDoNCi0JCWlmIChody0+c29jLT5iaWFz X2dldCkNCi0JCQllcnIgPSBody0+c29jLT5iaWFzX2dldChodywgZGVzYywgMSwgJnJldCk7DQot CQllbHNlDQotCQkJZXJyID0gLUVOT1RTVVBQOw0KLQkJYnJlYWs7DQogCWNhc2UgUElOX0NPTkZJ R19CSUFTX1BVTExfRE9XTjoNCi0JCWlmIChody0+c29jLT5iaWFzX2dldCkNCi0JCQllcnIgPSBo dy0+c29jLT5iaWFzX2dldChodywgZGVzYywgMCwgJnJldCk7DQotCQllbHNlDQorCQlpZiAoaHct PnNvYy0+Ymlhc19nZXRfY29tYm8pIHsNCisJCQllcnIgPSBody0+c29jLT5iaWFzX2dldF9jb21i byhodywgZGVzYywgJnB1bGx1cCwgJnJldCk7DQorCQkJaWYgKGVycikNCisJCQkJZ290byBvdXQ7 DQorCQkJaWYgKHBhcmFtID09IFBJT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