cpufreq: amd-pstate: Add resume and suspend callbacks
authorJinzhou Su <Jinzhou.Su@amd.com>
Thu, 23 Jun 2022 03:15:09 +0000 (11:15 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 23 Jun 2022 19:19:52 +0000 (21:19 +0200)
commitb376471fb47d4905e72fe73e9eeed228f8f2f230
tree1355a1ee0465d58d019094e3689752e2a1cb0206
parenta111daf0c53ae91e71fd2bfe7497862d14132e3e
cpufreq: amd-pstate: Add resume and suspend callbacks

When system resumes from S3, the CPPC enable register will be
cleared and reset to 0.

So enable the CPPC interface by writing 1 to this register on
system resume and disable it during system suspend.

Signed-off-by: Jinzhou Su <Jinzhou.Su@amd.com>
Signed-off-by: Jinzhou Su <Jinzhou.Su@amd.com>
Acked-by: Huang Rui <ray.huang@amd.com>
[ rjw: Subject and changelog edits ]
Cc: All applicable <stable@vger.kernel.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/amd-pstate.c