MA-17913 reset: Allow reset-imx7/hdmimix/audiomix driver to be loadable as module

Allows three imx reset drivers to be loaded as module.

Signed-off-by: Jindong <jindong.yue@nxp.com>
Reviewed-by: Fugang Duan <fugang.duan@nxp.com>
Reviewed-by: Sandor Yu <Sandor.yu@nxp.com>
This commit is contained in:
Jindong 2020-09-21 15:57:37 +08:00
parent bca7368798
commit 66d55a6572
4 changed files with 12 additions and 7 deletions

View File

@ -66,23 +66,23 @@ config RESET_HSDK
This enables the reset controller driver for HSDK board.
config RESET_IMX7
bool "i.MX7/8 Reset Driver" if COMPILE_TEST
depends on HAS_IOMEM
tristate "i.MX7/8 Reset Driver"
depends on HAS_IOMEM || COMPILE_TEST
default SOC_IMX7D || (ARM64 && ARCH_MXC)
select MFD_SYSCON
help
This enables the reset controller driver for i.MX7 SoCs.
config RESET_IMX_HDMIMIX
bool "i.MX HDMIMIX Reset Driver" if COMPILE_TEST
depends on HAS_IOMEM
tristate "i.MX HDMIMIX Reset Driver"
depends on HAS_IOMEM || COMPILE_TEST
default ARCH_MXC
help
This enables the hdmimix reset controller driver for i.MX8MP.
config RESET_IMX_AUDIOMIX
bool "i.MX Audiomix Reset Driver" if COMPILE_TEST
depends on HAS_IOMEM
tristate "i.MX Audiomix Reset Driver"
depends on HAS_IOMEM || COMPILE_TEST
default ARCH_MXC
help
This enables the audiomix reset controller driver for i.MX SoCs.

View File

@ -120,3 +120,4 @@ static struct platform_driver imx_audiomix_reset_driver = {
},
};
module_platform_driver(imx_audiomix_reset_driver);
MODULE_LICENSE("GPL v2");

View File

@ -161,3 +161,4 @@ static struct platform_driver imx_hdmimix_reset_driver = {
},
};
module_platform_driver(imx_hdmimix_reset_driver);
MODULE_LICENSE("GPL v2");

View File

@ -8,6 +8,7 @@
*/
#include <linux/mfd/syscon.h>
#include <linux/module.h>
#include <linux/mod_devicetable.h>
#include <linux/of_device.h>
#include <linux/platform_device.h>
@ -294,6 +295,7 @@ static const struct of_device_id imx7_reset_dt_ids[] = {
{ .compatible = "fsl,imx8mq-src", .data = &variant_imx8mq },
{ /* sentinel */ },
};
MODULE_DEVICE_TABLE(of, imx7_reset_dt_ids);
static struct platform_driver imx7_reset_driver = {
.probe = imx7_reset_probe,
@ -302,4 +304,5 @@ static struct platform_driver imx7_reset_driver = {
.of_match_table = imx7_reset_dt_ids,
},
};
builtin_platform_driver(imx7_reset_driver);
module_platform_driver(imx7_reset_driver);
MODULE_LICENSE("GPL v2");