aboutsummaryrefslogtreecommitdiffstats
path: root/include/drm
diff options
context:
space:
mode:
authorCheng-Yi Chiang <cychiang@chromium.org>2019-10-28 15:19:25 +0800
committerMark Brown <broonie@kernel.org>2019-10-29 12:30:22 +0000
commita9c82d63ca4819d3d03964dbf4aa427b36c5a67f (patch)
treeef071bf38c240d667b2df7eaa7e95bc6fad0448d /include/drm
parentASoC: SOF - remove the dead code (skylake/kabylake) (diff)
downloadlinux-dev-a9c82d63ca4819d3d03964dbf4aa427b36c5a67f.tar.xz
linux-dev-a9c82d63ca4819d3d03964dbf4aa427b36c5a67f.zip
drm: bridge: dw-hdmi: Report connector status using callback
Allow codec driver register callback function for plug event. The callback registration flow: dw-hdmi <--- hw-hdmi-i2s-audio <--- hdmi-codec dw-hdmi-i2s-audio implements hook_plugged_cb op so codec driver can register the callback. dw-hdmi exports a function dw_hdmi_set_plugged_cb so platform device can register the callback. When connector plug/unplug event happens, report this event using the callback. Make sure that audio and drm are using the single source of truth for connector status. Signed-off-by: Cheng-Yi Chiang <cychiang@chromium.org> Link: https://lore.kernel.org/r/20191028071930.145899-2-cychiang@chromium.org Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/drm')
-rw-r--r--include/drm/bridge/dw_hdmi.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/drm/bridge/dw_hdmi.h b/include/drm/bridge/dw_hdmi.h
index cf528c289857..9a0c8381a069 100644
--- a/include/drm/bridge/dw_hdmi.h
+++ b/include/drm/bridge/dw_hdmi.h
@@ -6,6 +6,8 @@
#ifndef __DW_HDMI__
#define __DW_HDMI__
+#include <sound/hdmi-codec.h>
+
struct drm_connector;
struct drm_display_mode;
struct drm_encoder;
@@ -154,6 +156,8 @@ void dw_hdmi_resume(struct dw_hdmi *hdmi);
void dw_hdmi_setup_rx_sense(struct dw_hdmi *hdmi, bool hpd, bool rx_sense);
+int dw_hdmi_set_plugged_cb(struct dw_hdmi *hdmi, hdmi_codec_plugged_cb fn,
+ struct device *codec_dev);
void dw_hdmi_set_sample_rate(struct dw_hdmi *hdmi, unsigned int rate);
void dw_hdmi_set_channel_count(struct dw_hdmi *hdmi, unsigned int cnt);
void dw_hdmi_set_channel_allocation(struct dw_hdmi *hdmi, unsigned int ca);