1 /* drivers/adc/chips/rk29_adc.h
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 as
5 * published by the Free Software Foundation.
9 #ifndef __ASM_RK30_ADC_H
10 #define __ASM_RK30_ADC_H
13 #define ADC_DATA_MASK 0x3ff
16 #define ADC_STAS_BUSY (1<<0)
19 #define ADC_CTRL_CH(ch) (0x07 - ((ch)<<0))
20 #define ADC_CTRL_POWER_UP (1<<3)
21 #define ADC_CTRL_START (1<<4)
22 #define ADC_CTRL_IRQ_ENABLE (1<<5)
23 #define ADC_CTRL_IRQ_STATUS (1<<6)
25 #define ADC_DLY_PU_SOC 0x0C
27 #define ADC_CLK_RATE 1 //1M
28 #define SAMPLE_RATE (20/ADC_CLK_RATE) //20 CLK
36 static struct tsadc_table table_code_to_temp[] =
80 #endif /* __ASM_RK30_ADC_H */