summaryrefslogtreecommitdiff
path: root/include/linux/mfd/mc13xxx.h
diff options
context:
space:
mode:
authorRobin van der Gracht <robin@protonic.nl>2011-11-29 12:09:03 +0100
committerSamuel Ortiz <sameo@linux.intel.com>2012-01-09 00:37:33 +0100
commit2161891a0a7bcad6ee8819bb324ee4a031bc8a95 (patch)
tree99fdd22dd2e0c8e1f24a573ca80ea5766aaf1839 /include/linux/mfd/mc13xxx.h
parent99f09bebbe4e9e008a4e0555340494840c6bd644 (diff)
mfd: Fixed unconditional reset of the mc13xxx ADC reading enable bits
When the ADC is being prepared for a single or multiple channel reading, the adc0 register is reconfigured without taking the lithium cell, charge current and battery current reading enable bits into account. Which results in clearing the bits. Signed-off-by: Robin van der Gracht <robin@protonic.nl> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'include/linux/mfd/mc13xxx.h')
-rw-r--r--include/linux/mfd/mc13xxx.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/mfd/mc13xxx.h b/include/linux/mfd/mc13xxx.h
index 3816c2fac0a..261fc117b40 100644
--- a/include/linux/mfd/mc13xxx.h
+++ b/include/linux/mfd/mc13xxx.h
@@ -173,6 +173,9 @@ struct mc13xxx_platform_data {
#define MC13XXX_ADC_MODE_MULT_CHAN 3
#define MC13XXX_ADC0 43
+#define MC13XXX_ADC0_LICELLCON (1 << 0)
+#define MC13XXX_ADC0_CHRGICON (1 << 1)
+#define MC13XXX_ADC0_BATICON (1 << 2)
#define MC13XXX_ADC0_ADREFEN (1 << 10)
#define MC13XXX_ADC0_TSMOD0 (1 << 12)
#define MC13XXX_ADC0_TSMOD1 (1 << 13)
@@ -184,4 +187,9 @@ struct mc13xxx_platform_data {
MC13XXX_ADC0_TSMOD1 | \
MC13XXX_ADC0_TSMOD2)
+#define MC13XXX_ADC0_CONFIG_MASK (MC13XXX_ADC0_TSMOD_MASK | \
+ MC13XXX_ADC0_LICELLCON | \
+ MC13XXX_ADC0_CHRGICON | \
+ MC13XXX_ADC0_BATICON)
+
#endif /* ifndef __LINUX_MFD_MC13XXX_H */