#include <linux/delay.h>
#include <linux/err.h>
#include <linux/gpio/consumer.h>
#include <linux/i2c.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/of_irq.h>
#include <linux/of_platform.h>
#include <linux/regmap.h>
#include <linux/regulator/consumer.h>
#include <linux/types.h>
#include <drm/display/drm_dp_helper.h>
#include <drm/drm_atomic_helper.h>
#include <drm/drm_bridge.h>
#include <drm/drm_crtc.h>
#include <drm/drm_edid.h>
#include <drm/drm_print.h>
#include <drm/drm_probe_helper.h>
#include "analogix-anx78xx.h"
#define I2C_NUM_ADDRESSES …
#define I2C_IDX_TX_P0 …
#define I2C_IDX_TX_P1 …
#define I2C_IDX_TX_P2 …
#define I2C_IDX_RX_P0 …
#define I2C_IDX_RX_P1 …
#define XTAL_CLK …
static const u8 anx7808_i2c_addresses[] = …;
static const u8 anx781x_i2c_addresses[] = …;
struct anx78xx_platform_data { … };
struct anx78xx { … };
static inline struct anx78xx *connector_to_anx78xx(struct drm_connector *c)
{ … }
static inline struct anx78xx *bridge_to_anx78xx(struct drm_bridge *bridge)
{ … }
static int anx78xx_set_bits(struct regmap *map, u8 reg, u8 mask)
{ … }
static int anx78xx_clear_bits(struct regmap *map, u8 reg, u8 mask)
{ … }
static ssize_t anx78xx_aux_transfer(struct drm_dp_aux *aux,
struct drm_dp_aux_msg *msg)
{ … }
static int anx78xx_set_hpd(struct anx78xx *anx78xx)
{ … }
static int anx78xx_clear_hpd(struct anx78xx *anx78xx)
{ … }
static const struct reg_sequence tmds_phy_initialization[] = …;
static int anx78xx_rx_initialization(struct anx78xx *anx78xx)
{ … }
static const u8 dp_tx_output_precise_tune_bits[20] = …;
static int anx78xx_link_phy_initialization(struct anx78xx *anx78xx)
{ … }
static int anx78xx_xtal_clk_sel(struct anx78xx *anx78xx)
{ … }
static const struct reg_sequence otp_key_protect[] = …;
static int anx78xx_tx_initialization(struct anx78xx *anx78xx)
{ … }
static int anx78xx_enable_interrupts(struct anx78xx *anx78xx)
{ … }
static void anx78xx_poweron(struct anx78xx *anx78xx)
{ … }
static void anx78xx_poweroff(struct anx78xx *anx78xx)
{ … }
static int anx78xx_start(struct anx78xx *anx78xx)
{ … }
static int anx78xx_init_pdata(struct anx78xx *anx78xx)
{ … }
static int anx78xx_dp_link_training(struct anx78xx *anx78xx)
{ … }
static int anx78xx_config_dp_output(struct anx78xx *anx78xx)
{ … }
static int anx78xx_send_video_infoframe(struct anx78xx *anx78xx,
struct hdmi_avi_infoframe *frame)
{ … }
static int anx78xx_get_downstream_info(struct anx78xx *anx78xx)
{ … }
static int anx78xx_get_modes(struct drm_connector *connector)
{ … }
static const struct drm_connector_helper_funcs anx78xx_connector_helper_funcs = …;
static enum drm_connector_status anx78xx_detect(struct drm_connector *connector,
bool force)
{ … }
static const struct drm_connector_funcs anx78xx_connector_funcs = …;
static int anx78xx_bridge_attach(struct drm_bridge *bridge,
enum drm_bridge_attach_flags flags)
{ … }
static void anx78xx_bridge_detach(struct drm_bridge *bridge)
{ … }
static enum drm_mode_status
anx78xx_bridge_mode_valid(struct drm_bridge *bridge,
const struct drm_display_info *info,
const struct drm_display_mode *mode)
{ … }
static void anx78xx_bridge_disable(struct drm_bridge *bridge)
{ … }
static void anx78xx_bridge_mode_set(struct drm_bridge *bridge,
const struct drm_display_mode *mode,
const struct drm_display_mode *adjusted_mode)
{ … }
static void anx78xx_bridge_enable(struct drm_bridge *bridge)
{ … }
static const struct drm_bridge_funcs anx78xx_bridge_funcs = …;
static irqreturn_t anx78xx_hpd_threaded_handler(int irq, void *data)
{ … }
static int anx78xx_handle_dp_int_1(struct anx78xx *anx78xx, u8 irq)
{ … }
static bool anx78xx_handle_common_int_4(struct anx78xx *anx78xx, u8 irq)
{ … }
static void anx78xx_handle_hdmi_int_1(struct anx78xx *anx78xx, u8 irq)
{ … }
static irqreturn_t anx78xx_intp_threaded_handler(int unused, void *data)
{ … }
static void unregister_i2c_dummy_clients(struct anx78xx *anx78xx)
{ … }
static const struct regmap_config anx78xx_regmap_config = …;
static const u16 anx78xx_chipid_list[] = …;
static int anx78xx_i2c_probe(struct i2c_client *client)
{ … }
static void anx78xx_i2c_remove(struct i2c_client *client)
{ … }
static const struct of_device_id anx78xx_match_table[] = …;
MODULE_DEVICE_TABLE(of, anx78xx_match_table);
static struct i2c_driver anx78xx_driver = …;
module_i2c_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;