linux/drivers/media/usb/go7007/go7007-i2c.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (C) 2005-2006 Micronas USA Inc.
 */

#include <linux/module.h>
#include <linux/delay.h>
#include <linux/sched.h>
#include <linux/list.h>
#include <linux/unistd.h>
#include <linux/time.h>
#include <linux/device.h>
#include <linux/i2c.h>
#include <linux/mutex.h>
#include <linux/uaccess.h>

#include "go7007-priv.h"

/********************* Driver for on-board I2C adapter *********************/

/* #define GO7007_I2C_DEBUG */

#define SPI_I2C_ADDR_BASE
#define STATUS_REG_ADDR
#define I2C_CTRL_REG_ADDR
#define I2C_DEV_UP_ADDR_REG_ADDR
#define I2C_LO_ADDR_REG_ADDR
#define I2C_DATA_REG_ADDR
#define I2C_CLKFREQ_REG_ADDR

#define I2C_STATE_MASK
#define I2C_READ_READY_MASK

/* There is only one I2C port on the TW2804 that feeds all four GO7007 VIPs
 * on the Adlink PCI-MPG24, so access is shared between all of them. */
static DEFINE_MUTEX(adlink_mpg24_i2c_mutex);

static inline void adlink_mpg24_i2c_lock(struct go7007 *go)
{}

static inline void adlink_mpg24_i2c_unlock(struct go7007 *go)
{}

static int go7007_i2c_xfer(struct go7007 *go, u16 addr, int read,
		u16 command, int flags, u8 *data)
{}

static int go7007_smbus_xfer(struct i2c_adapter *adapter, u16 addr,
		unsigned short flags, char read_write,
		u8 command, int size, union i2c_smbus_data *data)
{}

/* VERY LIMITED I2C master xfer function -- only needed because the
 * SMBus functions only support 8-bit commands and the SAA7135 uses
 * 16-bit commands.  The I2C interface on the GO7007, as limited as
 * it is, does support this mode. */

static int go7007_i2c_master_xfer(struct i2c_adapter *adapter,
					struct i2c_msg msgs[], int num)
{}

static u32 go7007_functionality(struct i2c_adapter *adapter)
{}

static const struct i2c_algorithm go7007_algo =;

static struct i2c_adapter go7007_adap_templ =;

int go7007_i2c_init(struct go7007 *go)
{}