GPSR0 = GPIO_bit(CORGI_GPIO_MAX1111_CS); 
GPSR(ssp_machinfo->cs_max1111) = GPIO_bit(ssp_machinfo->cs_max1111); 
int corgi_ssp_max1111_get(ulong data){	unsigned long flag;	int voltage,voltage1,voltage2;	spin_lock_irqsave(&corgi_ssp_lock, flag);	GPCR0 = GPIO_bit(CORGI_GPIO_MAX1111_CS);	ssp_disable(&corgi_ssp_dev);	ssp_config(&corgi_ssp_dev, (SSCR0_Motorola | (SSCR0_DSS & 0x07 )), 0, 0, SSCR0_SerClkDiv(8));	ssp_enable(&corgi_ssp_dev);	udelay(1);	/* TB1/RB1 */	ssp_write_word(&corgi_ssp_dev,data);	ssp_read_word(&corgi_ssp_dev); /* null read */	/* TB12/RB2 */	ssp_write_word(&corgi_ssp_dev,0);	voltage1=ssp_read_word(&corgi_ssp_dev);	/* TB13/RB3*/	ssp_write_word(&corgi_ssp_dev,0);	voltage2=ssp_read_word(&corgi_ssp_dev);	ssp_disable(&corgi_ssp_dev);	ssp_config(&corgi_ssp_dev, (SSCR0_National | (SSCR0_DSS & 0x0b )), 0, 0, SSCR0_SerClkDiv(2));	ssp_enable(&corgi_ssp_dev);	GPSR0 = GPIO_bit(CORGI_GPIO_MAX1111_CS);	spin_unlock_irqrestore(&corgi_ssp_lock, flag);	if (voltage1 & 0xc0 || voltage2 & 0x3f)		voltage = -1;	else		voltage = ((voltage1 << 2) & 0xfc) | ((voltage2 >> 6) & 0x03);	return voltage;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/50a5de44821352354a3ee804e2c7cbfee5a81c06/corgi_ssp.c/buggy/arch/arm/mach-pxa/corgi_ssp.c