Thread (12 messages) 12 messages, 4 authors, 2021-06-11
STALE1842d LANDED

[PATCH 2/3] watchdog: sama5d4_wdt: add support for sama7g5-wdt

From: Eugen Hristev <hidden>
Date: 2021-05-27 10:01:56
Also in: linux-arm-kernel, linux-watchdog, lkml
Subsystem: arm/microchip (at91) soc support, the rest, watchdog device drivers · Maintainers: Nicolas Ferre, Alexandre Belloni, Claudiu Beznea, Linus Torvalds, Wim Van Sebroeck, Guenter Roeck

Add support for compatible sama7g5-wdt.
The sama7g5 wdt is the same hardware block as on sam9x60.
Adapt the driver to use the sam9x60/sama7g5 variant if either
of the two compatibles are selected (sam9x60-wdt/sama7g5-wdt).

Signed-off-by: Eugen Hristev <redacted>
---
 drivers/watchdog/sama5d4_wdt.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/watchdog/sama5d4_wdt.c b/drivers/watchdog/sama5d4_wdt.c
index e5d11d6a2600..ec20ad4e534f 100644
--- a/drivers/watchdog/sama5d4_wdt.c
+++ b/drivers/watchdog/sama5d4_wdt.c
@@ -268,8 +268,10 @@ static int sama5d4_wdt_probe(struct platform_device *pdev)
 	wdd->min_timeout = MIN_WDT_TIMEOUT;
 	wdd->max_timeout = MAX_WDT_TIMEOUT;
 	wdt->last_ping = jiffies;
-	wdt->sam9x60_support = of_device_is_compatible(dev->of_node,
-						       "microchip,sam9x60-wdt");
+
+	if (of_device_is_compatible(dev->of_node, "microchip,sam9x60-wdt") ||
+	    of_device_is_compatible(dev->of_node, "microchip,sama7g5-wdt"))
+		wdt->sam9x60_support = true;
 
 	watchdog_set_drvdata(wdd, wdt);
 
@@ -329,6 +331,10 @@ static const struct of_device_id sama5d4_wdt_of_match[] = {
 	{
 		.compatible = "microchip,sam9x60-wdt",
 	},
+	{
+		.compatible = "microchip,sama7g5-wdt",
+	},
+
 	{ }
 };
 MODULE_DEVICE_TABLE(of, sama5d4_wdt_of_match);
-- 
2.25.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help