Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2042443pxk; Sat, 26 Sep 2020 14:34:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyew8aHXkhYPTHlmJ5jiUyqBdyjzuyyNcfmRp/cu4SE2cQEXyqWkOcoupCBKYuoAD++Q7Tt X-Received: by 2002:a17:906:d93b:: with SMTP id rn27mr8989230ejb.330.1601156043543; Sat, 26 Sep 2020 14:34:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601156043; cv=none; d=google.com; s=arc-20160816; b=d07kT9L79zhnDxj3wBRJ0vY1AvRIPVs4KXMsTuidDdWxdzSS/WsmaaYGh0NPQakgLk XFJwPQacdYxBjK9dtbO0q5xUzTR7d+xv6WVcBx6b466lE+PIIpdqV79apT+rfkyAI+Ba egDiemzDmIBVDdO/NXthCakhx6aFjyaFF8WUKmApqGVx6+Gqb8e5dgvaeijMUbi+5guR q8o2FpzMH84QUpeAyNg+/vOJvQbH4Z3wXKPSne1+Infkj0Ioo5BrD2eu5ViW17YJJy/c /ejkH2F58m4IbX8KlDJMOTTRA6iV3NXU6a69qMAW9UpPLWvBmT43CB9bcGIKWyco79q2 umYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:content-transfer-encoding:mime-version :subject:from:references:in-reply-to:message-id:date:dkim-signature; bh=7w0dJSiEihsPUo5W7Odw1/t1/YZcd4BaZ/tQ9o4l46c=; b=MzLvT8cBD1AkeETWAXSx9CYpGdyaY5pdGw6802EGOT0Vcmgfij1NJKKm6uKgceJRnZ WRLua+y/c+zxcjCM+HQldL7AcbKY5lmQFEmerQUlrKjpPbvz5Tig4dAGbeX2AV9pU+h5 q52kPNF7aRRhrpfqmITbEkDwNaP3PwWPWXVZylRBgImcD6ftV7gkgP/ZqKpZz4Segw4s zR2yEY7/BfamoCxIaR1AP24qumer5Gf+7RFzIaIMNBASrqj0Uneeo0t/xkNO6Ge6i1Wy kWIUfC2G0kqPNRCJmMsq1Yqe0jmytUjxQmzcT40ZNUUmyGMJYWvlcmEDT2fN+4XZd7Gf wQcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rere.qmqm.pl header.s=1 header.b=Pd83FPjq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a9si4805954edr.259.2020.09.26.14.33.39; Sat, 26 Sep 2020 14:34:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@rere.qmqm.pl header.s=1 header.b=Pd83FPjq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726794AbgIZVcm (ORCPT + 99 others); Sat, 26 Sep 2020 17:32:42 -0400 Received: from rere.qmqm.pl ([91.227.64.183]:10287 "EHLO rere.qmqm.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726382AbgIZVcl (ORCPT ); Sat, 26 Sep 2020 17:32:41 -0400 Received: from remote.user (localhost [127.0.0.1]) by rere.qmqm.pl (Postfix) with ESMTPSA id 4BzMSm4MNsz2KH; Sat, 26 Sep 2020 23:32:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rere.qmqm.pl; s=1; t=1601155960; bh=QJ7FZ09SHYhjsXh8zlUuxlRrtk0GOw387uUyUheheac=; h=Date:In-Reply-To:References:From:Subject:To:Cc:From; b=Pd83FPjqNQO68JLmPWLMguU9zabsmh0pkmyk/zqvrWrOdb4ssCRt2eU0//mLeE7Kf ogcgSpIEJ7qTetvGLJm4sMOdu+8kjYBr8JdYh0kfpAgom2pL4TqTKVmpGGe/pCjRca 4BficF2zvXA3w8gabj2v4r/islPvyzXR48NkOilYLSffNR/a0Zt1hiFt7ixhib2lug mxxDTtUx2JOW9lgmaXw97R4hSxJCbkt+akauQLWSvhYoC5fQVVTNeqp7lNALypLxHp MM+RfBIeK5Lpac+itBU8CFK3tPg3hEtKgzVrXoBI4m3oIwwVZn63rTh5VrFAdS+gJM HhvuFk1DEQQxA== X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.102.4 at mail Date: Sat, 26 Sep 2020 23:32:40 +0200 Message-Id: <53c4f3d394d68f0989174f89e3b0882cebbbd787.1601155770.git.mirq-linux@rere.qmqm.pl> In-Reply-To: References: From: =?UTF-8?q?Micha=C5=82=20Miros=C5=82aw?= Subject: [PATCH 1/3] regulator: print state at boot MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To: Liam Girdwood , Mark Brown , Jon Hunter Cc: linux-kernel@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Make the initial state of the regulator shown when debugging. Signed-off-by: Michał Mirosław --- drivers/regulator/core.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 9238613a8c26..bf88d74f5401 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -1114,10 +1114,15 @@ static void print_constraints(struct regulator_dev *rdev) if (constraints->valid_modes_mask & REGULATOR_MODE_IDLE) count += scnprintf(buf + count, len - count, "idle "); if (constraints->valid_modes_mask & REGULATOR_MODE_STANDBY) - count += scnprintf(buf + count, len - count, "standby"); + count += scnprintf(buf + count, len - count, "standby "); if (!count) - scnprintf(buf, len, "no parameters"); + count = scnprintf(buf, len, "no parameters"); + else + --count; + + count += scnprintf(buf + count, len - count, ", %s", + _regulator_is_enabled(rdev) ? "enabled" : "disabled"); rdev_dbg(rdev, "%s\n", buf); -- 2.20.1