platform/x86: intel_pmc_core: Fix the slp_s0 counter displayed value
authorGayatri Kammela <gayatri.kammela@intel.com>
Tue, 6 Oct 2020 22:47:02 +0000 (15:47 -0700)
committerHans de Goede <hdegoede@redhat.com>
Wed, 7 Oct 2020 21:06:29 +0000 (23:06 +0200)
commit025f26de7fa0fc40c8baf6c19fb273500f3321f0
tree8c9a2a1e384c158cb2fc4c3370e015801caa8f67
parent652036bd5be0ac94fd1db851d72ece8ee133c74d
platform/x86: intel_pmc_core: Fix the slp_s0 counter displayed value

slp_s0 counter value displayed via debugfs interface is calculated by
multiplying the granularity for crystal oscillator tick as 100us with
the value read from using slp_s0 offset. But the granularity of the tick
varies from platform to platform and it needs to be fixed.

Hence, specify granularity of the tick for each platform, so that the
value of the slp_s0 counter is accurate.

Signed-off-by: Gayatri Kammela <gayatri.kammela@intel.com>
Signed-off-by: David E. Box <david.e.box@linux.intel.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20201006224702.12697-4-david.e.box@linux.intel.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/intel_pmc_core.c
drivers/platform/x86/intel_pmc_core.h