Message ID | 20220103153055.50473-3-angelogioacchino.delregno@collabora.com |
---|---|
State | Changes Requested |
Headers | show |
Series | [1/4] phy: mediatek: phy-mtk-hdmi: Switch to regmap for mmio access | expand |
On Mon, 2022-01-03 at 16:30 +0100, AngeloGioacchino Del Regno wrote: > All the headers for phy-mtk-{hdmi,hdmi-mt2701,hdmi-mt8183}.c were > included from phy-mtk-mipi-dsi.h, but this isn't optimal: in order to > increase readability and sensibly reduce build times, the inclusions > should be done per-file, also avoiding to include unused headers and > should not be implicit. > > For this reason, move the inclusions to each file and remove unused > ones. > > Signed-off-by: AngeloGioacchino Del Regno < > angelogioacchino.delregno@collabora.com> > --- > drivers/phy/mediatek/phy-mtk-hdmi-mt2701.c | 5 +++++ > drivers/phy/mediatek/phy-mtk-hdmi-mt8173.c | 5 +++++ > drivers/phy/mediatek/phy-mtk-hdmi.c | 8 ++++++++ > drivers/phy/mediatek/phy-mtk-hdmi.h | 10 +--------- > 4 files changed, 19 insertions(+), 9 deletions(-) > > diff --git a/drivers/phy/mediatek/phy-mtk-hdmi-mt2701.c > b/drivers/phy/mediatek/phy-mtk-hdmi-mt2701.c > index 09e0dd7499d8..270c5f538483 100644 > --- a/drivers/phy/mediatek/phy-mtk-hdmi-mt2701.c > +++ b/drivers/phy/mediatek/phy-mtk-hdmi-mt2701.c > @@ -4,6 +4,11 @@ > * Author: Chunhui Dai <chunhui.dai@mediatek.com> > */ > > +#include <linux/clk-provider.h> > +#include <linux/delay.h> > +#include <linux/device.h> > +#include <linux/module.h> > +#include <linux/regmap.h> > #include "phy-mtk-hdmi.h" > > #define HDMI_CON0 0x00 > diff --git a/drivers/phy/mediatek/phy-mtk-hdmi-mt8173.c > b/drivers/phy/mediatek/phy-mtk-hdmi-mt8173.c > index e317bf4a9db9..87ba9a3687b7 100644 > --- a/drivers/phy/mediatek/phy-mtk-hdmi-mt8173.c > +++ b/drivers/phy/mediatek/phy-mtk-hdmi-mt8173.c > @@ -4,6 +4,11 @@ > * Author: Jie Qiu <jie.qiu@mediatek.com> > */ > > +#include <linux/clk-provider.h> > +#include <linux/delay.h> > +#include <linux/device.h> > +#include <linux/module.h> > +#include <linux/regmap.h> > #include "phy-mtk-hdmi.h" > > #define HDMI_CON0 0x00 > diff --git a/drivers/phy/mediatek/phy-mtk-hdmi.c > b/drivers/phy/mediatek/phy-mtk-hdmi.c > index b4193cb4e4e3..e037fa89696c 100644 > --- a/drivers/phy/mediatek/phy-mtk-hdmi.c > +++ b/drivers/phy/mediatek/phy-mtk-hdmi.c > @@ -4,6 +4,14 @@ > * Author: Jie Qiu <jie.qiu@mediatek.com> > */ > > +#include <linux/clk.h> > +#include <linux/clk-provider.h> > +#include <linux/device.h> > +#include <linux/module.h> > +#include <linux/of_device.h> > +#include <linux/platform_device.h> > +#include <linux/regmap.h> > +#include <linux/phy/phy.h> > #include "phy-mtk-hdmi.h" > > inline struct mtk_hdmi_phy *to_mtk_hdmi_phy(struct clk_hw *hw) > diff --git a/drivers/phy/mediatek/phy-mtk-hdmi.h > b/drivers/phy/mediatek/phy-mtk-hdmi.h > index a0571271d730..ef81e44a235d 100644 > --- a/drivers/phy/mediatek/phy-mtk-hdmi.h > +++ b/drivers/phy/mediatek/phy-mtk-hdmi.h > @@ -6,17 +6,9 @@ > > #ifndef _MTK_HDMI_PHY_H > #define _MTK_HDMI_PHY_H > -#include <linux/clk.h> > + > #include <linux/clk-provider.h> > -#include <linux/delay.h> > -#include <linux/io.h> > -#include <linux/mfd/syscon.h> > -#include <linux/module.h> > -#include <linux/of_device.h> > -#include <linux/phy/phy.h> > -#include <linux/platform_device.h> > #include <linux/regmap.h> > -#include <linux/types.h> Please do not move common headers also into .c files > > struct mtk_hdmi_phy; >
diff --git a/drivers/phy/mediatek/phy-mtk-hdmi-mt2701.c b/drivers/phy/mediatek/phy-mtk-hdmi-mt2701.c index 09e0dd7499d8..270c5f538483 100644 --- a/drivers/phy/mediatek/phy-mtk-hdmi-mt2701.c +++ b/drivers/phy/mediatek/phy-mtk-hdmi-mt2701.c @@ -4,6 +4,11 @@ * Author: Chunhui Dai <chunhui.dai@mediatek.com> */ +#include <linux/clk-provider.h> +#include <linux/delay.h> +#include <linux/device.h> +#include <linux/module.h> +#include <linux/regmap.h> #include "phy-mtk-hdmi.h" #define HDMI_CON0 0x00 diff --git a/drivers/phy/mediatek/phy-mtk-hdmi-mt8173.c b/drivers/phy/mediatek/phy-mtk-hdmi-mt8173.c index e317bf4a9db9..87ba9a3687b7 100644 --- a/drivers/phy/mediatek/phy-mtk-hdmi-mt8173.c +++ b/drivers/phy/mediatek/phy-mtk-hdmi-mt8173.c @@ -4,6 +4,11 @@ * Author: Jie Qiu <jie.qiu@mediatek.com> */ +#include <linux/clk-provider.h> +#include <linux/delay.h> +#include <linux/device.h> +#include <linux/module.h> +#include <linux/regmap.h> #include "phy-mtk-hdmi.h" #define HDMI_CON0 0x00 diff --git a/drivers/phy/mediatek/phy-mtk-hdmi.c b/drivers/phy/mediatek/phy-mtk-hdmi.c index b4193cb4e4e3..e037fa89696c 100644 --- a/drivers/phy/mediatek/phy-mtk-hdmi.c +++ b/drivers/phy/mediatek/phy-mtk-hdmi.c @@ -4,6 +4,14 @@ * Author: Jie Qiu <jie.qiu@mediatek.com> */ +#include <linux/clk.h> +#include <linux/clk-provider.h> +#include <linux/device.h> +#include <linux/module.h> +#include <linux/of_device.h> +#include <linux/platform_device.h> +#include <linux/regmap.h> +#include <linux/phy/phy.h> #include "phy-mtk-hdmi.h" inline struct mtk_hdmi_phy *to_mtk_hdmi_phy(struct clk_hw *hw) diff --git a/drivers/phy/mediatek/phy-mtk-hdmi.h b/drivers/phy/mediatek/phy-mtk-hdmi.h index a0571271d730..ef81e44a235d 100644 --- a/drivers/phy/mediatek/phy-mtk-hdmi.h +++ b/drivers/phy/mediatek/phy-mtk-hdmi.h @@ -6,17 +6,9 @@ #ifndef _MTK_HDMI_PHY_H #define _MTK_HDMI_PHY_H -#include <linux/clk.h> + #include <linux/clk-provider.h> -#include <linux/delay.h> -#include <linux/io.h> -#include <linux/mfd/syscon.h> -#include <linux/module.h> -#include <linux/of_device.h> -#include <linux/phy/phy.h> -#include <linux/platform_device.h> #include <linux/regmap.h> -#include <linux/types.h> struct mtk_hdmi_phy;
All the headers for phy-mtk-{hdmi,hdmi-mt2701,hdmi-mt8183}.c were included from phy-mtk-mipi-dsi.h, but this isn't optimal: in order to increase readability and sensibly reduce build times, the inclusions should be done per-file, also avoiding to include unused headers and should not be implicit. For this reason, move the inclusions to each file and remove unused ones. Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> --- drivers/phy/mediatek/phy-mtk-hdmi-mt2701.c | 5 +++++ drivers/phy/mediatek/phy-mtk-hdmi-mt8173.c | 5 +++++ drivers/phy/mediatek/phy-mtk-hdmi.c | 8 ++++++++ drivers/phy/mediatek/phy-mtk-hdmi.h | 10 +--------- 4 files changed, 19 insertions(+), 9 deletions(-)