diff options
author | Laxman Dewangan <ldewangan@nvidia.com> | 2014-04-09 15:17:37 +0530 |
---|---|---|
committer | Laxman Dewangan <ldewangan@nvidia.com> | 2014-04-09 05:07:02 -0700 |
commit | f3fd7cec451d052b89fc567b04dd15a1940b9810 (patch) | |
tree | c0812cc9b74b56c8937b682bbd3ad4644886f71a /drivers/regulator | |
parent | 1c54928245e4e935082aad366e8a784edc079faa (diff) |
regulator: core: print ramp delay when printing constraints
Print ramp delay when printing constraints of the regulator to provide
more information on log.
Change-Id: Iaef993a33754b7579598adb04209ab9bd6426cac
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/394049
Diffstat (limited to 'drivers/regulator')
-rw-r--r-- | drivers/regulator/core.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index ed5d1bec3436..c097ab289e78 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -919,7 +919,8 @@ static int suspend_prepare(struct regulator_dev *rdev, suspend_state_t state) static void print_constraints(struct regulator_dev *rdev) { struct regulation_constraints *constraints = rdev->constraints; - char buf[80] = ""; + unsigned int ramp_delay = 0; + char buf[110] = ""; int count = 0; int ret; @@ -972,7 +973,15 @@ static void print_constraints(struct regulator_dev *rdev) if (constraints->valid_modes_mask & REGULATOR_MODE_IDLE) count += sprintf(buf + count, "idle "); if (constraints->valid_modes_mask & REGULATOR_MODE_STANDBY) - count += sprintf(buf + count, "standby"); + count += sprintf(buf + count, "standby "); + + if (rdev->constraints->ramp_delay) + ramp_delay = rdev->constraints->ramp_delay; + else if (rdev->desc->ramp_delay) + ramp_delay = rdev->desc->ramp_delay; + if (ramp_delay) + count += sprintf(buf + count, "with ramp delay %u uV/us ", + ramp_delay); if (!count) sprintf(buf, "no parameters"); |