mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
PM: domains: Add the domain HW-managed mode to the summary
Now that genpd supports dynamically switching the control for an attached device between hardware- and software-mode, let's add this information to the genpd summary under managed by column in debugfs. Suggested-by: Taniya Das <quic_tdas@quicinc.com> Signed-off-by: Abel Vesa <abel.vesa@linaro.org> Signed-off-by: Jagadeesh Kona <quic_jkona@quicinc.com> Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Bjorn Andersson <andersson@kernel.org> Reviewed-by: Dhruva Gole <d-gole@ti.com> Reviewed-by: Taniya Das <quic_tdas@quicinc.com> Link: https://lore.kernel.org/r/20240624044809.17751-3-quic_jkona@quicinc.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
This commit is contained in:
parent
95f6454da9
commit
0155aaf95a
1 changed files with 12 additions and 2 deletions
|
@ -3184,6 +3184,15 @@ static void rtpm_status_str(struct seq_file *s, struct device *dev)
|
||||||
seq_printf(s, "%-25s ", p);
|
seq_printf(s, "%-25s ", p);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void mode_status_str(struct seq_file *s, struct device *dev)
|
||||||
|
{
|
||||||
|
struct generic_pm_domain_data *gpd_data;
|
||||||
|
|
||||||
|
gpd_data = to_gpd_data(dev->power.subsys_data->domain_data);
|
||||||
|
|
||||||
|
seq_printf(s, "%20s", gpd_data->hw_mode ? "HW" : "SW");
|
||||||
|
}
|
||||||
|
|
||||||
static void perf_status_str(struct seq_file *s, struct device *dev)
|
static void perf_status_str(struct seq_file *s, struct device *dev)
|
||||||
{
|
{
|
||||||
struct generic_pm_domain_data *gpd_data;
|
struct generic_pm_domain_data *gpd_data;
|
||||||
|
@ -3242,6 +3251,7 @@ static int genpd_summary_one(struct seq_file *s,
|
||||||
seq_printf(s, "\n %-50s ", kobj_path);
|
seq_printf(s, "\n %-50s ", kobj_path);
|
||||||
rtpm_status_str(s, pm_data->dev);
|
rtpm_status_str(s, pm_data->dev);
|
||||||
perf_status_str(s, pm_data->dev);
|
perf_status_str(s, pm_data->dev);
|
||||||
|
mode_status_str(s, pm_data->dev);
|
||||||
kfree(kobj_path);
|
kfree(kobj_path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3258,8 +3268,8 @@ static int summary_show(struct seq_file *s, void *data)
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
seq_puts(s, "domain status children performance\n");
|
seq_puts(s, "domain status children performance\n");
|
||||||
seq_puts(s, " /device runtime status\n");
|
seq_puts(s, " /device runtime status managed by\n");
|
||||||
seq_puts(s, "----------------------------------------------------------------------------------------------\n");
|
seq_puts(s, "------------------------------------------------------------------------------------------------------------\n");
|
||||||
|
|
||||||
ret = mutex_lock_interruptible(&gpd_list_lock);
|
ret = mutex_lock_interruptible(&gpd_list_lock);
|
||||||
if (ret)
|
if (ret)
|
||||||
|
|
Loading…
Add table
Reference in a new issue