From: Hoegeun Kwon Date: Wed, 21 Jun 2023 06:47:35 +0000 (+0900) Subject: drm/verisilicon: hdmi: Add audio_init feature X-Git-Tag: accepted/tizen/unified/riscv/20230725.071352~23 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3c6514a949cc0c855c802a9bd77c2b0878c03404;p=platform%2Fkernel%2Flinux-starfive.git drm/verisilicon: hdmi: Add audio_init feature Add hdmi_audio_init to use audio in hdmi driver. Change-Id: If878ee4ee4a1665d91a34ef4f5c5f6d2ab60840e Signed-off-by: Hoegeun Kwon --- diff --git a/drivers/gpu/drm/verisilicon/starfive_hdmi.c b/drivers/gpu/drm/verisilicon/starfive_hdmi.c index 720e06f..ccd307b 100644 --- a/drivers/gpu/drm/verisilicon/starfive_hdmi.c +++ b/drivers/gpu/drm/verisilicon/starfive_hdmi.c @@ -852,6 +852,10 @@ static int starfive_hdmi_bind(struct device *dev, struct device *master, if (ret < 0) goto err_cleanup_hdmi; + ret = starfive_hdmi_audio_init(hdmi); + if (ret) + dev_err(dev, "failed to audio init\n"); + pm_runtime_use_autosuspend(&pdev->dev); pm_runtime_set_autosuspend_delay(&pdev->dev, 500); pm_runtime_enable(&pdev->dev); diff --git a/drivers/gpu/drm/verisilicon/starfive_hdmi.h b/drivers/gpu/drm/verisilicon/starfive_hdmi.h index d151c61..28c0747 100644 --- a/drivers/gpu/drm/verisilicon/starfive_hdmi.h +++ b/drivers/gpu/drm/verisilicon/starfive_hdmi.h @@ -293,4 +293,10 @@ struct starfive_hdmi { const struct post_pll_config *post_cfg; }; +int starfive_hdmi_audio_init(struct starfive_hdmi *hdmi); +inline u8 hdmi_readb(struct starfive_hdmi *hdmi, u16 offset); +inline void hdmi_writeb(struct starfive_hdmi *hdmi, u16 offset, u32 val); +inline void hdmi_modb(struct starfive_hdmi *hdmi, u16 offset, + u32 msk, u32 val); + #endif /* __STARFIVE_HDMI_H__ */