diff options
author | Shengjiu Wang <shengjiu.wang@nxp.com> | 2018-05-22 15:31:49 +0800 |
---|---|---|
committer | Leonard Crestez <leonard.crestez@nxp.com> | 2018-08-24 12:41:33 +0300 |
commit | 777ace03204b02fd120e4dab3091e1b52f4eddd0 (patch) | |
tree | e2451e091029c8dc8bee8b0f02c0e4fde19c5492 /drivers/media/platform/imx8 | |
parent | 719385140d241835e349873c3a1e4618565a0679 (diff) |
MLK-18368-5: hdmi_rx: add hdmi rx audio clock
add clock for hdmi audio rx
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Diffstat (limited to 'drivers/media/platform/imx8')
-rw-r--r-- | drivers/media/platform/imx8/hdmi/mxc-hdmi-rx.c | 14 | ||||
-rw-r--r-- | drivers/media/platform/imx8/hdmi/mxc-hdmi-rx.h | 1 |
2 files changed, 15 insertions, 0 deletions
diff --git a/drivers/media/platform/imx8/hdmi/mxc-hdmi-rx.c b/drivers/media/platform/imx8/hdmi/mxc-hdmi-rx.c index 0ab1308dc629..92acd0ee2ebd 100644 --- a/drivers/media/platform/imx8/hdmi/mxc-hdmi-rx.c +++ b/drivers/media/platform/imx8/hdmi/mxc-hdmi-rx.c @@ -156,6 +156,12 @@ static int mxc_hdmi_clock_init(struct mxc_hdmi_rx_dev *hdmi_rx) return PTR_ERR(hdmi_rx->enc_clk); } + hdmi_rx->i2s_clk = devm_clk_get(dev, "i2s_clk"); + if (IS_ERR(hdmi_rx->i2s_clk)) { + dev_err(dev, "failed to get hdmi rx i2s clk\n"); + return PTR_ERR(hdmi_rx->i2s_clk); + } + hdmi_rx->spdif_clk = devm_clk_get(dev, "spdif_clk"); if (IS_ERR(hdmi_rx->spdif_clk)) { dev_err(dev, "failed to get hdmi rx spdif clk\n"); @@ -202,6 +208,13 @@ static int mxc_hdmi_clock_enable(struct mxc_hdmi_rx_dev *hdmi_rx) dev_err(dev, "%s, pre pclk error %d\n", __func__, ret); return ret; } + + ret = clk_prepare_enable(hdmi_rx->i2s_clk); + if (ret < 0) { + dev_err(dev, "%s, pre i2s_clk error %d\n", __func__, ret); + return ret; + } + ret = clk_prepare_enable(hdmi_rx->spdif_clk); if (ret < 0) { dev_err(dev, "%s, pre spdif_clk error %d\n", __func__, ret); @@ -225,6 +238,7 @@ static void mxc_hdmi_clock_disable(struct mxc_hdmi_rx_dev *hdmi_rx) clk_disable_unprepare(hdmi_rx->enc_clk); clk_disable_unprepare(hdmi_rx->sclk); clk_disable_unprepare(hdmi_rx->pclk); + clk_disable_unprepare(hdmi_rx->i2s_clk); clk_disable_unprepare(hdmi_rx->spdif_clk); clk_disable_unprepare(hdmi_rx->pxl_link_clk); } diff --git a/drivers/media/platform/imx8/hdmi/mxc-hdmi-rx.h b/drivers/media/platform/imx8/hdmi/mxc-hdmi-rx.h index 85baaffeeab4..5c892d18161c 100644 --- a/drivers/media/platform/imx8/hdmi/mxc-hdmi-rx.h +++ b/drivers/media/platform/imx8/hdmi/mxc-hdmi-rx.h @@ -101,6 +101,7 @@ struct mxc_hdmi_rx_dev { struct clk *ref_clk; struct clk *pxl_clk; struct clk *enc_clk; + struct clk *i2s_clk; struct clk *spdif_clk; struct clk *pxl_link_clk; struct hdp_mem mem; |