Commit a442abbb authored by Anson Huang's avatar Anson Huang Committed by Philipp Zabel

reset: imx7: Support module build

Use module_platform_driver(), add module device table, author,
description and license to support module build, and
CONFIG_RESET_IMX7 is changed to default 'y' ONLY for i.MX7D,
other platforms need to select it in defconfig.
Signed-off-by: default avatarAnson Huang <Anson.Huang@nxp.com>
Signed-off-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
parent 9123e3a7
...@@ -65,9 +65,10 @@ config RESET_HSDK ...@@ -65,9 +65,10 @@ config RESET_HSDK
This enables the reset controller driver for HSDK board. This enables the reset controller driver for HSDK board.
config RESET_IMX7 config RESET_IMX7
bool "i.MX7/8 Reset Driver" if COMPILE_TEST tristate "i.MX7/8 Reset Driver"
depends on HAS_IOMEM depends on HAS_IOMEM
default SOC_IMX7D || (ARM64 && ARCH_MXC) depends on SOC_IMX7D || (ARM64 && ARCH_MXC) || COMPILE_TEST
default y if SOC_IMX7D
select MFD_SYSCON select MFD_SYSCON
help help
This enables the reset controller driver for i.MX7 SoCs. This enables the reset controller driver for i.MX7 SoCs.
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
*/ */
#include <linux/mfd/syscon.h> #include <linux/mfd/syscon.h>
#include <linux/mod_devicetable.h> #include <linux/module.h>
#include <linux/of_device.h> #include <linux/of_device.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/reset-controller.h> #include <linux/reset-controller.h>
...@@ -386,6 +386,7 @@ static const struct of_device_id imx7_reset_dt_ids[] = { ...@@ -386,6 +386,7 @@ static const struct of_device_id imx7_reset_dt_ids[] = {
{ .compatible = "fsl,imx8mp-src", .data = &variant_imx8mp }, { .compatible = "fsl,imx8mp-src", .data = &variant_imx8mp },
{ /* sentinel */ }, { /* sentinel */ },
}; };
MODULE_DEVICE_TABLE(of, imx7_reset_dt_ids);
static struct platform_driver imx7_reset_driver = { static struct platform_driver imx7_reset_driver = {
.probe = imx7_reset_probe, .probe = imx7_reset_probe,
...@@ -394,4 +395,8 @@ static struct platform_driver imx7_reset_driver = { ...@@ -394,4 +395,8 @@ static struct platform_driver imx7_reset_driver = {
.of_match_table = imx7_reset_dt_ids, .of_match_table = imx7_reset_dt_ids,
}, },
}; };
builtin_platform_driver(imx7_reset_driver); module_platform_driver(imx7_reset_driver);
MODULE_AUTHOR("Andrey Smirnov <andrew.smirnov@gmail.com>");
MODULE_DESCRIPTION("NXP i.MX7 reset 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