regulator: palmas: fix the ramp delay logic comparison
Laxman Dewangan [Fri, 26 Apr 2013 09:45:53 +0000 (14:45 +0530)]
Change-Id: I4eb8a1f5262c8fc5fbc42f504bc44bebad2a5719
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/223305
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Philip Rakity <prakity@nvidia.com>
GVS: Gerrit_Virtual_Submit

drivers/regulator/palmas-regulator.c

index c55c279..ba64f4f 100644 (file)
@@ -546,9 +546,9 @@ static int palmas_smps_set_ramp_delay(struct regulator_dev *rdev,
 
        if (ramp_delay <= 0)
                reg = 0;
-       else if (ramp_delay < 2500)
+       else if (ramp_delay <= 2500)
                reg = 3;
-       else if (ramp_delay < 5000)
+       else if (ramp_delay <= 5000)
                reg = 2;
        else
                reg = 1;