Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp5726244imm; Mon, 27 Aug 2018 03:13:09 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdb1KinCVoJqdTNAHyDc4Ce+2B2htVNH6zyrQbXAX53lqhWSb0sEPAKWCTz0PU7ElTR/X6PL X-Received: by 2002:a63:5143:: with SMTP id r3-v6mr11805992pgl.11.1535364789702; Mon, 27 Aug 2018 03:13:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535364789; cv=none; d=google.com; s=arc-20160816; b=El/3Uh4mj38HPPXFfAr2RggyZnh7nFrYInJ8/WkGzHKuqKyBuxu5sdzSkK6PSA8UlJ mu5Z5jpsCLXfzTUdkniFYZUe+Q8E0PtlmiSOJI9FFvKVsNMajoREuHuY17uMyT7L53t9 ErHCQwEBBTGEZdu8wfnF6nqlj7PF4Okm1BEZBpo+3dJ091qVGc19mlUMD0WvV0L0/KLG xb/4c/0CkjGYnDSLJQdxdbSzlFEQ8dbkG/VLNp/74gMznfjj/lxOhlkxi30fBDyRRDD4 5euaMmM7IhkPzFkyRAEKVgr+C4T89Cdemal0LXZp77YbdT8A5AowoD+meIyrURbPyzGT xZuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:arc-authentication-results; bh=lELRLv9spacZLGWS2alk7fWG9kLWjLsJQxfO+KmxT6E=; b=gCSYrlgZJxMVuSOv8em/Co7sGyMlafnFhrU21bjhOkDbx8nD81P7DrW7J/2G8JMXxm N/XKUgt2xiFntfyzfrBnM8xgqO5oEZCuiB4vYiWtq13bBIzuXi/j/tZSS5P9iLVGv23a vZgLibtlF93ZlWNSVUn4jaxifPFnJKtixAoUecjNAAvuGcbJLr/K01F2fttT4MI5tPBw y1ihDAVb11yn5fmzbdkDF0IPiN8KGjdG4dZMKnKwFDuSLFrhfYSVbQvzykWJO8XymuaB BCKrp0VfkH71/HI1CSkHGipv525WF99LiDHuEDz8XNTdJUdEEyjXeRFCcEFYlv9Hk5H7 olBA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n7-v6si214520plk.204.2018.08.27.03.12.54; Mon, 27 Aug 2018 03:13:09 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727278AbeH0N41 (ORCPT + 99 others); Mon, 27 Aug 2018 09:56:27 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:22600 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727091AbeH0N41 (ORCPT ); Mon, 27 Aug 2018 09:56:27 -0400 X-UUID: 695a0d47516246178c98830844b68f4e-20180827 Received: from mtkexhb02.mediatek.inc [(172.21.101.103)] by mailgw02.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 1942752243; Mon, 27 Aug 2018 18:10:19 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs08n2.mediatek.inc (172.21.101.56) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Mon, 27 Aug 2018 18:10:17 +0800 Received: from mtkswgap22.mediatek.inc (172.21.77.33) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1210.3 via Frontend Transport; Mon, 27 Aug 2018 18:10:18 +0800 From: To: , CC: , , , Sean Wang Subject: [PATCH 00/16] Unify MediaTek pinctrl in preparation for MT8183 and MT6765 Date: Mon, 27 Aug 2018 18:09:59 +0800 Message-ID: X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sean Wang Irregular register arrangement and their logic access from various MediaTek SoCs being introduced already causes pinctrl-mtk-common to bloat and became really hard to maintain so that the patch creates pinctrl-mtk-common-v2 based on the core of mt7622 pinctrl to try make the register operations to be simple. The goals pinctrl-mtk-common-v2 want to achieve are to hopefully support all of MediaTek SoCs, and two kinds of dt-bindings being supported, Linux generic pinctrl dt-binding which mt762x like to support and MediaTek vendor per-pin dt-binding the other SoCs support the MT8183 and MT6765 incline to make use of. The patch starts to refactor MT7622 pinctrl driver first with splitting out these portable ways from there such as table-based register operation and the other operations in common in the both kinds of driver. Sean Wang (16): pinctrl: mediatek: add pinctrl-mtk-common-v2 for all MediaTek pinctrls pinctrl: mediatek: add pinctrl-moore that implements the generic pinctrl dt-bindings pinctrl: mediatek: extend struct mtk_pin_field_calc to pinctrl-mtk-common-v2.c pinctrl: mediatek: extend struct mtk_pin_desc to pinctrl-mtk-common-v2.c pinctrl: mediatek: extend struct mtk_pin_soc to pinctrl-mtk-common-v2.c pinctrl: mediatek: add driving strength related support to pinctrl-mtk-common-v2.c pinctrl: mediatek: add drv register support to pinctrl-mtk-common-v2.c pinctrl: mediatek: add pull related support to pinctrl-mtk-common-v2.c pinctrl: mediatek: add advanced pull related support to pinctrl-mtk-common-v2.c pinctrl: mediatek: add ies register support to pinctrl-mtk-common-v2.c pinctrl: mediatek: add pullen, pullsel register support to pinctrl-mtk-common-v2.c pinctrl: mediatek: add MT7623 pinctrl driver based on generic pinctrl binding pinctrl: mediatek: use pin descriptor all in pinctrl-mtk-common-v2.c pinctrl: mediatek: add multiple register bases support to pinctrl-mtk-common-v2.c pinctrl: mediatek: adjust error code and message when some register not supported is found pinctrl: mediatek: extend struct mtk_pin_desc which per-pin driver depends on drivers/pinctrl/mediatek/Kconfig | 25 +- drivers/pinctrl/mediatek/Makefile | 2 + drivers/pinctrl/mediatek/pinctrl-moore.c | 813 ++++++++++++ drivers/pinctrl/mediatek/pinctrl-moore.h | 57 + drivers/pinctrl/mediatek/pinctrl-mt7622.c | 1407 ++++----------------- drivers/pinctrl/mediatek/pinctrl-mt7623.c | 1441 ++++++++++++++++++++++ drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c | 510 ++++++++ drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h | 281 +++++ 8 files changed, 3345 insertions(+), 1191 deletions(-) create mode 100644 drivers/pinctrl/mediatek/pinctrl-moore.c create mode 100644 drivers/pinctrl/mediatek/pinctrl-moore.h create mode 100644 drivers/pinctrl/mediatek/pinctrl-mt7623.c create mode 100644 drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c create mode 100644 drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h -- 2.7.4