platform/x86: intel_pmc_core: Make pmc_core_lpm_display() generic for platforms that...
authorGayatri Kammela <gayatri.kammela@intel.com>
Tue, 3 Mar 2020 21:28:08 +0000 (13:28 -0800)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Fri, 20 Mar 2020 12:47:01 +0000 (14:47 +0200)
commit267fc714cab797574a3a9df2074f05c3cdeb2511
tree12f82a012c4631130336e31c9e1e565a992c9c44
parent9945a2479893682bee8ae46e2ce5f180d4f6b1b2
platform/x86: intel_pmc_core: Make pmc_core_lpm_display() generic for platforms that support sub-states

Currently pmc_core_lpm_display() uses an array of the struct pointers,
i.e.  tgl_lpm_maps for Tiger Lake directly to iterate through and to get
the number of (live) status registers which is hard coded and can not
be re-used for the future platforms that support sub-states. To maintain
readability, make pmc_core_lpm_display() generic, so that it can be re-used
for future platforms.

Cc: Chen Zhou <chenzhou10@huawei.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: David E. Box <david.e.box@intel.com>
Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Gayatri Kammela <gayatri.kammela@intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/platform/x86/intel_pmc_core.c