[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190926192603.18647-4-gayatri.kammela@intel.com>
Date: Thu, 26 Sep 2019 12:26:01 -0700
From: Gayatri Kammela <gayatri.kammela@...el.com>
To: platform-driver-x86@...r.kernel.org
Cc: vishwanath.somayaji@...el.com, dvhart@...radead.org,
linux-kernel@...r.kernel.org, charles.d.prestopine@...el.com,
Gayatri Kammela <gayatri.kammela@...el.com>,
Peter Zijlstra <peterz@...radead.org>,
Srinivas Pandruvada <srinivas.pandruvada@...el.com>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Kan Liang <kan.liang@...el.com>,
"David E . Box" <david.e.box@...el.com>,
Rajneesh Bhardwaj <rajneesh.bhardwaj@...el.com>,
Tony Luck <tony.luck@...el.com>
Subject: [PATCH v1 3/5] 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 <peterz@...radead.org>
Cc: Srinivas Pandruvada <srinivas.pandruvada@...el.com>
Cc: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: Kan Liang <kan.liang@...el.com>
Cc: David E. Box <david.e.box@...el.com>
Cc: Rajneesh Bhardwaj <rajneesh.bhardwaj@...el.com>
Cc: Tony Luck <tony.luck@...el.com>
Reviewed-by: Tony Luck <tony.luck@...el.com>
Signed-off-by: Gayatri Kammela <gayatri.kammela@...el.com>
---
drivers/platform/x86/intel_pmc_core.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/platform/x86/intel_pmc_core.c b/drivers/platform/x86/intel_pmc_core.c
index c6a0c29d3476..ea43a5989c96 100644
--- a/drivers/platform/x86/intel_pmc_core.c
+++ b/drivers/platform/x86/intel_pmc_core.c
@@ -788,8 +788,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);
--
2.17.1
Powered by blists - more mailing lists