#define DSS_SUBSYS_NAME …
#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/err.h>
#include <linux/errno.h>
#include <linux/export.h>
#include <linux/kernel.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/regulator/consumer.h>
#include <linux/string.h>
#include <linux/sys_soc.h>
#include <drm/drm_bridge.h>
#include "dss.h"
#include "omapdss.h"
struct dpi_data { … };
#define drm_bridge_to_dpi(bridge) …
static enum dss_clk_source dpi_get_clk_src_dra7xx(struct dpi_data *dpi,
enum omap_channel channel)
{ … }
static enum dss_clk_source dpi_get_clk_src(struct dpi_data *dpi)
{ … }
struct dpi_clk_calc_ctx { … };
static bool dpi_calc_dispc_cb(int lckd, int pckd, unsigned long lck,
unsigned long pck, void *data)
{ … }
static bool dpi_calc_hsdiv_cb(int m_dispc, unsigned long dispc,
void *data)
{ … }
static bool dpi_calc_pll_cb(int n, int m, unsigned long fint,
unsigned long clkdco,
void *data)
{ … }
static bool dpi_calc_dss_cb(unsigned long fck, void *data)
{ … }
static bool dpi_pll_clk_calc(struct dpi_data *dpi, unsigned long pck,
struct dpi_clk_calc_ctx *ctx)
{ … }
static bool dpi_dss_clk_calc(struct dpi_data *dpi, unsigned long pck,
struct dpi_clk_calc_ctx *ctx)
{ … }
static int dpi_set_pll_clk(struct dpi_data *dpi, unsigned long pck_req)
{ … }
static int dpi_set_dispc_clk(struct dpi_data *dpi, unsigned long pck_req)
{ … }
static int dpi_set_mode(struct dpi_data *dpi)
{ … }
static void dpi_config_lcd_manager(struct dpi_data *dpi)
{ … }
static int dpi_clock_update(struct dpi_data *dpi, unsigned long *clock)
{ … }
static int dpi_verify_pll(struct dss_pll *pll)
{ … }
static void dpi_init_pll(struct dpi_data *dpi)
{ … }
static int dpi_bridge_attach(struct drm_bridge *bridge,
enum drm_bridge_attach_flags flags)
{ … }
static enum drm_mode_status
dpi_bridge_mode_valid(struct drm_bridge *bridge,
const struct drm_display_info *info,
const struct drm_display_mode *mode)
{ … }
static bool dpi_bridge_mode_fixup(struct drm_bridge *bridge,
const struct drm_display_mode *mode,
struct drm_display_mode *adjusted_mode)
{ … }
static void dpi_bridge_mode_set(struct drm_bridge *bridge,
const struct drm_display_mode *mode,
const struct drm_display_mode *adjusted_mode)
{ … }
static void dpi_bridge_enable(struct drm_bridge *bridge)
{ … }
static void dpi_bridge_disable(struct drm_bridge *bridge)
{ … }
static const struct drm_bridge_funcs dpi_bridge_funcs = …;
static void dpi_bridge_init(struct dpi_data *dpi)
{ … }
static void dpi_bridge_cleanup(struct dpi_data *dpi)
{ … }
static enum omap_channel dpi_get_channel(struct dpi_data *dpi)
{ … }
static int dpi_init_output_port(struct dpi_data *dpi, struct device_node *port)
{ … }
static void dpi_uninit_output_port(struct device_node *port)
{ … }
static const struct soc_device_attribute dpi_soc_devices[] = …;
static int dpi_init_regulator(struct dpi_data *dpi)
{ … }
int dpi_init_port(struct dss_device *dss, struct platform_device *pdev,
struct device_node *port, enum dss_model dss_model)
{ … }
void dpi_uninit_port(struct device_node *port)
{ … }