diff options
Diffstat (limited to 'include/linux/mfd')
| -rw-r--r-- | include/linux/mfd/ti_am335x_tscadc.h | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/include/linux/mfd/ti_am335x_tscadc.h b/include/linux/mfd/ti_am335x_tscadc.h index 25f2c611ab01..4befdb85dd9c 100644 --- a/include/linux/mfd/ti_am335x_tscadc.h +++ b/include/linux/mfd/ti_am335x_tscadc.h | |||
| @@ -125,13 +125,18 @@ | |||
| 125 | #define TOTAL_CHANNELS 8 | 125 | #define TOTAL_CHANNELS 8 |
| 126 | 126 | ||
| 127 | /* | 127 | /* |
| 128 | * ADC runs at 3MHz, and it takes | 128 | * time in us for processing a single channel, calculated as follows: |
| 129 | * 15 cycles to latch one data output. | 129 | * |
| 130 | * Hence the idle time for ADC to | 130 | * num cycles = open delay + (sample delay + conv time) * averaging |
| 131 | * process one sample data would be | 131 | * |
| 132 | * around 5 micro seconds. | 132 | * num cycles: 152 + (1 + 13) * 16 = 376 |
| 133 | */ | 133 | * |
| 134 | #define IDLE_TIMEOUT 5 /* microsec */ | 134 | * clock frequency: 26MHz / 8 = 3.25MHz |
| 135 | * clock period: 1 / 3.25MHz = 308ns | ||
| 136 | * | ||
| 137 | * processing time: 376 * 308ns = 116us | ||
| 138 | */ | ||
| 139 | #define IDLE_TIMEOUT 116 /* microsec */ | ||
| 135 | 140 | ||
| 136 | #define TSCADC_CELLS 2 | 141 | #define TSCADC_CELLS 2 |
| 137 | 142 | ||
