diff options
author | Ashish Jangam <ashish.jangam@kpitcummins.com> | 2012-05-18 06:19:18 -0400 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2012-05-20 11:27:08 -0400 |
commit | 16e5e204c92800aad4e7db52d289565cc82240ce (patch) | |
tree | e32f850cb2b226901d5f6a904fc1ec745ce53e25 /include/linux | |
parent | 21f7541d8861fdcdff663c68903e961ca1b06dc6 (diff) |
mfd: Add ADC support to the DA9052/53 core
This patch adds ADC support to the DA9052/53 core.
Tested on smdkv6410 and i.mx53 QS boards.
Signed-off-by: Ashish Jangam <ashish.jangam@kpitcummins.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/mfd/da9052/da9052.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/linux/mfd/da9052/da9052.h b/include/linux/mfd/da9052/da9052.h index 7ffbd6e9e7fc..b990cca1d9ee 100644 --- a/include/linux/mfd/da9052/da9052.h +++ b/include/linux/mfd/da9052/da9052.h | |||
@@ -33,6 +33,18 @@ | |||
33 | 33 | ||
34 | #include <linux/mfd/da9052/reg.h> | 34 | #include <linux/mfd/da9052/reg.h> |
35 | 35 | ||
36 | /* Common - HWMON Channel Definations */ | ||
37 | #define DA9052_ADC_VDDOUT 0 | ||
38 | #define DA9052_ADC_ICH 1 | ||
39 | #define DA9052_ADC_TBAT 2 | ||
40 | #define DA9052_ADC_VBAT 3 | ||
41 | #define DA9052_ADC_IN4 4 | ||
42 | #define DA9052_ADC_IN5 5 | ||
43 | #define DA9052_ADC_IN6 6 | ||
44 | #define DA9052_ADC_TSI 7 | ||
45 | #define DA9052_ADC_TJUNC 8 | ||
46 | #define DA9052_ADC_VBBAT 9 | ||
47 | |||
36 | #define DA9052_IRQ_DCIN 0 | 48 | #define DA9052_IRQ_DCIN 0 |
37 | #define DA9052_IRQ_VBUS 1 | 49 | #define DA9052_IRQ_VBUS 1 |
38 | #define DA9052_IRQ_DCINREM 2 | 50 | #define DA9052_IRQ_DCINREM 2 |
@@ -79,12 +91,19 @@ struct da9052 { | |||
79 | struct device *dev; | 91 | struct device *dev; |
80 | struct regmap *regmap; | 92 | struct regmap *regmap; |
81 | 93 | ||
94 | struct mutex auxadc_lock; | ||
95 | struct completion done; | ||
96 | |||
82 | int irq_base; | 97 | int irq_base; |
83 | u8 chip_id; | 98 | u8 chip_id; |
84 | 99 | ||
85 | int chip_irq; | 100 | int chip_irq; |
86 | }; | 101 | }; |
87 | 102 | ||
103 | /* ADC API */ | ||
104 | int da9052_adc_manual_read(struct da9052 *da9052, unsigned char channel); | ||
105 | int da9052_adc_read_temp(struct da9052 *da9052); | ||
106 | |||
88 | /* Device I/O API */ | 107 | /* Device I/O API */ |
89 | static inline int da9052_reg_read(struct da9052 *da9052, unsigned char reg) | 108 | static inline int da9052_reg_read(struct da9052 *da9052, unsigned char reg) |
90 | { | 109 | { |