Commit 778279f4 authored by Lina Iyer's avatar Lina Iyer Committed by Bjorn Andersson

soc: qcom: cmd-db: allow loading as a module

This patch enables Command DB driver to be loaded as a module. Command
DB is inherent to RPMH interaction and as such would never be unloaded.
Add supress_bind_attrs to make it a permanently loaded module.
Reviewed-by: default avatarJohn Stultz <john.stultz@linaro.org>
Reviewed-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tested-by: default avatarJohn Stultz <john.stultz@linaro.org>
Signed-off-by: default avatarLina Iyer <ilina@codeaurora.org>
Link: https://lore.kernel.org/r/20201001154144.5226-1-ilina@codeaurora.orgSigned-off-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
parent 84314cf7
...@@ -17,7 +17,7 @@ config QCOM_AOSS_QMP ...@@ -17,7 +17,7 @@ config QCOM_AOSS_QMP
Subsystem (AOSS) using Qualcomm Messaging Protocol (QMP). Subsystem (AOSS) using Qualcomm Messaging Protocol (QMP).
config QCOM_COMMAND_DB config QCOM_COMMAND_DB
bool "Qualcomm Command DB" tristate "Qualcomm Command DB"
depends on ARCH_QCOM || COMPILE_TEST depends on ARCH_QCOM || COMPILE_TEST
depends on OF_RESERVED_MEM depends on OF_RESERVED_MEM
help help
......
/* SPDX-License-Identifier: GPL-2.0 */ /* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (c) 2016-2018, The Linux Foundation. All rights reserved. */ /* Copyright (c) 2016-2018, 2020, The Linux Foundation. All rights reserved. */
#include <linux/debugfs.h> #include <linux/debugfs.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/module.h>
#include <linux/of.h> #include <linux/of.h>
#include <linux/of_address.h> #include <linux/of_address.h>
#include <linux/of_reserved_mem.h> #include <linux/of_reserved_mem.h>
...@@ -340,12 +341,14 @@ static const struct of_device_id cmd_db_match_table[] = { ...@@ -340,12 +341,14 @@ static const struct of_device_id cmd_db_match_table[] = {
{ .compatible = "qcom,cmd-db" }, { .compatible = "qcom,cmd-db" },
{ } { }
}; };
MODULE_DEVICE_TABLE(of, cmd_db_match_table);
static struct platform_driver cmd_db_dev_driver = { static struct platform_driver cmd_db_dev_driver = {
.probe = cmd_db_dev_probe, .probe = cmd_db_dev_probe,
.driver = { .driver = {
.name = "cmd-db", .name = "cmd-db",
.of_match_table = cmd_db_match_table, .of_match_table = cmd_db_match_table,
.suppress_bind_attrs = true,
}, },
}; };
...@@ -354,3 +357,6 @@ static int __init cmd_db_device_init(void) ...@@ -354,3 +357,6 @@ static int __init cmd_db_device_init(void)
return platform_driver_register(&cmd_db_dev_driver); return platform_driver_register(&cmd_db_dev_driver);
} }
arch_initcall(cmd_db_device_init); arch_initcall(cmd_db_device_init);
MODULE_DESCRIPTION("Qualcomm Technologies, Inc. Command DB Driver");
MODULE_LICENSE("GPL v2");
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment