#include <drm/exynos_drm.h>
#include <linux/clk.h>
#include <linux/component.h>
#include <linux/delay.h>
#include <linux/gpio/consumer.h>
#include <linux/hdmi.h>
#include <linux/i2c.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/irq.h>
#include <linux/kernel.h>
#include <linux/mfd/syscon.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/of_graph.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/regmap.h>
#include <linux/regulator/consumer.h>
#include <linux/wait.h>
#include <sound/hdmi-codec.h>
#include <media/cec-notifier.h>
#include <drm/drm_atomic_helper.h>
#include <drm/drm_bridge.h>
#include <drm/drm_edid.h>
#include <drm/drm_print.h>
#include <drm/drm_probe_helper.h>
#include <drm/drm_simple_kms_helper.h>
#include "exynos_drm_crtc.h"
#include "regs-hdmi.h"
#define HOTPLUG_DEBOUNCE_MS …
enum hdmi_type { … };
#define HDMI_MAPPED_BASE …
enum hdmi_mapped_regs { … };
static const u32 hdmi_reg_map[][HDMI_TYPE_COUNT] = …;
static const char * const supply[] = …;
struct hdmiphy_config { … };
struct hdmiphy_configs { … };
struct string_array_spec { … };
#define INIT_ARRAY_SPEC(a) …
struct hdmi_driver_data { … };
struct hdmi_audio { … };
struct hdmi_context { … };
static inline struct hdmi_context *encoder_to_hdmi(struct drm_encoder *e)
{ … }
static inline struct hdmi_context *connector_to_hdmi(struct drm_connector *c)
{ … }
static const struct hdmiphy_config hdmiphy_v13_configs[] = …;
static const struct hdmiphy_config hdmiphy_v14_configs[] = …;
static const struct hdmiphy_config hdmiphy_5420_configs[] = …;
static const struct hdmiphy_config hdmiphy_5433_configs[] = …;
static const char * const hdmi_clk_gates4[] = …;
static const char * const hdmi_clk_muxes4[] = …;
static const char * const hdmi_clk_gates5433[] = …;
static const char * const hdmi_clk_muxes5433[] = …;
static const struct hdmi_driver_data exynos4210_hdmi_driver_data = …;
static const struct hdmi_driver_data exynos4212_hdmi_driver_data = …;
static const struct hdmi_driver_data exynos5420_hdmi_driver_data = …;
static const struct hdmi_driver_data exynos5433_hdmi_driver_data = …;
static inline u32 hdmi_map_reg(struct hdmi_context *hdata, u32 reg_id)
{ … }
static inline u32 hdmi_reg_read(struct hdmi_context *hdata, u32 reg_id)
{ … }
static inline void hdmi_reg_writeb(struct hdmi_context *hdata,
u32 reg_id, u8 value)
{ … }
static inline void hdmi_reg_writev(struct hdmi_context *hdata, u32 reg_id,
int bytes, u32 val)
{ … }
static inline void hdmi_reg_write_buf(struct hdmi_context *hdata, u32 reg_id,
u8 *buf, int size)
{ … }
static inline void hdmi_reg_writemask(struct hdmi_context *hdata,
u32 reg_id, u32 value, u32 mask)
{ … }
static int hdmiphy_reg_write_buf(struct hdmi_context *hdata,
u32 reg_offset, const u8 *buf, u32 len)
{ … }
static int hdmi_clk_enable_gates(struct hdmi_context *hdata)
{ … }
static void hdmi_clk_disable_gates(struct hdmi_context *hdata)
{ … }
static int hdmi_clk_set_parents(struct hdmi_context *hdata, bool to_phy)
{ … }
static int hdmi_audio_infoframe_apply(struct hdmi_context *hdata)
{ … }
static void hdmi_reg_infoframes(struct hdmi_context *hdata)
{ … }
static enum drm_connector_status hdmi_detect(struct drm_connector *connector,
bool force)
{ … }
static void hdmi_connector_destroy(struct drm_connector *connector)
{ … }
static const struct drm_connector_funcs hdmi_connector_funcs = …;
static int hdmi_get_modes(struct drm_connector *connector)
{ … }
static int hdmi_find_phy_conf(struct hdmi_context *hdata, u32 pixel_clock)
{ … }
static enum drm_mode_status hdmi_mode_valid(struct drm_connector *connector,
struct drm_display_mode *mode)
{ … }
static const struct drm_connector_helper_funcs hdmi_connector_helper_funcs = …;
static int hdmi_create_connector(struct drm_encoder *encoder)
{ … }
static bool hdmi_mode_fixup(struct drm_encoder *encoder,
const struct drm_display_mode *mode,
struct drm_display_mode *adjusted_mode)
{ … }
static void hdmi_reg_acr(struct hdmi_context *hdata, u32 freq)
{ … }
static void hdmi_audio_config(struct hdmi_context *hdata)
{ … }
static void hdmi_audio_control(struct hdmi_context *hdata)
{ … }
static void hdmi_start(struct hdmi_context *hdata, bool start)
{ … }
static void hdmi_conf_init(struct hdmi_context *hdata)
{ … }
static void hdmiphy_wait_for_pll(struct hdmi_context *hdata)
{ … }
static void hdmi_v13_mode_apply(struct hdmi_context *hdata)
{ … }
static void hdmi_v14_mode_apply(struct hdmi_context *hdata)
{ … }
static void hdmi_mode_apply(struct hdmi_context *hdata)
{ … }
static void hdmiphy_conf_reset(struct hdmi_context *hdata)
{ … }
static void hdmiphy_enable_mode_set(struct hdmi_context *hdata, bool enable)
{ … }
static void hdmiphy_conf_apply(struct hdmi_context *hdata)
{ … }
static void hdmi_conf_apply(struct hdmi_context *hdata)
{ … }
static void hdmi_set_refclk(struct hdmi_context *hdata, bool on)
{ … }
static void hdmiphy_enable(struct hdmi_context *hdata)
{ … }
static void hdmiphy_disable(struct hdmi_context *hdata)
{ … }
static void hdmi_enable(struct drm_encoder *encoder)
{ … }
static void hdmi_disable(struct drm_encoder *encoder)
{ … }
static const struct drm_encoder_helper_funcs exynos_hdmi_encoder_helper_funcs = …;
static void hdmi_audio_shutdown(struct device *dev, void *data)
{ … }
static int hdmi_audio_hw_params(struct device *dev, void *data,
struct hdmi_codec_daifmt *daifmt,
struct hdmi_codec_params *params)
{ … }
static int hdmi_audio_mute(struct device *dev, void *data,
bool mute, int direction)
{ … }
static int hdmi_audio_get_eld(struct device *dev, void *data, uint8_t *buf,
size_t len)
{ … }
static const struct hdmi_codec_ops audio_codec_ops = …;
static int hdmi_register_audio_device(struct hdmi_context *hdata)
{ … }
static void hdmi_hotplug_work_func(struct work_struct *work)
{ … }
static irqreturn_t hdmi_irq_thread(int irq, void *arg)
{ … }
static int hdmi_clks_get(struct hdmi_context *hdata,
const struct string_array_spec *names,
struct clk **clks)
{ … }
static int hdmi_clk_init(struct hdmi_context *hdata)
{ … }
static void hdmiphy_clk_enable(struct exynos_drm_clk *clk, bool enable)
{ … }
static int hdmi_bridge_init(struct hdmi_context *hdata)
{ … }
static int hdmi_resources_init(struct hdmi_context *hdata)
{ … }
static const struct of_device_id hdmi_match_types[] = …;
MODULE_DEVICE_TABLE (of, hdmi_match_types);
static int hdmi_bind(struct device *dev, struct device *master, void *data)
{ … }
static void hdmi_unbind(struct device *dev, struct device *master, void *data)
{ … }
static const struct component_ops hdmi_component_ops = …;
static int hdmi_get_ddc_adapter(struct hdmi_context *hdata)
{ … }
static int hdmi_get_phy_io(struct hdmi_context *hdata)
{ … }
static int hdmi_probe(struct platform_device *pdev)
{ … }
static void hdmi_remove(struct platform_device *pdev)
{ … }
static int __maybe_unused exynos_hdmi_suspend(struct device *dev)
{ … }
static int __maybe_unused exynos_hdmi_resume(struct device *dev)
{ … }
static const struct dev_pm_ops exynos_hdmi_pm_ops = …;
struct platform_driver hdmi_driver = …;