Skip to content

Commit 0155aaf

Browse files
abelvesastorulf
authored andcommitted
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 <[email protected]> Signed-off-by: Abel Vesa <[email protected]> Signed-off-by: Jagadeesh Kona <[email protected]> Reviewed-by: Ulf Hansson <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Reviewed-by: Bjorn Andersson <[email protected]> Reviewed-by: Dhruva Gole <[email protected]> Reviewed-by: Taniya Das <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
1 parent 95f6454 commit 0155aaf

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

drivers/pmdomain/core.c

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3184,6 +3184,15 @@ static void rtpm_status_str(struct seq_file *s, struct device *dev)
31843184
seq_printf(s, "%-25s ", p);
31853185
}
31863186

3187+
static void mode_status_str(struct seq_file *s, struct device *dev)
3188+
{
3189+
struct generic_pm_domain_data *gpd_data;
3190+
3191+
gpd_data = to_gpd_data(dev->power.subsys_data->domain_data);
3192+
3193+
seq_printf(s, "%20s", gpd_data->hw_mode ? "HW" : "SW");
3194+
}
3195+
31873196
static void perf_status_str(struct seq_file *s, struct device *dev)
31883197
{
31893198
struct generic_pm_domain_data *gpd_data;
@@ -3242,6 +3251,7 @@ static int genpd_summary_one(struct seq_file *s,
32423251
seq_printf(s, "\n %-50s ", kobj_path);
32433252
rtpm_status_str(s, pm_data->dev);
32443253
perf_status_str(s, pm_data->dev);
3254+
mode_status_str(s, pm_data->dev);
32453255
kfree(kobj_path);
32463256
}
32473257

@@ -3258,8 +3268,8 @@ static int summary_show(struct seq_file *s, void *data)
32583268
int ret = 0;
32593269

32603270
seq_puts(s, "domain status children performance\n");
3261-
seq_puts(s, " /device runtime status\n");
3262-
seq_puts(s, "----------------------------------------------------------------------------------------------\n");
3271+
seq_puts(s, " /device runtime status managed by\n");
3272+
seq_puts(s, "------------------------------------------------------------------------------------------------------------\n");
32633273

32643274
ret = mutex_lock_interruptible(&gpd_list_lock);
32653275
if (ret)

0 commit comments

Comments
 (0)