]> Git Repo - linux.git/commitdiff
drm/mediatek: Separate mtk_hdmi_phy to an independent module
authorCK Hu <[email protected]>
Fri, 10 May 2019 08:47:15 +0000 (16:47 +0800)
committerChun-Kuang Hu <[email protected]>
Sat, 5 Sep 2020 23:02:54 +0000 (07:02 +0800)
mtk_hdmi_phy is a part of mtk_hdmi 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: CK Hu <[email protected]>
Signed-off-by: Chun-Kuang Hu <[email protected]>
Tested-by: Frank Wunderlich <[email protected]>
drivers/gpu/drm/mediatek/Kconfig
drivers/gpu/drm/mediatek/Makefile
drivers/gpu/drm/mediatek/mtk_hdmi.c
drivers/gpu/drm/mediatek/mtk_hdmi.h
drivers/gpu/drm/mediatek/mtk_hdmi_phy.c
drivers/gpu/drm/mediatek/mtk_hdmi_phy.h

index aa74aac3cbccddedd4b4ac2abd267ea9c9cbff5a..6363f2c1cdbc2b229878ac4ecb7a61a3fa4d52e6 100644 (file)
@@ -24,6 +24,13 @@ config DRM_MEDIATEK_HDMI
        tristate "DRM HDMI Support for Mediatek SoCs"
        depends on DRM_MEDIATEK
        select SND_SOC_HDMI_CODEC if SND_SOC
-       select GENERIC_PHY
+       select PHY_MTK_HDMI
        help
          DRM/KMS HDMI driver for Mediatek SoCs
+
+config PHY_MTK_HDMI
+       tristate "MediaTek HDMI-PHY Driver"
+       depends on ARCH_MEDIATEK && OF
+       select GENERIC_PHY
+       help
+         Support HDMI PHY for Mediatek SoCs.
index b7a82ed5788f7d50786ea3b56582fc75407867f4..fcbef23aa6cec6daa482f3fbff0783d2e878968d 100644 (file)
@@ -19,9 +19,12 @@ obj-$(CONFIG_DRM_MEDIATEK) += mediatek-drm.o
 
 mediatek-drm-hdmi-objs := mtk_cec.o \
                          mtk_hdmi.o \
-                         mtk_hdmi_ddc.o \
-                         mtk_mt2701_hdmi_phy.o \
-                         mtk_mt8173_hdmi_phy.o \
-                         mtk_hdmi_phy.o
+                         mtk_hdmi_ddc.o
 
 obj-$(CONFIG_DRM_MEDIATEK_HDMI) += mediatek-drm-hdmi.o
+
+phy-mtk-hdmi-drv-objs := mtk_hdmi_phy.o \
+                        mtk_mt2701_hdmi_phy.o \
+                        mtk_mt8173_hdmi_phy.o
+
+obj-$(CONFIG_PHY_MTK_HDMI) += phy-mtk-hdmi-drv.o
index d44348c7ecbefa83f8f692981f0ac2283fd41625..0ed7b0b1a022aea1636aa2d5627613167e5d4cae 100644 (file)
@@ -12,6 +12,7 @@
 #include <linux/io.h>
 #include <linux/kernel.h>
 #include <linux/mfd/syscon.h>
+#include <linux/module.h>
 #include <linux/mutex.h>
 #include <linux/of_platform.h>
 #include <linux/of.h>
@@ -1832,7 +1833,6 @@ static struct platform_driver mtk_hdmi_driver = {
 };
 
 static struct platform_driver * const mtk_hdmi_drivers[] = {
-       &mtk_hdmi_phy_driver,
        &mtk_hdmi_ddc_driver,
        &mtk_cec_driver,
        &mtk_hdmi_driver,
index bb3653de6bd159172959447306e61882e392b40c..472bf141c92bb11584aa2038f1e513a500c6706e 100644 (file)
@@ -5,7 +5,6 @@
  */
 #ifndef _MTK_HDMI_CTRL_H
 #define _MTK_HDMI_CTRL_H
-#include "mtk_hdmi_phy.h"
 
 struct platform_driver;
 
index 5223498502c49228839fb993c4c2abd7ccc84a89..fe022acddbef280453fd0727dccbe06cfd33ef47 100644 (file)
@@ -205,6 +205,7 @@ struct platform_driver mtk_hdmi_phy_driver = {
                .of_match_table = mtk_hdmi_phy_match,
        },
 };
+module_platform_driver(mtk_hdmi_phy_driver);
 
 MODULE_DESCRIPTION("MediaTek HDMI PHY Driver");
 MODULE_LICENSE("GPL v2");
index fc1c2efd112843480fa1451521bf44fa38155feb..b13e1d5f8e785b888be62d4b48525de9a246dc47 100644 (file)
@@ -49,7 +49,6 @@ void mtk_hdmi_phy_mask(struct mtk_hdmi_phy *hdmi_phy, u32 offset,
                       u32 val, u32 mask);
 struct mtk_hdmi_phy *to_mtk_hdmi_phy(struct clk_hw *hw);
 
-extern struct platform_driver mtk_hdmi_phy_driver;
 extern struct mtk_hdmi_phy_conf mtk_hdmi_phy_8173_conf;
 extern struct mtk_hdmi_phy_conf mtk_hdmi_phy_2701_conf;
 
This page took 0.068415 seconds and 4 git commands to generate.