linux/drivers/gpu/drm/bridge/parade-ps8640.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2016 MediaTek Inc.
 */

#include <linux/delay.h>
#include <linux/err.h>
#include <linux/gpio/consumer.h>
#include <linux/i2c.h>
#include <linux/module.h>
#include <linux/of_graph.h>
#include <linux/pm_runtime.h>
#include <linux/regmap.h>
#include <linux/regulator/consumer.h>

#include <drm/display/drm_dp_aux_bus.h>
#include <drm/display/drm_dp_helper.h>
#include <drm/drm_atomic_state_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_panel.h>
#include <drm/drm_print.h>

#define PAGE0_AUXCH_CFG3
#define AUXCH_CFG3_RESET
#define PAGE0_SWAUX_ADDR_7_0
#define PAGE0_SWAUX_ADDR_15_8
#define PAGE0_SWAUX_ADDR_23_16
#define SWAUX_ADDR_MASK
#define PAGE0_SWAUX_LENGTH
#define SWAUX_LENGTH_MASK
#define SWAUX_NO_PAYLOAD
#define PAGE0_SWAUX_WDATA
#define PAGE0_SWAUX_RDATA
#define PAGE0_SWAUX_CTRL
#define SWAUX_SEND
#define PAGE0_SWAUX_STATUS
#define SWAUX_M_MASK
#define SWAUX_STATUS_MASK
#define SWAUX_STATUS_NACK
#define SWAUX_STATUS_DEFER
#define SWAUX_STATUS_ACKM
#define SWAUX_STATUS_INVALID
#define SWAUX_STATUS_I2C_NACK
#define SWAUX_STATUS_I2C_DEFER
#define SWAUX_STATUS_TIMEOUT

#define PAGE2_GPIO_H
#define PS_GPIO9
#define PAGE2_I2C_BYPASS
#define I2C_BYPASS_EN
#define PAGE2_MCS_EN
#define MCS_EN

#define PAGE3_SET_ADD
#define VDO_CTL_ADD
#define VDO_DIS
#define VDO_EN

#define NUM_MIPI_LANES

#define COMMON_PS8640_REGMAP_CONFIG

/*
 * PS8640 uses multiple addresses:
 * page[0]: for DP control
 * page[1]: for VIDEO Bridge
 * page[2]: for control top
 * page[3]: for DSI Link Control1
 * page[4]: for MIPI Phy
 * page[5]: for VPLL
 * page[6]: for DSI Link Control2
 * page[7]: for SPI ROM mapping
 */
enum page_addr_offset {};

enum ps8640_vdo_control {};

struct ps8640 {};

static const struct regmap_config ps8640_regmap_config[] =;

static inline struct ps8640 *bridge_to_ps8640(struct drm_bridge *e)
{}

static inline struct ps8640 *aux_to_ps8640(struct drm_dp_aux *aux)
{}

static int _ps8640_wait_hpd_asserted(struct ps8640 *ps_bridge, unsigned long wait_us)
{}

static int ps8640_wait_hpd_asserted(struct drm_dp_aux *aux, unsigned long wait_us)
{}

static ssize_t ps8640_aux_transfer_msg(struct drm_dp_aux *aux,
				       struct drm_dp_aux_msg *msg)
{}

static ssize_t ps8640_aux_transfer(struct drm_dp_aux *aux,
				   struct drm_dp_aux_msg *msg)
{}

static void ps8640_bridge_vdo_control(struct ps8640 *ps_bridge,
				      const enum ps8640_vdo_control ctrl)
{}

static int __maybe_unused ps8640_resume(struct device *dev)
{}

static int __maybe_unused ps8640_suspend(struct device *dev)
{}

static const struct dev_pm_ops ps8640_pm_ops =;

static void ps8640_atomic_pre_enable(struct drm_bridge *bridge,
				     struct drm_bridge_state *old_bridge_state)
{}

static void ps8640_atomic_post_disable(struct drm_bridge *bridge,
				       struct drm_bridge_state *old_bridge_state)
{}

static int ps8640_bridge_attach(struct drm_bridge *bridge,
				enum drm_bridge_attach_flags flags)
{}

static void ps8640_bridge_detach(struct drm_bridge *bridge)
{}

static void ps8640_runtime_disable(void *data)
{}

static const struct drm_bridge_funcs ps8640_bridge_funcs =;

static int ps8640_bridge_get_dsi_resources(struct device *dev, struct ps8640 *ps_bridge)
{}

static int ps8640_bridge_link_panel(struct drm_dp_aux *aux)
{}

static int ps8640_probe(struct i2c_client *client)
{}

static const struct of_device_id ps8640_match[] =;
MODULE_DEVICE_TABLE(of, ps8640_match);

static struct i2c_driver ps8640_driver =;
module_i2c_driver();

MODULE_AUTHOR();
MODULE_AUTHOR();
MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();