linux/drivers/media/pci/cx18/cx18-i2c.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 *  cx18 I2C functions
 *
 *  Derived from ivtv-i2c.c
 *
 *  Copyright (C) 2007  Hans Verkuil <[email protected]>
 *  Copyright (C) 2008  Andy Walls <[email protected]>
 */

#include "cx18-driver.h"
#include "cx18-io.h"
#include "cx18-cards.h"
#include "cx18-gpio.h"
#include "cx18-i2c.h"
#include "cx18-irq.h"

#define CX18_REG_I2C_1_WR
#define CX18_REG_I2C_1_RD
#define CX18_REG_I2C_2_WR
#define CX18_REG_I2C_2_RD

#define SETSCL_BIT
#define SETSDL_BIT
#define GETSCL_BIT
#define GETSDL_BIT

#define CX18_CS5345_I2C_ADDR
#define CX18_Z8F0811_IR_TX_I2C_ADDR
#define CX18_Z8F0811_IR_RX_I2C_ADDR

/* This array should match the CX18_HW_ defines */
static const u8 hw_addrs[] =;

/* This array should match the CX18_HW_ defines */
/* This might well become a card-specific array */
static const u8 hw_bus[] =;

/* This array should match the CX18_HW_ defines */
static const char * const hw_devicenames[] =;

static int cx18_i2c_new_ir(struct cx18 *cx, struct i2c_adapter *adap, u32 hw,
			   const char *type, u8 addr)
{}

int cx18_i2c_register(struct cx18 *cx, unsigned idx)
{}

/* Find the first member of the subdev group id in hw */
struct v4l2_subdev *cx18_find_hw(struct cx18 *cx, u32 hw)
{}

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

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

static int cx18_getscl(void *data)
{}

static int cx18_getsda(void *data)
{}

/* template for i2c-bit-algo */
static const struct i2c_adapter cx18_i2c_adap_template =;

#define CX18_SCL_PERIOD
#define CX18_ALGO_BIT_TIMEOUT

static const struct i2c_algo_bit_data cx18_i2c_algo_template =;

/* init + register i2c adapter */
int init_cx18_i2c(struct cx18 *cx)
{}

void exit_cx18_i2c(struct cx18 *cx)
{}

/*
   Hauppauge HVR1600 should have:
   32 cx24227
   98 unknown
   a0 eeprom
   c2 tuner
   e? zilog ir
   */