lkml.org 
[lkml]   [2019]   [Nov]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v1 2/4] watchdog: populate reboot mode node in toprgu node of MTK RGU (Reset Generation Unit)
Date
From: Freddy Hsin <freddy.hsin@mediatek.com>

of_platform_population should be added in the probe function of
toprgu driver, or the reboot mode driver will not be probed

Signed-off-by: Freddy Hsin <freddy.hsin@mediatek.com>
---
drivers/watchdog/mtk_wdt.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/drivers/watchdog/mtk_wdt.c b/drivers/watchdog/mtk_wdt.c
index 9c3d003..2fb2614 100644
--- a/drivers/watchdog/mtk_wdt.c
+++ b/drivers/watchdog/mtk_wdt.c
@@ -20,6 +20,7 @@
#include <linux/types.h>
#include <linux/watchdog.h>
#include <linux/delay.h>
+#include <linux/of_platform.h>

#define WDT_MAX_TIMEOUT 31
#define WDT_MIN_TIMEOUT 1
@@ -167,6 +168,8 @@ static int mtk_wdt_probe(struct platform_device *pdev)
if (IS_ERR(mtk_wdt->wdt_base))
return PTR_ERR(mtk_wdt->wdt_base);

+ of_platform_populate(pdev->dev.of_node, NULL, NULL, &pdev->dev);
+
mtk_wdt->wdt_dev.info = &mtk_wdt_info;
mtk_wdt->wdt_dev.ops = &mtk_wdt_ops;
mtk_wdt->wdt_dev.timeout = WDT_MAX_TIMEOUT;
--
1.7.9.5
\
 
 \ /
  Last update: 2019-11-26 06:35    [W:0.054 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site