linux/drivers/media/pci/pt3/pt3_i2c.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Earthsoft PT3 driver
 *
 * Copyright (C) 2014 Akihiro Tsukada <[email protected]>
 */
#include <linux/delay.h>
#include <linux/device.h>
#include <linux/i2c.h>
#include <linux/io.h>
#include <linux/pci.h>

#include "pt3.h"

#define PT3_I2C_BASE
#define PT3_CMD_ADDR_NORMAL
#define PT3_CMD_ADDR_INIT_DEMOD
#define PT3_CMD_ADDR_INIT_TUNER

/* masks for I2C status register */
#define STAT_SEQ_RUNNING
#define STAT_SEQ_ERROR
#define STAT_NO_SEQ

#define PT3_I2C_RUN
#define PT3_I2C_RESET

enum ctl_cmd {};


static void cmdbuf_add(struct pt3_i2cbuf *cbuf, enum ctl_cmd cmd)
{}

static void put_end(struct pt3_i2cbuf *cbuf)
{}

static void put_start(struct pt3_i2cbuf *cbuf)
{}

static void put_byte_write(struct pt3_i2cbuf *cbuf, u8 val)
{}

static void put_byte_read(struct pt3_i2cbuf *cbuf, u32 size)
{}

static void put_stop(struct pt3_i2cbuf *cbuf)
{}


/* translates msgs to internal commands for bit-banging */
static void translate(struct pt3_i2cbuf *cbuf, struct i2c_msg *msgs, int num)
{}

static int wait_i2c_result(struct pt3_board *pt3, u32 *result, int max_wait)
{}

/* send [pre-]translated i2c msgs stored at addr */
static int send_i2c_cmd(struct pt3_board *pt3, u32 addr)
{}


/* init commands for each demod are combined into one transaction
 *  and hidden in ROM with the address PT3_CMD_ADDR_INIT_DEMOD.
 */
int  pt3_init_all_demods(struct pt3_board *pt3)
{}

/* init commands for two ISDB-T tuners are hidden in ROM. */
int  pt3_init_all_mxl301rf(struct pt3_board *pt3)
{}

void pt3_i2c_reset(struct pt3_board *pt3)
{}

/*
 * I2C algorithm
 */
int
pt3_i2c_master_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num)
{}

u32 pt3_i2c_functionality(struct i2c_adapter *adap)
{}