platform/x86/amd: pmc: Report duration of time in hw sleep state
authorMario Limonciello <mario.limonciello@amd.com>
Mon, 17 Apr 2023 15:27:06 +0000 (10:27 -0500)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 20 Apr 2023 17:06:12 +0000 (19:06 +0200)
commit09f5df3fb82fd444296e248f90dd29288e82d3a3
treecab2e9cbcfb5ddb4b07b77cca660505263f10cf3
parentb52124a78ab34eb0754e32edc0c9996937779176
platform/x86/amd: pmc: Report duration of time in hw sleep state

amd_pmc displays a warning when a suspend didn't get to the deepest
state and a dynamic debugging message with the duration if it did.

Rather than logging to dynamic debugging the duration spent in the
deepest state, report this to the standard kernel reporting
infrastructure so that userspace software can query after the
suspend cycle is done.

Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/platform/x86/amd/pmc.c