linux/drivers/gpu/drm/bridge/lontium-lt9211.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Lontium LT9211 bridge driver
 *
 * LT9211 is capable of converting:
 *   2xDSI/2xLVDS/1xDPI -> 2xDSI/2xLVDS/1xDPI
 * Currently supported is:
 *   1xDSI -> 1xLVDS
 *
 * Copyright (C) 2022 Marek Vasut <[email protected]>
 */

#include <linux/bits.h>
#include <linux/clk.h>
#include <linux/gpio/consumer.h>
#include <linux/i2c.h>
#include <linux/media-bus-format.h>
#include <linux/module.h>
#include <linux/of_graph.h>
#include <linux/regmap.h>
#include <linux/regulator/consumer.h>

#include <drm/drm_atomic_helper.h>
#include <drm/drm_bridge.h>
#include <drm/drm_mipi_dsi.h>
#include <drm/drm_of.h>
#include <drm/drm_panel.h>
#include <drm/drm_print.h>
#include <drm/drm_probe_helper.h>

#define REG_PAGE_CONTROL
#define REG_CHIPID0
#define REG_CHIPID0_VALUE
#define REG_CHIPID1
#define REG_CHIPID1_VALUE
#define REG_CHIPID2
#define REG_CHIPID2_VALUE

#define REG_DSI_LANE
/* DSI lane count - 0 means 4 lanes ; 1, 2, 3 means 1, 2, 3 lanes. */
#define REG_DSI_LANE_COUNT(n)

struct lt9211 {};

static const struct regmap_range lt9211_rw_ranges[] =;

static const struct regmap_access_table lt9211_rw_table =;

static const struct regmap_range_cfg lt9211_range =;

static const struct regmap_config lt9211_regmap_config =;

static struct lt9211 *bridge_to_lt9211(struct drm_bridge *bridge)
{}

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

static int lt9211_read_chipid(struct lt9211 *ctx)
{}

static int lt9211_system_init(struct lt9211 *ctx)
{}

static int lt9211_configure_rx(struct lt9211 *ctx)
{}

static int lt9211_autodetect_rx(struct lt9211 *ctx,
				const struct drm_display_mode *mode)
{}

static int lt9211_configure_timing(struct lt9211 *ctx,
				   const struct drm_display_mode *mode)
{}

static int lt9211_configure_plls(struct lt9211 *ctx,
				 const struct drm_display_mode *mode)
{}

static int lt9211_configure_tx(struct lt9211 *ctx, bool jeida,
			       bool bpp24, bool de)
{}

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

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

static enum drm_mode_status
lt9211_mode_valid(struct drm_bridge *bridge,
		  const struct drm_display_info *info,
		  const struct drm_display_mode *mode)
{}

#define MAX_INPUT_SEL_FORMATS

static u32 *
lt9211_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 lt9211_funcs =;

static int lt9211_parse_dt(struct lt9211 *ctx)
{}

static int lt9211_host_attach(struct lt9211 *ctx)
{}

static int lt9211_probe(struct i2c_client *client)
{}

static void lt9211_remove(struct i2c_client *client)
{}

static struct i2c_device_id lt9211_id[] =;
MODULE_DEVICE_TABLE(i2c, lt9211_id);

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

static struct i2c_driver lt9211_driver =;
module_i2c_driver();

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