aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd
diff options
context:
space:
mode:
authorRobin van der Gracht <robin@protonic.nl>2011-11-29 06:09:03 -0500
committerSamuel Ortiz <sameo@linux.intel.com>2012-01-08 18:37:33 -0500
commit2161891a0a7bcad6ee8819bb324ee4a031bc8a95 (patch)
tree99fdd22dd2e0c8e1f24a573ca80ea5766aaf1839 /drivers/mfd
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 'drivers/mfd')
-rw-r--r--drivers/mfd/mc13xxx-core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mfd/mc13xxx-core.c b/drivers/mfd/mc13xxx-core.c
index 441738048458..d0d3dfafba5c 100644
--- a/drivers/mfd/mc13xxx-core.c
+++ b/drivers/mfd/mc13xxx-core.c
@@ -615,13 +615,13 @@ int mc13xxx_adc_do_conversion(struct mc13xxx *mc13xxx, unsigned int mode,
615 break; 615 break;
616 616
617 case MC13XXX_ADC_MODE_SINGLE_CHAN: 617 case MC13XXX_ADC_MODE_SINGLE_CHAN:
618 adc0 |= old_adc0 & MC13XXX_ADC0_TSMOD_MASK; 618 adc0 |= old_adc0 & MC13XXX_ADC0_CONFIG_MASK;
619 adc1 |= (channel & 0x7) << MC13XXX_ADC1_CHAN0_SHIFT; 619 adc1 |= (channel & 0x7) << MC13XXX_ADC1_CHAN0_SHIFT;
620 adc1 |= MC13XXX_ADC1_RAND; 620 adc1 |= MC13XXX_ADC1_RAND;
621 break; 621 break;
622 622
623 case MC13XXX_ADC_MODE_MULT_CHAN: 623 case MC13XXX_ADC_MODE_MULT_CHAN:
624 adc0 |= old_adc0 & MC13XXX_ADC0_TSMOD_MASK; 624 adc0 |= old_adc0 & MC13XXX_ADC0_CONFIG_MASK;
625 adc1 |= 4 << MC13XXX_ADC1_CHAN1_SHIFT; 625 adc1 |= 4 << MC13XXX_ADC1_CHAN1_SHIFT;
626 break; 626 break;
627 627