Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/mediatek: Separate mtk_hdmi_phy to an independent module

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 <ck.hu@mediatek.com>
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Tested-by: Frank Wunderlich <frank-w@public-files.de>

authored by

CK Hu and committed by
Chun-Kuang Hu
a481bf2f 96f51a4d

+17 -8
+8 -1
drivers/gpu/drm/mediatek/Kconfig
··· 24 24 tristate "DRM HDMI Support for Mediatek SoCs" 25 25 depends on DRM_MEDIATEK 26 26 select SND_SOC_HDMI_CODEC if SND_SOC 27 - select GENERIC_PHY 27 + select PHY_MTK_HDMI 28 28 help 29 29 DRM/KMS HDMI driver for Mediatek SoCs 30 + 31 + config PHY_MTK_HDMI 32 + tristate "MediaTek HDMI-PHY Driver" 33 + depends on ARCH_MEDIATEK && OF 34 + select GENERIC_PHY 35 + help 36 + Support HDMI PHY for Mediatek SoCs.
+7 -4
drivers/gpu/drm/mediatek/Makefile
··· 19 19 20 20 mediatek-drm-hdmi-objs := mtk_cec.o \ 21 21 mtk_hdmi.o \ 22 - mtk_hdmi_ddc.o \ 23 - mtk_mt2701_hdmi_phy.o \ 24 - mtk_mt8173_hdmi_phy.o \ 25 - mtk_hdmi_phy.o 22 + mtk_hdmi_ddc.o 26 23 27 24 obj-$(CONFIG_DRM_MEDIATEK_HDMI) += mediatek-drm-hdmi.o 25 + 26 + phy-mtk-hdmi-drv-objs := mtk_hdmi_phy.o \ 27 + mtk_mt2701_hdmi_phy.o \ 28 + mtk_mt8173_hdmi_phy.o 29 + 30 + obj-$(CONFIG_PHY_MTK_HDMI) += phy-mtk-hdmi-drv.o
+1 -1
drivers/gpu/drm/mediatek/mtk_hdmi.c
··· 12 12 #include <linux/io.h> 13 13 #include <linux/kernel.h> 14 14 #include <linux/mfd/syscon.h> 15 + #include <linux/module.h> 15 16 #include <linux/mutex.h> 16 17 #include <linux/of_platform.h> 17 18 #include <linux/of.h> ··· 1833 1832 }; 1834 1833 1835 1834 static struct platform_driver * const mtk_hdmi_drivers[] = { 1836 - &mtk_hdmi_phy_driver, 1837 1835 &mtk_hdmi_ddc_driver, 1838 1836 &mtk_cec_driver, 1839 1837 &mtk_hdmi_driver,
-1
drivers/gpu/drm/mediatek/mtk_hdmi.h
··· 5 5 */ 6 6 #ifndef _MTK_HDMI_CTRL_H 7 7 #define _MTK_HDMI_CTRL_H 8 - #include "mtk_hdmi_phy.h" 9 8 10 9 struct platform_driver; 11 10
+1
drivers/gpu/drm/mediatek/mtk_hdmi_phy.c
··· 205 205 .of_match_table = mtk_hdmi_phy_match, 206 206 }, 207 207 }; 208 + module_platform_driver(mtk_hdmi_phy_driver); 208 209 209 210 MODULE_DESCRIPTION("MediaTek HDMI PHY Driver"); 210 211 MODULE_LICENSE("GPL v2");
-1
drivers/gpu/drm/mediatek/mtk_hdmi_phy.h
··· 49 49 u32 val, u32 mask); 50 50 struct mtk_hdmi_phy *to_mtk_hdmi_phy(struct clk_hw *hw); 51 51 52 - extern struct platform_driver mtk_hdmi_phy_driver; 53 52 extern struct mtk_hdmi_phy_conf mtk_hdmi_phy_8173_conf; 54 53 extern struct mtk_hdmi_phy_conf mtk_hdmi_phy_2701_conf; 55 54