/*
 * ADC Command Register (see ADC12048-Manual)
 */
/* low byte */
#define ADC_MUX_CH0_CH1		0x00
#define ADC_MUX_CH1_CH0		0x01
#define ADC_MUX_CH2_CH3		0x02
#define ADC_MUX_CH3_CH2		0x03
#define ADC_MUX_CH4_CH5		0x04
#define ADC_MUX_CH5_CH4		0x05
#define ADC_MUX_CH6_CH7		0x06
#define ADC_MUX_CH7_CH6		0x07
#define ADC_MUX_CH0_COM		0x08
#define ADC_MUX_CH1_COM		0x09
#define ADC_MUX_CH2_COM		0x0A
#define ADC_MUX_CH3_COM		0x0B
#define ADC_MUX_CH4_COM		0x0C
#define ADC_MUX_CH5_COM		0x0D
#define ADC_MUX_CH6_COM		0x0E
#define ADC_MUX_CH7_COM		0x0F

#define ADC_ACQT_9		0x00
#define ADC_ACQT_15		0x10
#define ADC_ACQT_47		0x20
#define ADC_ACQT_79		0x30
#define ADC_SE			0x40
#define ADC_HB			0x80

/* high byte */
#define ADC_SYNC_IN		0x01
#define ADC_SYNC_OUT		0x00
#define ADC_CMD_STANDBY 	0x00
#define ADC_CMD_FULCAL		0x02
#define ADC_CMD_AUTOZERO	0x04
#define ADC_CMD_RESET		0x06
#define ADC_CMD_START		0x08
#define ADC_BW_8		0x00
#define ADC_BW_16		0x10


typedef struct adc_read_rq {
	unsigned char	chan_bitmap;	/* adc channels to read from */
	void *		data_buf;	/* ptr to buffer adc data will go to */
} adc_read_rq_t;

/* Stuff for ioctls */
#define VL2_ADC_IOCTL_MGC	'z'
#define SEQ_START		0x80 /* seems to be unused (Documentation/ioctl-number.txt) */
/* our control requests */
#define VL2_ADC_IOCTL_READ	_IOWR(VL2_ADC_IOCTL_MGC, SEQ_START, struct adc_read_rq)
/* following is not supported yet */
#define VL2_ADC_IOCTL_ADCCMD	_IOR(VL2_ADC_IOCTL_MGC, SEQ_START + 1, unsigned int)
#define VL2_ADC_IOCTL_IOPORT	_IOR(VL2_ADC_IOCTL_MGC, SEQ_START + 2, unsigned int)
/* may be more later? */
