diff options
| author | Patil, Rachna <rachna@ti.com> | 2012-10-16 03:25:45 -0400 |
|---|---|---|
| committer | Samuel Ortiz <sameo@linux.intel.com> | 2012-11-05 17:50:27 -0500 |
| commit | 5e53a69b44e893227b046a7bc74db3cb40d7f39b (patch) | |
| tree | 4586fb856eb6709e40df4c38b0840177adbf4d7c /include/linux | |
| parent | 2b99bafab19145a72e2c557326fc4662a864a162 (diff) | |
IIO : ADC: tiadc: Add support of TI's ADC driver
This patch adds support for TI's ADC driver.
This is a multifunctional device.
Analog input lines are provided on which
voltage measurements can be carried out.
You can have upto 8 input lines.
Signed-off-by: Patil, Rachna <rachna@ti.com>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/mfd/ti_am335x_tscadc.h | 9 | ||||
| -rw-r--r-- | include/linux/platform_data/ti_am335x_adc.h | 14 |
2 files changed, 22 insertions, 1 deletions
diff --git a/include/linux/mfd/ti_am335x_tscadc.h b/include/linux/mfd/ti_am335x_tscadc.h index fc18b2ef753..c79ad5d2f27 100644 --- a/include/linux/mfd/ti_am335x_tscadc.h +++ b/include/linux/mfd/ti_am335x_tscadc.h | |||
| @@ -120,15 +120,19 @@ | |||
| 120 | 120 | ||
| 121 | #define ADC_CLK 3000000 | 121 | #define ADC_CLK 3000000 |
| 122 | #define MAX_CLK_DIV 7 | 122 | #define MAX_CLK_DIV 7 |
| 123 | #define TOTAL_STEPS 16 | ||
| 124 | #define TOTAL_CHANNELS 8 | ||
| 123 | 125 | ||
| 124 | #define TSCADC_CELLS 1 | 126 | #define TSCADC_CELLS 2 |
| 125 | 127 | ||
| 126 | enum tscadc_cells { | 128 | enum tscadc_cells { |
| 127 | TSC_CELL, | 129 | TSC_CELL, |
| 130 | ADC_CELL, | ||
| 128 | }; | 131 | }; |
| 129 | 132 | ||
| 130 | struct mfd_tscadc_board { | 133 | struct mfd_tscadc_board { |
| 131 | struct tsc_data *tsc_init; | 134 | struct tsc_data *tsc_init; |
| 135 | struct adc_data *adc_init; | ||
| 132 | }; | 136 | }; |
| 133 | 137 | ||
| 134 | struct ti_tscadc_dev { | 138 | struct ti_tscadc_dev { |
| @@ -140,6 +144,9 @@ struct ti_tscadc_dev { | |||
| 140 | 144 | ||
| 141 | /* tsc device */ | 145 | /* tsc device */ |
| 142 | struct titsc *tsc; | 146 | struct titsc *tsc; |
| 147 | |||
| 148 | /* adc device */ | ||
| 149 | struct adc_device *adc; | ||
| 143 | }; | 150 | }; |
| 144 | 151 | ||
| 145 | #endif | 152 | #endif |
diff --git a/include/linux/platform_data/ti_am335x_adc.h b/include/linux/platform_data/ti_am335x_adc.h new file mode 100644 index 00000000000..e41d5834cb8 --- /dev/null +++ b/include/linux/platform_data/ti_am335x_adc.h | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | #ifndef __LINUX_TI_AM335X_ADC_H | ||
| 2 | #define __LINUX_TI_AM335X_ADC_H | ||
| 3 | |||
| 4 | /** | ||
| 5 | * struct adc_data ADC Input information | ||
| 6 | * @adc_channels: Number of analog inputs | ||
| 7 | * available for ADC. | ||
| 8 | */ | ||
| 9 | |||
| 10 | struct adc_data { | ||
| 11 | unsigned int adc_channels; | ||
| 12 | }; | ||
| 13 | |||
| 14 | #endif | ||
