#include <linux/gpio/consumer.h>
#include <linux/i2c.h>
#include <linux/interrupt.h>
#include <linux/media-bus-format.h>
#include <linux/module.h>
#include <linux/of_graph.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/regulator/consumer.h>
#include <sound/hdmi-codec.h>
#include <drm/drm_atomic_helper.h>
#include <drm/drm_bridge.h>
#include <drm/drm_edid.h>
#include <drm/drm_mipi_dsi.h>
#include <drm/drm_of.h>
#include <drm/drm_print.h>
#include <drm/drm_probe_helper.h>
#define EDID_SEG_SIZE …
#define EDID_LEN …
#define EDID_LOOP …
#define KEY_DDC_ACCS_DONE …
#define DDC_NO_ACK …
#define LT9611_4LANES …
struct lt9611 { … };
#define LT9611_PAGE_CONTROL …
static const struct regmap_range_cfg lt9611_ranges[] = …;
static const struct regmap_config lt9611_regmap_config = …;
static struct lt9611 *bridge_to_lt9611(struct drm_bridge *bridge)
{ … }
static int lt9611_mipi_input_analog(struct lt9611 *lt9611)
{ … }
static int lt9611_mipi_input_digital(struct lt9611 *lt9611,
const struct drm_display_mode *mode)
{ … }
static void lt9611_mipi_video_setup(struct lt9611 *lt9611,
const struct drm_display_mode *mode)
{ … }
static void lt9611_pcr_setup(struct lt9611 *lt9611, const struct drm_display_mode *mode, unsigned int postdiv)
{ … }
static int lt9611_pll_setup(struct lt9611 *lt9611, const struct drm_display_mode *mode, unsigned int *postdiv)
{ … }
static int lt9611_read_video_check(struct lt9611 *lt9611, unsigned int reg)
{ … }
static int lt9611_video_check(struct lt9611 *lt9611)
{ … }
static void lt9611_hdmi_set_infoframes(struct lt9611 *lt9611,
struct drm_connector *connector,
struct drm_display_mode *mode)
{ … }
static void lt9611_hdmi_tx_digital(struct lt9611 *lt9611, bool is_hdmi)
{ … }
static void lt9611_hdmi_tx_phy(struct lt9611 *lt9611)
{ … }
static irqreturn_t lt9611_irq_thread_handler(int irq, void *dev_id)
{ … }
static void lt9611_enable_hpd_interrupts(struct lt9611 *lt9611)
{ … }
static void lt9611_sleep_setup(struct lt9611 *lt9611)
{ … }
static int lt9611_power_on(struct lt9611 *lt9611)
{ … }
static int lt9611_power_off(struct lt9611 *lt9611)
{ … }
static void lt9611_reset(struct lt9611 *lt9611)
{ … }
static void lt9611_assert_5v(struct lt9611 *lt9611)
{ … }
static int lt9611_regulator_init(struct lt9611 *lt9611)
{ … }
static int lt9611_regulator_enable(struct lt9611 *lt9611)
{ … }
static enum drm_connector_status lt9611_bridge_detect(struct drm_bridge *bridge)
{ … }
static int lt9611_read_edid(struct lt9611 *lt9611)
{ … }
static int
lt9611_get_edid_block(void *data, u8 *buf, unsigned int block, size_t len)
{ … }
static void
lt9611_bridge_atomic_enable(struct drm_bridge *bridge,
struct drm_bridge_state *old_bridge_state)
{ … }
static void
lt9611_bridge_atomic_disable(struct drm_bridge *bridge,
struct drm_bridge_state *old_bridge_state)
{ … }
static struct mipi_dsi_device *lt9611_attach_dsi(struct lt9611 *lt9611,
struct device_node *dsi_node)
{ … }
static int lt9611_bridge_attach(struct drm_bridge *bridge,
enum drm_bridge_attach_flags flags)
{ … }
static enum drm_mode_status lt9611_bridge_mode_valid(struct drm_bridge *bridge,
const struct drm_display_info *info,
const struct drm_display_mode *mode)
{ … }
static void lt9611_bridge_atomic_pre_enable(struct drm_bridge *bridge,
struct drm_bridge_state *old_bridge_state)
{ … }
static void
lt9611_bridge_atomic_post_disable(struct drm_bridge *bridge,
struct drm_bridge_state *old_bridge_state)
{ … }
static const struct drm_edid *lt9611_bridge_edid_read(struct drm_bridge *bridge,
struct drm_connector *connector)
{ … }
static void lt9611_bridge_hpd_enable(struct drm_bridge *bridge)
{ … }
#define MAX_INPUT_SEL_FORMATS …
static u32 *
lt9611_atomic_get_input_bus_fmts(struct drm_bridge *bridge,
struct drm_bridge_state *bridge_state,
struct drm_crtc_state *crtc_state,
struct drm_connector_state *conn_state,
u32 output_fmt,
unsigned int *num_input_fmts)
{ … }
static const struct drm_bridge_funcs lt9611_bridge_funcs = …;
static int lt9611_parse_dt(struct device *dev,
struct lt9611 *lt9611)
{ … }
static int lt9611_gpio_init(struct lt9611 *lt9611)
{ … }
static int lt9611_read_device_rev(struct lt9611 *lt9611)
{ … }
static int lt9611_hdmi_hw_params(struct device *dev, void *data,
struct hdmi_codec_daifmt *fmt,
struct hdmi_codec_params *hparms)
{ … }
static int lt9611_audio_startup(struct device *dev, void *data)
{ … }
static void lt9611_audio_shutdown(struct device *dev, void *data)
{ … }
static int lt9611_hdmi_i2s_get_dai_id(struct snd_soc_component *component,
struct device_node *endpoint)
{ … }
static const struct hdmi_codec_ops lt9611_codec_ops = …;
static struct hdmi_codec_pdata codec_data = …;
static int lt9611_audio_init(struct device *dev, struct lt9611 *lt9611)
{ … }
static void lt9611_audio_exit(struct lt9611 *lt9611)
{ … }
static int lt9611_probe(struct i2c_client *client)
{ … }
static void lt9611_remove(struct i2c_client *client)
{ … }
static struct i2c_device_id lt9611_id[] = …;
MODULE_DEVICE_TABLE(i2c, lt9611_id);
static const struct of_device_id lt9611_match_table[] = …;
MODULE_DEVICE_TABLE(of, lt9611_match_table);
static struct i2c_driver lt9611_driver = …;
module_i2c_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;