lkml.org 
[lkml]   [2023]   [Aug]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] perf/smmuv3: Add platform id table for module auto loading
Date
From: Yicong Yang <yangyicong@hisilicon.com>

On ACPI based system the device is probed by the name directly. If the
driver is configured as module it can only be loaded manually. Add the
platform id table as well as the module alias then the driver will be
loaded automatically by the udev or others once the device added.

Signed-off-by: Yicong Yang <yangyicong@hisilicon.com>
---
drivers/perf/arm_smmuv3_pmu.c | 7 +++++++
1 file changed, 7 insertions(+)

diff --git a/drivers/perf/arm_smmuv3_pmu.c b/drivers/perf/arm_smmuv3_pmu.c
index 25a269d431e4..f27c5f585524 100644
--- a/drivers/perf/arm_smmuv3_pmu.c
+++ b/drivers/perf/arm_smmuv3_pmu.c
@@ -946,7 +946,14 @@ static const struct of_device_id smmu_pmu_of_match[] = {
MODULE_DEVICE_TABLE(of, smmu_pmu_of_match);
#endif

+static const struct platform_device_id smmu_pmu_platform_match[] = {
+ { "arm-smmu-v3-pmcg", 0 },
+ {}
+};
+MODULE_DEVICE_TABLE(platform, smmu_pmu_platform_match);
+
static struct platform_driver smmu_pmu_driver = {
+ .id_table = smmu_pmu_platform_match,
.driver = {
.name = "arm-smmu-v3-pmcg",
.of_match_table = of_match_ptr(smmu_pmu_of_match),
--
2.24.0
\
 
 \ /
  Last update: 2023-08-07 14:27    [W:0.041 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site