linux/drivers/media/usb/gspca/m5602/m5602_bridge.h

/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * USB Driver for ALi m5602 based webcams
 *
 * Copyright (C) 2008 Erik Andrén
 * Copyright (C) 2007 Ilyes Gouta. Based on the m5603x Linux Driver Project.
 * Copyright (C) 2005 m5603x Linux Driver Project <[email protected]>
 *
 * Portions of code to USB interface and ALi driver software,
 * Copyright (c) 2006 Willem Duinker
 * v4l2 interface modeled after the V4L2 driver
 * for SN9C10x PC Camera Controllers
 */

#ifndef M5602_BRIDGE_H_
#define M5602_BRIDGE_H_

#include <linux/slab.h>
#include "gspca.h"

#define MODULE_NAME

/*****************************************************************************/

#define M5602_XB_SENSOR_TYPE
#define M5602_XB_SENSOR_CTRL
#define M5602_XB_LINE_OF_FRAME_H
#define M5602_XB_LINE_OF_FRAME_L
#define M5602_XB_PIX_OF_LINE_H
#define M5602_XB_PIX_OF_LINE_L
#define M5602_XB_VSYNC_PARA
#define M5602_XB_HSYNC_PARA
#define M5602_XB_TEST_MODE_1
#define M5602_XB_TEST_MODE_2
#define M5602_XB_SIG_INI
#define M5602_XB_DS_PARA
#define M5602_XB_TRIG_PARA
#define M5602_XB_CLK_PD
#define M5602_XB_MCU_CLK_CTRL
#define M5602_XB_MCU_CLK_DIV
#define M5602_XB_SEN_CLK_CTRL
#define M5602_XB_SEN_CLK_DIV
#define M5602_XB_AUD_CLK_CTRL
#define M5602_XB_AUD_CLK_DIV
#define M5602_OB_AC_LINK_STATE
#define M5602_OB_PCM_SLOT_INDEX
#define M5602_OB_GPIO_SLOT_INDEX
#define M5602_OB_ACRX_STATUS_ADDRESS_H
#define M5602_OB_ACRX_STATUS_DATA_L
#define M5602_OB_ACRX_STATUS_DATA_H
#define M5602_OB_ACTX_COMMAND_ADDRESS
#define M5602_OB_ACRX_COMMAND_DATA_L
#define M5602_OB_ACTX_COMMAND_DATA_H
#define M5602_XB_DEVCTR1
#define M5602_XB_EPSETR0
#define M5602_XB_EPAFCTR
#define M5602_XB_EPBFCTR
#define M5602_XB_EPEFCTR
#define M5602_XB_TEST_REG
#define M5602_XB_ALT2SIZE
#define M5602_XB_ALT3SIZE
#define M5602_XB_OBSFRAME
#define M5602_XB_PWR_CTL
#define M5602_XB_ADC_CTRL
#define M5602_XB_ADC_DATA
#define M5602_XB_MISC_CTRL
#define M5602_XB_SNAPSHOT
#define M5602_XB_SCRATCH_1
#define M5602_XB_SCRATCH_2
#define M5602_XB_SCRATCH_3
#define M5602_XB_SCRATCH_4
#define M5602_XB_I2C_CTRL
#define M5602_XB_I2C_CLK_DIV
#define M5602_XB_I2C_DEV_ADDR
#define M5602_XB_I2C_REG_ADDR
#define M5602_XB_I2C_DATA
#define M5602_XB_I2C_STATUS
#define M5602_XB_GPIO_DAT_H
#define M5602_XB_GPIO_DAT_L
#define M5602_XB_GPIO_DIR_H
#define M5602_XB_GPIO_DIR_L
#define M5602_XB_GPIO_EN_H
#define M5602_XB_GPIO_EN_L
#define M5602_XB_GPIO_DAT
#define M5602_XB_GPIO_DIR
#define M5602_XB_SEN_CLK_CONTROL
#define M5602_XB_SEN_CLK_DIVISION
#define M5602_XB_CPR_CLK_CONTROL
#define M5602_XB_CPR_CLK_DIVISION
#define M5602_XB_MCU_CLK_CONTROL
#define M5602_XB_MCU_CLK_DIVISION
#define M5602_XB_DCT_CLK_CONTROL
#define M5602_XB_DCT_CLK_DIVISION
#define M5602_XB_EC_CLK_CONTROL
#define M5602_XB_EC_CLK_DIVISION
#define M5602_XB_LBUF_CLK_CONTROL
#define M5602_XB_LBUF_CLK_DIVISION

#define I2C_BUSY

/*****************************************************************************/

/* Driver info */
#define DRIVER_AUTHOR
#define DRIVER_DESC

#define M5602_ISOC_ENDPOINT_ADDR
#define M5602_INTR_ENDPOINT_ADDR

#define M5602_URB_MSG_TIMEOUT

/*****************************************************************************/

struct sd {};

int m5602_read_bridge(
	struct sd *sd, const u8 address, u8 *i2c_data);

int m5602_write_bridge(
	struct sd *sd, const u8 address, const u8 i2c_data);

int m5602_write_sensor(struct sd *sd, const u8 address,
		       u8 *i2c_data, const u8 len);

int m5602_read_sensor(struct sd *sd, const u8 address,
		      u8 *i2c_data, const u8 len);

#endif