#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/io.h>
#include <linux/media-bus-format.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_device.h>
#include <linux/of_graph.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/reset.h>
#include <linux/slab.h>
#include <linux/sys_soc.h>
#include <drm/drm_atomic.h>
#include <drm/drm_atomic_helper.h>
#include <drm/drm_bridge.h>
#include <drm/drm_of.h>
#include <drm/drm_panel.h>
#include <drm/drm_print.h>
#include <drm/drm_probe_helper.h>
#include "rcar_lvds.h"
#include "rcar_lvds_regs.h"
struct rcar_lvds;
enum rcar_lvds_mode { … };
enum rcar_lvds_link_type { … };
#define RCAR_LVDS_QUIRK_LANES …
#define RCAR_LVDS_QUIRK_GEN3_LVEN …
#define RCAR_LVDS_QUIRK_PWD …
#define RCAR_LVDS_QUIRK_EXT_PLL …
#define RCAR_LVDS_QUIRK_DUAL_LINK …
struct rcar_lvds_device_info { … };
struct rcar_lvds { … };
#define bridge_to_rcar_lvds(b) …
static u32 rcar_lvds_read(struct rcar_lvds *lvds, u32 reg)
{ … }
static void rcar_lvds_write(struct rcar_lvds *lvds, u32 reg, u32 data)
{ … }
static void rcar_lvds_pll_setup_gen2(struct rcar_lvds *lvds, unsigned int freq)
{ … }
static void rcar_lvds_pll_setup_gen3(struct rcar_lvds *lvds, unsigned int freq)
{ … }
struct pll_info { … };
static void rcar_lvds_d3_e3_pll_calc(struct rcar_lvds *lvds, struct clk *clk,
unsigned long target, struct pll_info *pll,
u32 clksel, bool dot_clock_only)
{ … }
static void rcar_lvds_pll_setup_d3_e3(struct rcar_lvds *lvds,
unsigned int freq, bool dot_clock_only)
{ … }
static enum rcar_lvds_mode rcar_lvds_get_lvds_mode(struct rcar_lvds *lvds,
const struct drm_connector *connector)
{ … }
static void rcar_lvds_enable(struct drm_bridge *bridge,
struct drm_atomic_state *state,
struct drm_crtc *crtc,
struct drm_connector *connector)
{ … }
static void rcar_lvds_disable(struct drm_bridge *bridge)
{ … }
int rcar_lvds_pclk_enable(struct drm_bridge *bridge, unsigned long freq,
bool dot_clk_only)
{ … }
EXPORT_SYMBOL_GPL(…);
void rcar_lvds_pclk_disable(struct drm_bridge *bridge, bool dot_clk_only)
{ … }
EXPORT_SYMBOL_GPL(…);
static void rcar_lvds_atomic_enable(struct drm_bridge *bridge,
struct drm_bridge_state *old_bridge_state)
{ … }
static void rcar_lvds_atomic_disable(struct drm_bridge *bridge,
struct drm_bridge_state *old_bridge_state)
{ … }
static bool rcar_lvds_mode_fixup(struct drm_bridge *bridge,
const struct drm_display_mode *mode,
struct drm_display_mode *adjusted_mode)
{ … }
static int rcar_lvds_attach(struct drm_bridge *bridge,
enum drm_bridge_attach_flags flags)
{ … }
static const struct drm_bridge_funcs rcar_lvds_bridge_ops = …;
bool rcar_lvds_dual_link(struct drm_bridge *bridge)
{ … }
EXPORT_SYMBOL_GPL(…);
bool rcar_lvds_is_connected(struct drm_bridge *bridge)
{ … }
EXPORT_SYMBOL_GPL(…);
static int rcar_lvds_parse_dt_companion(struct rcar_lvds *lvds)
{ … }
static int rcar_lvds_parse_dt(struct rcar_lvds *lvds)
{ … }
static struct clk *rcar_lvds_get_clock(struct rcar_lvds *lvds, const char *name,
bool optional)
{ … }
static int rcar_lvds_get_clocks(struct rcar_lvds *lvds)
{ … }
static const struct rcar_lvds_device_info rcar_lvds_r8a7790es1_info = …;
static const struct soc_device_attribute lvds_quirk_matches[] = …;
static int rcar_lvds_probe(struct platform_device *pdev)
{ … }
static void rcar_lvds_remove(struct platform_device *pdev)
{ … }
static const struct rcar_lvds_device_info rcar_lvds_gen2_info = …;
static const struct rcar_lvds_device_info rcar_lvds_gen3_info = …;
static const struct rcar_lvds_device_info rcar_lvds_r8a77970_info = …;
static const struct rcar_lvds_device_info rcar_lvds_r8a77990_info = …;
static const struct rcar_lvds_device_info rcar_lvds_r8a77995_info = …;
static const struct of_device_id rcar_lvds_of_table[] = …;
MODULE_DEVICE_TABLE(of, rcar_lvds_of_table);
static int rcar_lvds_runtime_suspend(struct device *dev)
{ … }
static int rcar_lvds_runtime_resume(struct device *dev)
{ … }
static const struct dev_pm_ops rcar_lvds_pm_ops = …;
static struct platform_driver rcar_lvds_platform_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;