All of lore.kernel.org
 help / color / mirror / Atom feed
From: Quentin Perret <quentin.perret@arm.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Viresh Kumar <vireshk@kernel.org>, Nishanth Menon <nm@ti.com>,
	Stephen Boyd <sboyd@kernel.org>,
	linux-pm@vger.kernel.org,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Rafael Wysocki <rjw@rjwysocki.net>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] OPP: Fix missing debugfs supply directory for OPPs
Date: Tue, 11 Dec 2018 13:48:32 +0000	[thread overview]
Message-ID: <20181211134829.nct4uqvofn332yxp@queper01-lin> (raw)
In-Reply-To: <46f48aca2e5aef3f430e95d1a5fb68227ec8ec85.1544527580.git.viresh.kumar@linaro.org>

On Tuesday 11 Dec 2018 at 16:56:29 (+0530), Viresh Kumar wrote:
> There is one case where we may end up with no "supply" directory for the
> OPPs in debugfs. That happens when the OPP core isn't managing the
> regulators for the device and the device's OPP do have microvolt
> property. It happens because the opp_table->regulator_count remains set
> to 0 and the debugfs routines don't add any supply directory in such a
> case.
> 
> This commit fixes that by setting opp_table->regulator_count to 1 in
> that particular case. But to make everything work nicely and not break
> other parts of the core, regulator_count is defined as "int" now instead
> of "unsigned int" and it can have different special values now. It is
> set to -1 initially to mark it "uninitialized" and later only we set it
> to 0 or positive values after checking how many supplies are there.
> 
> This also helps in finding the bugs where only few of the OPPs have the
> "opp-microvolt" property set and not all.

Tested on Juno r0 and Hikey960 successfully. The 'supply' directory is
now correctly exposed.

Feel free to add Tested-by: Quentin Perret <quentin.perret@arm.com>

Thanks,
Quentin

  reply	other threads:[~2018-12-11 13:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-11 11:26 [PATCH 1/2] OPP: Use opp_table->regulators to verify no regulator case Viresh Kumar
2018-12-11 11:26 ` [PATCH 2/2] OPP: Fix missing debugfs supply directory for OPPs Viresh Kumar
2018-12-11 13:48   ` Quentin Perret [this message]
2018-12-12  4:47     ` Viresh Kumar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181211134829.nct4uqvofn332yxp@queper01-lin \
    --to=quentin.perret@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=nm@ti.com \
    --cc=rjw@rjwysocki.net \
    --cc=sboyd@kernel.org \
    --cc=vincent.guittot@linaro.org \
    --cc=viresh.kumar@linaro.org \
    --cc=vireshk@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.