summaryrefslogtreecommitdiff
path: root/include/math-emu
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2018-12-11 16:39:36 +0530
committerViresh Kumar <viresh.kumar@linaro.org>2018-12-11 16:51:56 +0530
commit46f48aca2e5aef3f430e95d1a5fb68227ec8ec85 (patch)
tree0b4df41cec1365e38ee62495fa59da07363777e8 /include/math-emu
parent90e3577b5feb42bac1269e16bb3d2bdd8f6df40f (diff)
OPP: Fix missing debugfs supply directory for OPPs
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. Fixes: 1fae788ed640 ("PM / OPP: Don't create debugfs "supply-0" directory unnecessarily") Reported-by: Quentin Perret <quentin.perret@arm.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Diffstat (limited to 'include/math-emu')
0 files changed, 0 insertions, 0 deletions