[PATCH] mfd: Fixed unconditional reset of the ADC reading enable bits

Uwe Kleine-König u.kleine-koenig at pengutronix.de
Thu Nov 24 09:37:33 EST 2011


On Thu, Nov 24, 2011 at 11:56:00AM +0100, Robin van der Gracht wrote:
> 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 at protonic.nl>
> ---
> [...]
>  	case MC13XXX_ADC_MODE_SINGLE_CHAN:
> -		adc0 |= old_adc0 & MC13XXX_ADC0_TSMOD_MASK;
> +		adc0 |= old_adc0 & (MC13XXX_ADC0_TSMOD_MASK |
> +			MC13XXX_ADC0_EN_READING_MASK);
Maybe also put MC13XXX_ADC0_TSMOD_MASK into MC13XXX_ADC0_EN_READING_MASK
and only use the latter here?

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |



More information about the linux-arm-kernel mailing list