linux/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Analog Devices ADV7511 HDMI transmitter driver
 *
 * Copyright 2012 Analog Devices Inc.
 */

#include <linux/clk.h>
#include <linux/device.h>
#include <linux/gpio/consumer.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/slab.h>

#include <media/cec.h>

#include <drm/drm_atomic.h>
#include <drm/drm_atomic_helper.h>
#include <drm/drm_edid.h>
#include <drm/drm_of.h>
#include <drm/drm_print.h>
#include <drm/drm_probe_helper.h>

#include "adv7511.h"

/* ADI recommended values for proper operation. */
static const struct reg_sequence adv7511_fixed_registers[] =;

/* -----------------------------------------------------------------------------
 * Register access
 */

static const uint8_t adv7511_register_defaults[] =;

static bool adv7511_register_volatile(struct device *dev, unsigned int reg)
{}

static const struct regmap_config adv7511_regmap_config =;

/* -----------------------------------------------------------------------------
 * Hardware configuration
 */

static void adv7511_set_colormap(struct adv7511 *adv7511, bool enable,
				 const uint16_t *coeff,
				 unsigned int scaling_factor)
{}

static int adv7511_packet_enable(struct adv7511 *adv7511, unsigned int packet)
{}

static int adv7511_packet_disable(struct adv7511 *adv7511, unsigned int packet)
{}

/* Coefficients for adv7511 color space conversion */
static const uint16_t adv7511_csc_ycbcr_to_rgb[] =;

static void adv7511_set_config_csc(struct adv7511 *adv7511,
				   struct drm_connector *connector,
				   bool rgb, bool hdmi_mode)
{}

static void adv7511_set_link_config(struct adv7511 *adv7511,
				    const struct adv7511_link_config *config)
{}

static void __adv7511_power_on(struct adv7511 *adv7511)
{}

static void adv7511_power_on(struct adv7511 *adv7511)
{}

static void __adv7511_power_off(struct adv7511 *adv7511)
{}

static void adv7511_power_off(struct adv7511 *adv7511)
{}

/* -----------------------------------------------------------------------------
 * Interrupt and hotplug detection
 */

static bool adv7511_hpd(struct adv7511 *adv7511)
{}

static void adv7511_hpd_work(struct work_struct *work)
{}

static int adv7511_irq_process(struct adv7511 *adv7511, bool process_hpd)
{}

static irqreturn_t adv7511_irq_handler(int irq, void *devid)
{}

/* -----------------------------------------------------------------------------
 * EDID retrieval
 */

static int adv7511_wait_for_edid(struct adv7511 *adv7511, int timeout)
{}

static int adv7511_get_edid_block(void *data, u8 *buf, unsigned int block,
				  size_t len)
{}

/* -----------------------------------------------------------------------------
 * ADV75xx helpers
 */

static const struct drm_edid *adv7511_edid_read(struct adv7511 *adv7511,
						struct drm_connector *connector)
{}

static int adv7511_get_modes(struct adv7511 *adv7511,
			     struct drm_connector *connector)
{}

static enum drm_connector_status
adv7511_detect(struct adv7511 *adv7511, struct drm_connector *connector)
{}

static enum drm_mode_status adv7511_mode_valid(struct adv7511 *adv7511,
			      const struct drm_display_mode *mode)
{}

static void adv7511_mode_set(struct adv7511 *adv7511,
			     const struct drm_display_mode *mode,
			     const struct drm_display_mode *adj_mode)
{}

/* -----------------------------------------------------------------------------
 * DRM Connector Operations
 */

static struct adv7511 *connector_to_adv7511(struct drm_connector *connector)
{}

static int adv7511_connector_get_modes(struct drm_connector *connector)
{}

static enum drm_mode_status
adv7511_connector_mode_valid(struct drm_connector *connector,
			     struct drm_display_mode *mode)
{}

static struct drm_connector_helper_funcs adv7511_connector_helper_funcs =;

static enum drm_connector_status
adv7511_connector_detect(struct drm_connector *connector, bool force)
{}

static const struct drm_connector_funcs adv7511_connector_funcs =;

static int adv7511_connector_init(struct adv7511 *adv)
{}

/* -----------------------------------------------------------------------------
 * DRM Bridge Operations
 */

static struct adv7511 *bridge_to_adv7511(struct drm_bridge *bridge)
{}

static void adv7511_bridge_enable(struct drm_bridge *bridge)
{}

static void adv7511_bridge_disable(struct drm_bridge *bridge)
{}

static void adv7511_bridge_mode_set(struct drm_bridge *bridge,
				    const struct drm_display_mode *mode,
				    const struct drm_display_mode *adj_mode)
{}

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

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

static enum drm_connector_status adv7511_bridge_detect(struct drm_bridge *bridge)
{}

static const struct drm_edid *adv7511_bridge_edid_read(struct drm_bridge *bridge,
						       struct drm_connector *connector)
{}

static void adv7511_bridge_hpd_notify(struct drm_bridge *bridge,
				      enum drm_connector_status status)
{}

static const struct drm_bridge_funcs adv7511_bridge_funcs =;

/* -----------------------------------------------------------------------------
 * Probe & remove
 */

static const char * const adv7511_supply_names[] =;

static const char * const adv7533_supply_names[] =;

static int adv7511_init_regulators(struct adv7511 *adv)
{}

static void adv7511_uninit_regulators(struct adv7511 *adv)
{}

static bool adv7511_cec_register_volatile(struct device *dev, unsigned int reg)
{}

static const struct regmap_config adv7511_cec_regmap_config =;

static int adv7511_init_cec_regmap(struct adv7511 *adv)
{}

static int adv7511_parse_dt(struct device_node *np,
			    struct adv7511_link_config *config)
{}

static int adv7511_probe(struct i2c_client *i2c)
{}

static void adv7511_remove(struct i2c_client *i2c)
{}

static const struct adv7511_chip_info adv7511_chip_info =;

static const struct adv7511_chip_info adv7533_chip_info =;

static const struct adv7511_chip_info adv7535_chip_info =;

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

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

static struct mipi_dsi_driver adv7533_dsi_driver =;

static struct i2c_driver adv7511_driver =;

static int __init adv7511_init(void)
{}
module_init();

static void __exit adv7511_exit(void)
{}
module_exit(adv7511_exit);

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