/* Common OmniVision image sensor definitions */

#ifndef __LINUX_OVSENSOR_H
#define __LINUX_OVSENSOR_H

/* Commands */
enum {
	OVSENSOR_CMD_S_CONT,		/* Contrast */
	OVSENSOR_CMD_G_CONT,
	OVSENSOR_CMD_S_BRIGHT,		/* Brightness */
	OVSENSOR_CMD_G_BRIGHT,
	OVSENSOR_CMD_S_SAT,		/* Saturation */
	OVSENSOR_CMD_G_SAT,
	OVSENSOR_CMD_S_HUE,		/* Hue */
	OVSENSOR_CMD_G_HUE,
	OVSENSOR_CMD_S_EXP,		/* Exposure */
	OVSENSOR_CMD_G_EXP,
	OVSENSOR_CMD_S_FREQ,		/* Light frequency */
	OVSENSOR_CMD_BANDFILT,		/* Banding filter */
	OVSENSOR_CMD_AUTOBRIGHT,	/* Auto brightness */
	OVSENSOR_CMD_AUTOEXP,		/* Auto exposure */
	OVSENSOR_CMD_BACKLIGHT,		/* Back light compensation */
	OVSENSOR_CMD_MIRROR,		/* Mirror horizontally */

};

/* Sensor types */
enum {
	SEN_UNKNOWN,
	SEN_OV76BE,
	SEN_OV7610,
	SEN_OV7620,
	SEN_OV7620AE,
	SEN_OV6620,
	SEN_OV6630,
	SEN_OV6630AE,
	SEN_OV6630AF,
	SEN_OV8600,
	SEN_KS0127,
	SEN_KS0127B,
	SEN_SAA7111A,
};

/* Forward declaration */
struct usb_ov511;

struct ovsensor_regvals {
	unsigned char reg;
	unsigned char val;
};

struct ov_i2c {
	int (*r)(struct usb_ov511 *, unsigned char, unsigned char *);
	int (*w)(struct usb_ov511 *, unsigned char, unsigned char);
	int (*w_mask)(struct usb_ov511 *, unsigned char, unsigned char,
		      unsigned char);
};

struct ovsensor_ops {
	int (*configure)(struct usb_ov511 *);
	int (*set_window)(struct usb_ov511 *, int, int, int, int);
	int (*mode_init)(struct usb_ov511 *, int, int, int, int, int);
	int (*command)(struct usb_ov511 *, int, int *);
};

#endif
