commit | 94e85a3c5d702a4ce96b7a9b883c949a08ebd93c | [log] [tgz] |
---|---|---|
author | Axel Lin <axel.lin@gmail.com> | Fri Apr 13 09:30:05 2012 +0800 |
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | Mon Apr 23 13:18:10 2012 +0100 |
tree | 96d4d9bcc1e06d67ba5eef89eb6f6ce976d6a274 | |
parent | b9b49af5efa405f3c394a6395e79092c785999a3 [diff] |
regulator: s5m8767: Use DIV_ROUND_UP to calculate selector Integer division may truncate the result. Use DIV_ROUND_UP to ensure new voltage setting falls within specified range. Also properly handle the case min_vol < desc->min to ensure we don't return negative value for selector. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>