From: Axel Lin Date: Mon, 26 Nov 2012 07:26:41 +0000 (+0800) Subject: regulator: da9055: Select maximum current in specific range for set_current_limit X-Git-Tag: omap-for-v3.8/fixes-for-merge-window-v4-signed~35^2~22^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f509fd46c164524d06a33b01a64f9bd2033e4825;p=pandora-kernel.git regulator: da9055: Select maximum current in specific range for set_current_limit Selecting the minimal value is only true for voltage regulators. For current regulators the maximum in the given range should be selected instead. This issue was reported by Heiko Stuebner for gpio-regulator driver [1], and the conclusion is to select the max current for current regulators [2]. [1] https://lkml.org/lkml/2012/8/5/162 [2] https://lkml.org/lkml/2012/8/6/183 This patch also ensures da9055_buck_set_current_limit return -EINVAL when the supported current limit does not meet the request range. Signed-off-by: Axel Lin Signed-off-by: Mark Brown --- Reading git-diff-tree failed