[PATCH v2 2/2] phy: freescale: add Samsung HDMI PHY
Marco Felsch
m.felsch at pengutronix.de
Fri Dec 16 01:15:42 PST 2022
Hi Lucas,
thanks for this series, one comment please see below.
On 22-12-15, Lucas Stach wrote:
> This adds the driver for the Samsung HDMI PHY found on the
> i.MX8MP SoC. Based on downstream implementation from
> Sandor Yu <Sandor.yu at nxp.com>.
>
> Co-developed-by: Marco Felsch <m.felsch at pengutronix.de>
> Signed-off-by: Marco Felsch <m.felsch at pengutronix.de>
> Signed-off-by: Lucas Stach <l.stach at pengutronix.de>
> ---
> v2: use DEFINE_RUNTIME_DEV_PM_OPS
> ---
> drivers/phy/freescale/Kconfig | 6 +
> drivers/phy/freescale/Makefile | 1 +
> drivers/phy/freescale/phy-fsl-samsung-hdmi.c | 694 +++++++++++++++++++
> 3 files changed, 701 insertions(+)
> create mode 100644 drivers/phy/freescale/phy-fsl-samsung-hdmi.c
...
> +static int fsl_samsung_hdmi_phy_suspend(struct device *dev)
> +{
> + struct fsl_samsung_hdmi_phy *phy = dev_get_drvdata(dev);
> +
> + clk_disable_unprepare(phy->apbclk);
> +
> + return 0;
> +}
> +
> +static int fsl_samsung_hdmi_phy_resume(struct device *dev)
> +{
> + struct fsl_samsung_hdmi_phy *phy = dev_get_drvdata(dev);
> + int ret = 0;
> +
> + ret = clk_prepare_enable(phy->apbclk);
> + if (ret) {
> + dev_err(phy->dev, "failed to enable apbclk\n");
> + return ret;
> + }
> +
> + if (phy->cur_cfg)
> + ret = fsl_samsung_hdmi_phy_configure(phy, phy->cur_cfg);
> +
> + return ret;
> +
> +}
> +
> +DEFINE_RUNTIME_DEV_PM_OPS(fsl_samsung_hdmi_phy_pm_ops,
> + fsl_samsung_hdmi_phy_suspend,
> + fsl_samsung_hdmi_phy_resume, NULL);
This must be 'static DEFINE_RUNTIME_DEV_PM_OPS()' since the define don't
add this for you.
Regards,
Marco
More information about the linux-phy
mailing list