linux/drivers/media/pci/bt8xx/bttv-i2c.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*

    bttv-i2c.c  --  all the i2c code is here

    bttv - Bt848 frame grabber driver

    Copyright (C) 1996,97,98 Ralph  Metzler ([email protected])
			   & Marcus Metzler ([email protected])
    (c) 1999-2003 Gerd Knorr <[email protected]>

    (c) 2005 Mauro Carvalho Chehab <[email protected]>
	- Multituner support and i2c address binding


*/

#define pr_fmt(fmt)

#include <linux/module.h>
#include <linux/init.h>
#include <linux/delay.h>

#include "bttvp.h"
#include <media/v4l2-common.h>
#include <linux/jiffies.h>
#include <asm/io.h>

static int i2c_debug;
static int i2c_hw;
static int i2c_scan;
module_param(i2c_debug, int, 0644);
MODULE_PARM_DESC();
module_param(i2c_hw,    int, 0444);
MODULE_PARM_DESC();
module_param(i2c_scan,  int, 0444);
MODULE_PARM_DESC();

static unsigned int i2c_udelay =;
module_param(i2c_udelay, int, 0444);
MODULE_PARM_DESC();

/* ----------------------------------------------------------------------- */
/* I2C functions - bitbanging adapter (software i2c)                       */

static void bttv_bit_setscl(void *data, int state)
{}

static void bttv_bit_setsda(void *data, int state)
{}

static int bttv_bit_getscl(void *data)
{}

static int bttv_bit_getsda(void *data)
{}

static const struct i2c_algo_bit_data bttv_i2c_algo_bit_template =;

/* ----------------------------------------------------------------------- */
/* I2C functions - hardware i2c                                            */

static u32 functionality(struct i2c_adapter *adap)
{}

static int
bttv_i2c_wait_done(struct bttv *btv)
{}

#define I2C_HW

static int
bttv_i2c_sendbytes(struct bttv *btv, const struct i2c_msg *msg, int last)
{}

static int
bttv_i2c_readbytes(struct bttv *btv, const struct i2c_msg *msg, int last)
{}

static int bttv_i2c_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg *msgs, int num)
{}

static const struct i2c_algorithm bttv_algo =;

/* ----------------------------------------------------------------------- */
/* I2C functions - common stuff                                            */

/* read I2C */
int bttv_I2CRead(struct bttv *btv, unsigned char addr, char *probe_for)
{}

/* write I2C */
int bttv_I2CWrite(struct bttv *btv, unsigned char addr, unsigned char b1,
		    unsigned char b2, int both)
{}

/* read EEPROM content */
void bttv_readee(struct bttv *btv, unsigned char *eedata, int addr)
{}

static char *i2c_devs[128] =;

static void do_i2c_scan(char *name, struct i2c_client *c)
{}

/* init + register i2c adapter */
int init_bttv_i2c(struct bttv *btv)
{}

int fini_bttv_i2c(struct bttv *btv)
{}