summaryrefslogtreecommitdiff
path: root/drivers/powercap
diff options
context:
space:
mode:
authorZhang Rui <rui.zhang@intel.com>2024-04-28 17:24:27 +0800
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2024-04-30 21:10:37 +0200
commit963a9ad3c589dc0f922697faea53c69098083945 (patch)
treecb5c89d161adcb21db273885e97ad608e2777a45 /drivers/powercap
parent575024a8aa7cf1dff49b94092f774ed1c90586be (diff)
powercap: intel_rapl_tpmi: Enable PMU support
Enable RAPL PMU support for TPMI RAPL driver. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/powercap')
-rw-r--r--drivers/powercap/intel_rapl_tpmi.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/powercap/intel_rapl_tpmi.c b/drivers/powercap/intel_rapl_tpmi.c
index f6b7f085977c..947544e4d229 100644
--- a/drivers/powercap/intel_rapl_tpmi.c
+++ b/drivers/powercap/intel_rapl_tpmi.c
@@ -302,6 +302,8 @@ static int intel_rapl_tpmi_probe(struct auxiliary_device *auxdev,
goto err;
}
+ rapl_package_add_pmu(trp->rp);
+
auxiliary_set_drvdata(auxdev, trp);
return 0;
@@ -314,6 +316,7 @@ static void intel_rapl_tpmi_remove(struct auxiliary_device *auxdev)
{
struct tpmi_rapl_package *trp = auxiliary_get_drvdata(auxdev);
+ rapl_package_remove_pmu(trp->rp);
rapl_remove_package(trp->rp);
trp_release(trp);
}