#include <drm/drm_atomic.h>
#include <drm/drm_edid.h>
#include <drm/drm_of.h>
#include <drm/drm_probe_helper.h>
#include <drm/drm_simple_kms_helper.h>
#include <linux/clk.h>
#include <linux/mfd/syscon.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include "rk3066_hdmi.h"
#include "rockchip_drm_drv.h"
#define DEFAULT_PLLA_RATE …
struct hdmi_data_info { … };
struct rk3066_hdmi_i2c { … };
struct rk3066_hdmi { … };
static struct rk3066_hdmi *encoder_to_rk3066_hdmi(struct drm_encoder *encoder)
{ … }
static struct rk3066_hdmi *connector_to_rk3066_hdmi(struct drm_connector *connector)
{ … }
static inline u8 hdmi_readb(struct rk3066_hdmi *hdmi, u16 offset)
{ … }
static inline void hdmi_writeb(struct rk3066_hdmi *hdmi, u16 offset, u32 val)
{ … }
static inline void hdmi_modb(struct rk3066_hdmi *hdmi, u16 offset,
u32 msk, u32 val)
{ … }
static void rk3066_hdmi_i2c_init(struct rk3066_hdmi *hdmi)
{ … }
static inline u8 rk3066_hdmi_get_power_mode(struct rk3066_hdmi *hdmi)
{ … }
static void rk3066_hdmi_set_power_mode(struct rk3066_hdmi *hdmi, int mode)
{ … }
static int
rk3066_hdmi_upload_frame(struct rk3066_hdmi *hdmi, int setup_rc,
union hdmi_infoframe *frame, u32 frame_index,
u32 mask, u32 disable, u32 enable)
{ … }
static int rk3066_hdmi_config_avi(struct rk3066_hdmi *hdmi,
struct drm_display_mode *mode)
{ … }
static int rk3066_hdmi_config_video_timing(struct rk3066_hdmi *hdmi,
struct drm_display_mode *mode)
{ … }
static void
rk3066_hdmi_phy_write(struct rk3066_hdmi *hdmi, u16 offset, u8 value)
{ … }
static void rk3066_hdmi_config_phy(struct rk3066_hdmi *hdmi)
{ … }
static int rk3066_hdmi_setup(struct rk3066_hdmi *hdmi,
struct drm_display_mode *mode)
{ … }
static void rk3066_hdmi_encoder_enable(struct drm_encoder *encoder,
struct drm_atomic_state *state)
{ … }
static void rk3066_hdmi_encoder_disable(struct drm_encoder *encoder,
struct drm_atomic_state *state)
{ … }
static int
rk3066_hdmi_encoder_atomic_check(struct drm_encoder *encoder,
struct drm_crtc_state *crtc_state,
struct drm_connector_state *conn_state)
{ … }
static const
struct drm_encoder_helper_funcs rk3066_hdmi_encoder_helper_funcs = …;
static enum drm_connector_status
rk3066_hdmi_connector_detect(struct drm_connector *connector, bool force)
{ … }
static int rk3066_hdmi_connector_get_modes(struct drm_connector *connector)
{ … }
static enum drm_mode_status
rk3066_hdmi_connector_mode_valid(struct drm_connector *connector,
struct drm_display_mode *mode)
{ … }
static struct drm_encoder *
rk3066_hdmi_connector_best_encoder(struct drm_connector *connector)
{ … }
static int
rk3066_hdmi_probe_single_connector_modes(struct drm_connector *connector,
uint32_t maxX, uint32_t maxY)
{ … }
static void rk3066_hdmi_connector_destroy(struct drm_connector *connector)
{ … }
static const struct drm_connector_funcs rk3066_hdmi_connector_funcs = …;
static const
struct drm_connector_helper_funcs rk3066_hdmi_connector_helper_funcs = …;
static int
rk3066_hdmi_register(struct drm_device *drm, struct rk3066_hdmi *hdmi)
{ … }
static irqreturn_t rk3066_hdmi_hardirq(int irq, void *dev_id)
{ … }
static irqreturn_t rk3066_hdmi_irq(int irq, void *dev_id)
{ … }
static int rk3066_hdmi_i2c_read(struct rk3066_hdmi *hdmi, struct i2c_msg *msgs)
{ … }
static int rk3066_hdmi_i2c_write(struct rk3066_hdmi *hdmi, struct i2c_msg *msgs)
{ … }
static int rk3066_hdmi_i2c_xfer(struct i2c_adapter *adap,
struct i2c_msg *msgs, int num)
{ … }
static u32 rk3066_hdmi_i2c_func(struct i2c_adapter *adapter)
{ … }
static const struct i2c_algorithm rk3066_hdmi_algorithm = …;
static struct i2c_adapter *rk3066_hdmi_i2c_adapter(struct rk3066_hdmi *hdmi)
{ … }
static int rk3066_hdmi_bind(struct device *dev, struct device *master,
void *data)
{ … }
static void rk3066_hdmi_unbind(struct device *dev, struct device *master,
void *data)
{ … }
static const struct component_ops rk3066_hdmi_ops = …;
static int rk3066_hdmi_probe(struct platform_device *pdev)
{ … }
static void rk3066_hdmi_remove(struct platform_device *pdev)
{ … }
static const struct of_device_id rk3066_hdmi_dt_ids[] = …;
MODULE_DEVICE_TABLE(of, rk3066_hdmi_dt_ids);
struct platform_driver rk3066_hdmi_driver = …;