On Thu, Dec 22, 2011 at 11:33:38AM +0000, Mark Brown wrote:
On Wed, Dec 21, 2011 at 05:03:31PM +0800, Ying-Chun Liu (PaulLiu) wrote:
- if (anatop_reg->rdata->control_reg) {
val = anatop_reg->rdata->min_bit_val +
(uv - reg->constraints->min_uV) / 25000;
You're not checking that the resulting voltage matches the constraints or updating selector.
Also on re-reading this looks *very* broken - you're using the constraints value in your set_voltage() operation. The runtime constraints a system has should have *no* impact on the way you ask for a specific voltage from the regulator.