Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3449350pxb; Mon, 16 Nov 2020 15:16:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJxzMfb6sltapOH39Ez/Kd9vHTWI+Jm6vbxLEO9BY2ZvWzQTzg0rr7QJ4zux5xxDlnnyNtw0 X-Received: by 2002:a17:906:1a0c:: with SMTP id i12mr16509496ejf.176.1605568619619; Mon, 16 Nov 2020 15:16:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605568619; cv=none; d=google.com; s=arc-20160816; b=Bpxeq7W3+Jghi4hJGw9/2RdUbbaklUz/ETw3O6bazTy/CbGhje4SgVMJk1Xg/QMBUV m3pzRxvNwBvzt43cZO+KEzp262lnO3JKEfj7U1SKzIVn9swdzsHu+ZMx4ZCgGsUYMFnB IUSPM+/MJti4CXCIRd8/mQzCBXrvYFbAkzVoe1zZz572kFyvIx/ohMJ25L1vreA+j2Fo 7nNqmggiiotCTBcNK3pOTtn8sgkFD40myM0aHS+ueqh8s7m9u5zQVR+fxQzuBudBB9Sz L3tDMvIVJRu+ZLQ6vFZ0wn1Vr6yiToCW8WzJoz3FmzFk/KTodjwgq0cIUlj09WSq4A66 yIJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=HbPis/9slDr/083kimCT/4PWOyB31LMeu8UQRRxnGsg=; b=L3pGPgzraGHdRVSrDKHxq1e+z/VrfplAPK2cw2X00Ixxrj7FwLG4RIMbm7/+ykewC9 AkLLdUjWgOn/SXE8p6r9y9ITf/fVChQFdAmfzwibJzMPvD4rZrlRptSIyk0uOgYGn0m2 FXZzWODyqRy+yWxsFSbmsj8N0zGLBz6iRweOesU/snK3lOFQFb+7zWXoQkSCBlD3SELc HMEmfc3DXuMd0crAMSe4e2wbhRB1GysYEctDE0bPXHJ/P9V7h0yEcacIh0VnmWoRTaeX sB/EuqMhuTVBuoi3OHOaajyhwYi7Yt1fVjLS6w/esBRm2fBZdLZ1yx5OvrhhmCWL9rxD HkjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=DqYM+dWG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jz19si1708979ejb.238.2020.11.16.15.16.36; Mon, 16 Nov 2020 15:16:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=DqYM+dWG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729660AbgKPXOb (ORCPT + 99 others); Mon, 16 Nov 2020 18:14:31 -0500 Received: from mail.kernel.org ([198.145.29.99]:35986 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727173AbgKPXOb (ORCPT ); Mon, 16 Nov 2020 18:14:31 -0500 Received: from DESKTOP-GFFITBK.localdomain (218-161-90-76.HINET-IP.hinet.net [218.161.90.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 28CEE23A32; Mon, 16 Nov 2020 23:14:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605568470; bh=eUg16iMbYyzUK83g3LNvHzG2VMMUY4pbe/Vx5Nm9z/I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DqYM+dWGiX2wOXr0iXF+kZLb23r7xuY6IPXTN7DfPvX7LAhhpAx6+RfjGNSBr8Exo rub1GolRoVCiz/bXUAbXzX63cn51+t3JEsdR4q6H4y8olqjSho2dwdM6dtT9/XuILh 1/TcrogctE9f5+dIt3xvL8Q0JGfoOqODZeoRIx/8= From: Chun-Kuang Hu To: Philipp Zabel , David Airlie , Daniel Vetter , Matthias Brugger , Vinod Koul , Chunfeng Yun , Kishon Vijay Abraham I Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, Chun-Kuang Hu Subject: [RESEND PATCH 1/3] drm/mediatek: Separate mtk_mipi_tx to an independent module Date: Tue, 17 Nov 2020 07:14:05 +0800 Message-Id: <20201116231407.94-2-chunkuang.hu@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201116231407.94-1-chunkuang.hu@kernel.org> References: <20201116231407.94-1-chunkuang.hu@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org mtk_mipi_tx is a part of mtk_drm module, but phy driver should be an independent module rather than be part of drm module, so separate the phy driver to an independent module. Signed-off-by: Chun-Kuang Hu --- drivers/gpu/drm/mediatek/Kconfig | 8 ++++++++ drivers/gpu/drm/mediatek/Makefile | 9 ++++++--- drivers/gpu/drm/mediatek/mtk_drm_drv.c | 1 - drivers/gpu/drm/mediatek/mtk_drm_drv.h | 1 - drivers/gpu/drm/mediatek/mtk_mipi_tx.c | 3 +++ 5 files changed, 17 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/mediatek/Kconfig b/drivers/gpu/drm/mediatek/Kconfig index 65cd03a4be29..24c4890a6e65 100644 --- a/drivers/gpu/drm/mediatek/Kconfig +++ b/drivers/gpu/drm/mediatek/Kconfig @@ -13,6 +13,7 @@ config DRM_MEDIATEK select DRM_PANEL select MEMORY select MTK_SMI + select PHY_MTK_MIPI_DSI select VIDEOMODE_HELPERS help Choose this option if you have a Mediatek SoCs. @@ -27,3 +28,10 @@ config DRM_MEDIATEK_HDMI select PHY_MTK_HDMI help DRM/KMS HDMI driver for Mediatek SoCs + +config PHY_MTK_MIPI_DSI + tristate "Mediatek MIPI-DSI-PHY Driver" + depends on ARCH_MEDIATEK && OF + select GENERIC_PHY + help + Support MIPI DSI PHY for Mediatek SoCs. diff --git a/drivers/gpu/drm/mediatek/Makefile b/drivers/gpu/drm/mediatek/Makefile index 77b0fd86063d..baa188000543 100644 --- a/drivers/gpu/drm/mediatek/Makefile +++ b/drivers/gpu/drm/mediatek/Makefile @@ -10,9 +10,6 @@ mediatek-drm-y := mtk_disp_color.o \ mtk_drm_gem.o \ mtk_drm_plane.o \ mtk_dsi.o \ - mtk_mipi_tx.o \ - mtk_mt8173_mipi_tx.o \ - mtk_mt8183_mipi_tx.o \ mtk_dpi.o obj-$(CONFIG_DRM_MEDIATEK) += mediatek-drm.o @@ -22,3 +19,9 @@ mediatek-drm-hdmi-objs := mtk_cec.o \ mtk_hdmi_ddc.o obj-$(CONFIG_DRM_MEDIATEK_HDMI) += mediatek-drm-hdmi.o + +phy-mtk-mipi-dsi-drv-objs := mtk_mipi_tx.o \ + mtk_mt8173_mipi_tx.o \ + mtk_mt8183_mipi_tx.o + +obj-$(CONFIG_PHY_MTK_MIPI_DSI) += phy-mtk-mipi-dsi-drv.o diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.c b/drivers/gpu/drm/mediatek/mtk_drm_drv.c index 59c85c63b7cc..bad75c5be090 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_drv.c +++ b/drivers/gpu/drm/mediatek/mtk_drm_drv.c @@ -636,7 +636,6 @@ static struct platform_driver * const mtk_drm_drivers[] = { &mtk_disp_rdma_driver, &mtk_dpi_driver, &mtk_drm_platform_driver, - &mtk_mipi_tx_driver, &mtk_dsi_driver, }; diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.h b/drivers/gpu/drm/mediatek/mtk_drm_drv.h index b5be63e53176..6ff98a68444b 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_drv.h +++ b/drivers/gpu/drm/mediatek/mtk_drm_drv.h @@ -54,6 +54,5 @@ extern struct platform_driver mtk_disp_ovl_driver; extern struct platform_driver mtk_disp_rdma_driver; extern struct platform_driver mtk_dpi_driver; extern struct platform_driver mtk_dsi_driver; -extern struct platform_driver mtk_mipi_tx_driver; #endif /* MTK_DRM_DRV_H */ diff --git a/drivers/gpu/drm/mediatek/mtk_mipi_tx.c b/drivers/gpu/drm/mediatek/mtk_mipi_tx.c index 8cee2591e728..f2a892e16c27 100644 --- a/drivers/gpu/drm/mediatek/mtk_mipi_tx.c +++ b/drivers/gpu/drm/mediatek/mtk_mipi_tx.c @@ -242,4 +242,7 @@ struct platform_driver mtk_mipi_tx_driver = { .of_match_table = mtk_mipi_tx_match, }, }; +module_platform_driver(mtk_mipi_tx_driver); +MODULE_DESCRIPTION("MediaTek MIPI TX Driver"); +MODULE_LICENSE("GPL v2"); -- 2.17.1