From: Thierry Reding Date: Thu, 24 Oct 2013 12:59:28 +0000 (+0200) Subject: Merge remote-tracking branch 'staging/staging-next' X-Git-Tag: next-20131024~29 X-Git-Url: https://git.karo-electronics.de/?p=karo-tx-linux.git;a=commitdiff_plain;h=805b40af69321d436e60df1a2771d57f4e9b3780 Merge remote-tracking branch 'staging/staging-next' --- 805b40af69321d436e60df1a2771d57f4e9b3780 diff --cc include/linux/mfd/ti_am335x_tscadc.h index 7b68a061cd60,08cce7f96ab9..d498d98f0c2c --- a/include/linux/mfd/ti_am335x_tscadc.h +++ b/include/linux/mfd/ti_am335x_tscadc.h @@@ -123,20 -131,16 +131,21 @@@ #define ADC_CLK 3000000 #define TOTAL_STEPS 16 #define TOTAL_CHANNELS 8 + #define FIFO1_THRESHOLD 19 /* -* ADC runs at 3MHz, and it takes -* 15 cycles to latch one data output. -* Hence the idle time for ADC to -* process one sample data would be -* around 5 micro seconds. -*/ -#define IDLE_TIMEOUT 5 /* microsec */ + * time in us for processing a single channel, calculated as follows: + * + * num cycles = open delay + (sample delay + conv time) * averaging + * + * num cycles: 152 + (1 + 13) * 16 = 376 + * + * clock frequency: 26MHz / 8 = 3.25MHz + * clock period: 1 / 3.25MHz = 308ns + * + * processing time: 376 * 308ns = 116us + */ +#define IDLE_TIMEOUT 116 /* microsec */ #define TSCADC_CELLS 2