Skip to content

Commit

Permalink
regulator: core: Log forbidden DRMS operation
Browse files Browse the repository at this point in the history
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
8a34e97 ("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>
  • Loading branch information
mwgonzalez authored and broonie committed Feb 21, 2019
1 parent 921b2b3 commit 74a569e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/regulator/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 74a569e

Please sign in to comment.