diff options
author | Shengjiu Wang <shengjiu.wang@nxp.com> | 2020-08-31 14:50:29 +0800 |
---|---|---|
committer | Shengjiu Wang <shengjiu.wang@nxp.com> | 2020-08-31 18:08:17 +0800 |
commit | b44c92d68ac76eb16084b36c1bebe560a61532db (patch) | |
tree | 4b7c194022f61297830c566d53b57c06581f1916 /include/drm | |
parent | 80fe646c11c82af72959a22a77280ab03dc7b5ba (diff) |
MLK-24611-2: drm: bridge: cdns: Add callback function for plug/unplug event
cdns-hdmi-core exports a function cdns_hdmi_set_plugged_cb so
platform device can register the callback
implement hook_plugged_cb to register callback function for hdmi cable
plug/unplug event.
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Sandor Yu <Sandor.yu@nxp.com>
Diffstat (limited to 'include/drm')
-rwxr-xr-x | include/drm/bridge/cdns-mhdp.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/drm/bridge/cdns-mhdp.h b/include/drm/bridge/cdns-mhdp.h index 1f8fd024cdfa..6bfd82a3d9a2 100755 --- a/include/drm/bridge/cdns-mhdp.h +++ b/include/drm/bridge/cdns-mhdp.h @@ -22,6 +22,7 @@ #include <drm/drm_dp_mst_helper.h> #include <media/cec.h> #include <linux/bitops.h> +#include <sound/hdmi-codec.h> #define ADDR_IMEM 0x10000 #define ADDR_DMEM 0x20000 @@ -714,6 +715,9 @@ struct cdns_mhdp_device { }; const struct cdns_plat_data *plat_data; + hdmi_codec_plugged_cb plugged_cb; + struct device *codec_dev; + enum drm_connector_status last_connector_result; }; u32 cdns_mhdp_bus_read(struct cdns_mhdp_device *mhdp, u32 offset); @@ -796,6 +800,8 @@ void cdns_dp_remove(struct platform_device *pdev); void cdns_dp_unbind(struct device *dev); int cdns_dp_bind(struct platform_device *pdev, struct drm_encoder *encoder, struct cdns_mhdp_device *mhdp); +int cdns_hdmi_set_plugged_cb(struct cdns_mhdp_device *mhdp, hdmi_codec_plugged_cb fn, + struct device *codec_dev); /* CEC */ #ifdef CONFIG_DRM_CDNS_HDMI_CEC |