Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Abel Vesa and committed by
Ulf Hansson
0155aaf9 95f6454d

+12 -2
+12 -2
drivers/pmdomain/core.c
··· 3184 3184 seq_printf(s, "%-25s ", p); 3185 3185 } 3186 3186 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 + 3187 3196 static void perf_status_str(struct seq_file *s, struct device *dev) 3188 3197 { 3189 3198 struct generic_pm_domain_data *gpd_data; ··· 3251 3242 seq_printf(s, "\n %-50s ", kobj_path); 3252 3243 rtpm_status_str(s, pm_data->dev); 3253 3244 perf_status_str(s, pm_data->dev); 3245 + mode_status_str(s, pm_data->dev); 3254 3246 kfree(kobj_path); 3255 3247 } 3256 3248 ··· 3268 3258 int ret = 0; 3269 3259 3270 3260 seq_puts(s, "domain status children performance\n"); 3271 - seq_puts(s, " /device runtime status\n"); 3272 - seq_puts(s, "----------------------------------------------------------------------------------------------\n"); 3261 + seq_puts(s, " /device runtime status managed by\n"); 3262 + seq_puts(s, "------------------------------------------------------------------------------------------------------------\n"); 3273 3263 3274 3264 ret = mutex_lock_interruptible(&gpd_list_lock); 3275 3265 if (ret)