Skip to content

Commit 5ae233f

Browse files
ehristevWim Van Sebroeck
authored andcommitted
watchdog: sama5d4_wdt: add support for sama7g5-wdt
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 <[email protected]> Acked-by: Nicolas Ferre <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
1 parent 13b1916 commit 5ae233f

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

drivers/watchdog/sama5d4_wdt.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,8 +268,10 @@ static int sama5d4_wdt_probe(struct platform_device *pdev)
268268
wdd->min_timeout = MIN_WDT_TIMEOUT;
269269
wdd->max_timeout = MAX_WDT_TIMEOUT;
270270
wdt->last_ping = jiffies;
271-
wdt->sam9x60_support = of_device_is_compatible(dev->of_node,
272-
"microchip,sam9x60-wdt");
271+
272+
if (of_device_is_compatible(dev->of_node, "microchip,sam9x60-wdt") ||
273+
of_device_is_compatible(dev->of_node, "microchip,sama7g5-wdt"))
274+
wdt->sam9x60_support = true;
273275

274276
watchdog_set_drvdata(wdd, wdt);
275277

@@ -329,6 +331,10 @@ static const struct of_device_id sama5d4_wdt_of_match[] = {
329331
{
330332
.compatible = "microchip,sam9x60-wdt",
331333
},
334+
{
335+
.compatible = "microchip,sama7g5-wdt",
336+
},
337+
332338
{ }
333339
};
334340
MODULE_DEVICE_TABLE(of, sama5d4_wdt_of_match);

0 commit comments

Comments
 (0)