diff options
author | Marc Gonzalez <marc.w.gonzalez@free.fr> | 2019-02-21 12:55:22 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-02-21 18:53:37 +0000 |
commit | 74a569ee4c452e2a1c997f034837ddae500734ca (patch) | |
tree | a23b930f6a9f733b2f5576d2d1a43e3155c29c3d /drivers/regulator/core.c | |
parent | 921b2b3acc0664e1c78b6d9e383be224de74103d (diff) | |
download | linux-74a569ee4c452e2a1c997f034837ddae500734ca.tar.gz linux-74a569ee4c452e2a1c997f034837ddae500734ca.tar.bz2 linux-74a569ee4c452e2a1c997f034837ddae500734ca.zip |
regulator: core: Log forbidden DRMS operation
When REGULATOR_CHANGE_DRMS is not set, drms_uA_update is a no-op.
It used to print a debug message, which was dropped in commit
8a34e979f684 ("regulator: refactor valid_ops_mask checking code")
Let's bring the debug message back, because it helps find missing
regulator-allow-set-load properties.
Signed-off-by: Marc Gonzalez <marc.w.gonzalez@free.fr>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator/core.c')
-rw-r--r-- | drivers/regulator/core.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 9cf09666616f..68473d0cc57e 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -918,8 +918,10 @@ static int drms_uA_update(struct regulator_dev *rdev) * first check to see if we can set modes at all, otherwise just * tell the consumer everything is OK. */ - if (!regulator_ops_is_valid(rdev, REGULATOR_CHANGE_DRMS)) + if (!regulator_ops_is_valid(rdev, REGULATOR_CHANGE_DRMS)) { + rdev_dbg(rdev, "DRMS operation not allowed\n"); return 0; + } if (!rdev->desc->ops->get_optimum_mode && !rdev->desc->ops->set_load) |