Ejemplo n.º 1
0
static void rk30_adc_start(struct adc_host *adc)
{
	struct rk30_adc_device *dev  = adc_priv(adc);
	int chn = adc->chn;

	//adc_writel(0, dev->regs + ADC_CTRL);
        adc_writel(0x08, dev->regs + ADC_DELAY_PU_SOC);
	adc_writel(ADC_CTRL_POWER_UP|ADC_CTRL_CH(chn)|ADC_CTRL_IRQ_ENABLE, dev->regs + ADC_CTRL);

	return;
}
static void rk29_adc_start(struct adc_host *adc)
{
	struct rk29_adc_device *dev  = adc_priv(adc);
	int chn = adc->cur->chn;

	writel(0, dev->regs + ADC_CTRL);
	writel(ADC_CTRL_POWER_UP|ADC_CTRL_CH(chn), dev->regs + ADC_CTRL);
	udelay(SAMPLE_RATE);

	writel(readl(dev->regs + ADC_CTRL)|ADC_CTRL_IRQ_ENABLE|ADC_CTRL_START, 
		dev->regs + ADC_CTRL);
	return;
}