aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGayatri Kammela <[email protected]>2019-12-12 10:38:45 -0800
committerAndy Shevchenko <[email protected]>2019-12-20 19:02:59 +0200
commit6268c0b278b57657a1b9919b02625a2b2ae2120b (patch)
tree77e5f96276b83df69f6b363f6a81bab3388831b6
parente3985478183019bf41b40c44049333bf74b26fc3 (diff)
platform/x86: intel_pmc_core: Make debugfs entry for pch_ip_power_gating_status conditional
Check if the platform supports and only then add a debugfs entry for PCH IP power gating status. Cc: Peter Zijlstra <[email protected]> Cc: Srinivas Pandruvada <[email protected]> Cc: Andy Shevchenko <[email protected]> Cc: Kan Liang <[email protected]> Cc: David E. Box <[email protected]> Cc: Rajneesh Bhardwaj <[email protected]> Cc: Tony Luck <[email protected]> Reviewed-by: Tony Luck <[email protected]> Signed-off-by: Gayatri Kammela <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]>
-rw-r--r--drivers/platform/x86/intel_pmc_core.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/platform/x86/intel_pmc_core.c b/drivers/platform/x86/intel_pmc_core.c
index f8f8861a2065..eb22c2f84cef 100644
--- a/drivers/platform/x86/intel_pmc_core.c
+++ b/drivers/platform/x86/intel_pmc_core.c
@@ -789,8 +789,9 @@ static void pmc_core_dbgfs_register(struct pmc_dev *pmcdev)
debugfs_create_file("slp_s0_residency_usec", 0444, dir, pmcdev,
&pmc_core_dev_state);
- debugfs_create_file("pch_ip_power_gating_status", 0444, dir, pmcdev,
- &pmc_core_ppfear_fops);
+ if (pmcdev->map->pfear_sts)
+ debugfs_create_file("pch_ip_power_gating_status", 0444, dir,
+ pmcdev, &pmc_core_ppfear_fops);
debugfs_create_file("ltr_ignore", 0644, dir, pmcdev,
&pmc_core_ltr_ignore_ops);