linux/drivers/media/i2c/adv748x/adv748x-core.c

// SPDX-License-Identifier: GPL-2.0+
/*
 * Driver for Analog Devices ADV748X HDMI receiver with AFE
 *
 * Copyright (C) 2017 Renesas Electronics Corp.
 *
 * Authors:
 *	Koji Matsuoka <[email protected]>
 *	Niklas Söderlund <[email protected]>
 *	Kieran Bingham <[email protected]>
 */

#include <linux/delay.h>
#include <linux/errno.h>
#include <linux/i2c.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/of_graph.h>
#include <linux/regmap.h>
#include <linux/slab.h>
#include <linux/v4l2-dv-timings.h>

#include <media/v4l2-ctrls.h>
#include <media/v4l2-device.h>
#include <media/v4l2-dv-timings.h>
#include <media/v4l2-fwnode.h>
#include <media/v4l2-ioctl.h>

#include "adv748x.h"

/* -----------------------------------------------------------------------------
 * Register manipulation
 */

#define ADV748X_REGMAP_CONF(n)

static const struct regmap_config adv748x_regmap_cnf[] =;

static int adv748x_configure_regmap(struct adv748x_state *state, int region)
{}
struct adv748x_register_map {};

static const struct adv748x_register_map adv748x_default_addresses[] =;

static int adv748x_read_check(struct adv748x_state *state,
			      int client_page, u8 reg)
{}

int adv748x_read(struct adv748x_state *state, u8 page, u8 reg)
{}

int adv748x_write(struct adv748x_state *state, u8 page, u8 reg, u8 value)
{}

static int adv748x_write_check(struct adv748x_state *state, u8 page, u8 reg,
			       u8 value, int *error)
{}

/* adv748x_write_block(): Write raw data with a maximum of I2C_SMBUS_BLOCK_MAX
 * size to one or more registers.
 *
 * A value of zero will be returned on success, a negative errno will
 * be returned in error cases.
 */
int adv748x_write_block(struct adv748x_state *state, int client_page,
			unsigned int init_reg, const void *val,
			size_t val_len)
{}

static int adv748x_set_slave_addresses(struct adv748x_state *state)
{}

static void adv748x_unregister_clients(struct adv748x_state *state)
{}

static int adv748x_initialise_clients(struct adv748x_state *state)
{}

/**
 * struct adv748x_reg_value - Register write instruction
 * @page:		Regmap page identifier
 * @reg:		I2C register
 * @value:		value to write to @page at @reg
 */
struct adv748x_reg_value {};

static int adv748x_write_regs(struct adv748x_state *state,
			      const struct adv748x_reg_value *regs)
{}

/* -----------------------------------------------------------------------------
 * TXA and TXB
 */

static int adv748x_power_up_tx(struct adv748x_csi2 *tx)
{}

static int adv748x_power_down_tx(struct adv748x_csi2 *tx)
{}

int adv748x_tx_power(struct adv748x_csi2 *tx, bool on)
{}

/* -----------------------------------------------------------------------------
 * Media Operations
 */
static int adv748x_link_setup(struct media_entity *entity,
			      const struct media_pad *local,
			      const struct media_pad *remote, u32 flags)
{}

static const struct media_entity_operations adv748x_tx_media_ops =;

static const struct media_entity_operations adv748x_media_ops =;

/* -----------------------------------------------------------------------------
 * HW setup
 */

/* Initialize CP Core with RGB888 format. */
static const struct adv748x_reg_value adv748x_init_hdmi[] =;

/* Initialize AFE core with YUV8 format. */
static const struct adv748x_reg_value adv748x_init_afe[] =;

static int adv748x_sw_reset(struct adv748x_state *state)
{}

static int adv748x_reset(struct adv748x_state *state)
{}

static int adv748x_identify_chip(struct adv748x_state *state)
{}

/* -----------------------------------------------------------------------------
 * Suspend / Resume
 */

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

/* -----------------------------------------------------------------------------
 * i2c driver
 */

void adv748x_subdev_init(struct v4l2_subdev *sd, struct adv748x_state *state,
			 const struct v4l2_subdev_ops *ops, u32 function,
			 const char *ident)
{}

static int adv748x_parse_csi2_lanes(struct adv748x_state *state,
				    unsigned int port,
				    struct device_node *ep)
{}

static int adv748x_parse_dt(struct adv748x_state *state)
{}

static void adv748x_dt_cleanup(struct adv748x_state *state)
{}

static int adv748x_probe(struct i2c_client *client)
{}

static void adv748x_remove(struct i2c_client *client)
{}

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

static const struct dev_pm_ops adv748x_pm_ops =;

static struct i2c_driver adv748x_driver =;

module_i2c_driver();

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