mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v1] regulator: core: Log forbidden DRMS operation
@ 2019-02-19 16:02 Marc Gonzalez
  2019-02-19 16:39 ` Mark Brown
  0 siblings, 1 reply; 6+ messages in thread
From: Marc Gonzalez @ 2019-02-19 16:02 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood
  Cc: LKML, MSM, Bjorn Andersson, Jeffrey Hugo, Evan Green, Douglas Anderson

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 as KERN_INFO, because it is very
useful to diagnose missing regulator-allow-set-load properties.

Signed-off-by: Marc Gonzalez <marc.w.gonzalez@free.fr>
---
 drivers/regulator/core.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 59782a706ac4..2ff9b55cfcd8 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -930,8 +930,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_info(rdev, "DRMS operation not allowed\n");
 		return 0;
+	}
 
 	if (!rdev->desc->ops->get_optimum_mode &&
 	    !rdev->desc->ops->set_load)
-- 
2.17.1

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-02-21 11:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-19 16:02 [PATCH v1] regulator: core: Log forbidden DRMS operation Marc Gonzalez
2019-02-19 16:39 ` Mark Brown
2019-02-21  9:37   ` Marc Gonzalez
2019-02-21  9:42   ` Marc Gonzalez
2019-02-21 10:12     ` Mark Brown
2019-02-21 11:55       ` [PATCH v2] " Marc Gonzalez

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®