From patchwork Thu Feb 21 11:55:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Gonzalez X-Patchwork-Id: 10823969 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 38AEC6C2 for ; Thu, 21 Feb 2019 11:55:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 25A973044A for ; Thu, 21 Feb 2019 11:55:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1963430531; Thu, 21 Feb 2019 11:55:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,FREEMAIL_FROM, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ED1BB3044A for ; Thu, 21 Feb 2019 11:55:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725932AbfBULzY (ORCPT ); Thu, 21 Feb 2019 06:55:24 -0500 Received: from ns.iliad.fr ([212.27.33.1]:41980 "EHLO ns.iliad.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725820AbfBULzY (ORCPT ); Thu, 21 Feb 2019 06:55:24 -0500 Received: from ns.iliad.fr (localhost [127.0.0.1]) by ns.iliad.fr (Postfix) with ESMTP id 8AA252044A; Thu, 21 Feb 2019 12:55:22 +0100 (CET) Received: from [192.168.108.68] (freebox.vlq16.iliad.fr [213.36.7.13]) by ns.iliad.fr (Postfix) with ESMTP id 6C39920187; Thu, 21 Feb 2019 12:55:22 +0100 (CET) Subject: [PATCH v2] regulator: core: Log forbidden DRMS operation To: Mark Brown , Liam Girdwood Cc: LKML , MSM , Bjorn Andersson , Jeffrey Hugo , Evan Green , Douglas Anderson References: <6e471922-2850-97b8-c555-34e1708cbc38@free.fr> <20190219163929.GA20883@sirena.org.uk> <5ad87a46-147f-0619-29b9-bd352810ade8@free.fr> <20190221101238.GB5970@sirena.org.uk> From: Marc Gonzalez Message-ID: <251e00c8-40f4-1712-f732-1351361f667a@free.fr> Date: Thu, 21 Feb 2019 12:55:22 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <20190221101238.GB5970@sirena.org.uk> Content-Language: en-US X-Virus-Scanned: ClamAV using ClamSMTP ; ns.iliad.fr ; Thu Feb 21 12:55:22 2019 +0100 (CET) Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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..64f91cf21846 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_dbg(rdev, "DRMS operation not allowed\n"); return 0; + } if (!rdev->desc->ops->get_optimum_mode && !rdev->desc->ops->set_load)