From: Eugen Hristev <eugen.hristev@microchip.com> To: <wim@linux-watchdog.org>, <linux@roeck-us.net>, <robh+dt@kernel.org> Cc: <nicolas.ferre@microchip.com>, <linux-watchdog@vger.kernel.org>, <devicetree@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>, <linux-kernel@vger.kernel.org>, Eugen Hristev <eugen.hristev@microchip.com> Subject: [PATCH 2/3] watchdog: sama5d4_wdt: add support for sama7g5-wdt Date: Thu, 27 May 2021 13:01:19 +0300 [thread overview] Message-ID: <20210527100120.266796-2-eugen.hristev@microchip.com> (raw) In-Reply-To: <20210527100120.266796-1-eugen.hristev@microchip.com> 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 <eugen.hristev@microchip.com> --- 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
WARNING: multiple messages have this Message-ID (diff)
From: Eugen Hristev <eugen.hristev@microchip.com> To: <wim@linux-watchdog.org>, <linux@roeck-us.net>, <robh+dt@kernel.org> Cc: devicetree@vger.kernel.org, linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org, Eugen Hristev <eugen.hristev@microchip.com>, linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/3] watchdog: sama5d4_wdt: add support for sama7g5-wdt Date: Thu, 27 May 2021 13:01:19 +0300 [thread overview] Message-ID: <20210527100120.266796-2-eugen.hristev@microchip.com> (raw) In-Reply-To: <20210527100120.266796-1-eugen.hristev@microchip.com> 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 <eugen.hristev@microchip.com> --- 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2021-05-27 10:01 UTC|newest] Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-05-27 10:01 [PATCH 1/3] dt-bindings: watchdog: sama5d4-wdt: convert to yaml Eugen Hristev 2021-05-27 10:01 ` Eugen Hristev 2021-05-27 10:01 ` Eugen Hristev [this message] 2021-05-27 10:01 ` [PATCH 2/3] watchdog: sama5d4_wdt: add support for sama7g5-wdt Eugen Hristev 2021-05-27 12:09 ` Nicolas Ferre 2021-05-27 12:09 ` Nicolas Ferre 2021-05-27 16:55 ` Guenter Roeck 2021-05-27 16:55 ` Guenter Roeck 2021-06-11 7:19 ` Nicolas Ferre 2021-06-11 7:19 ` Nicolas Ferre 2021-06-11 10:35 ` Guenter Roeck 2021-06-11 10:35 ` Guenter Roeck 2021-06-11 12:24 ` Nicolas Ferre 2021-06-11 12:24 ` Nicolas Ferre 2021-05-27 10:01 ` [PATCH 3/3] dt-bindings: watchdog: sama5d4-wdt: add compatible " Eugen Hristev 2021-05-27 10:01 ` Eugen Hristev 2021-06-04 20:20 ` Rob Herring 2021-06-04 20:20 ` Rob Herring 2021-06-04 20:20 ` [PATCH 1/3] dt-bindings: watchdog: sama5d4-wdt: convert to yaml Rob Herring 2021-06-04 20:20 ` Rob Herring 2021-06-06 16:52 ` Nicolas Ferre 2021-06-06 16:52 ` Nicolas Ferre 2021-06-11 12:19 ` Nicolas Ferre 2021-06-11 12:19 ` Nicolas Ferre
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20210527100120.266796-2-eugen.hristev@microchip.com \ --to=eugen.hristev@microchip.com \ --cc=devicetree@vger.kernel.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-watchdog@vger.kernel.org \ --cc=linux@roeck-us.net \ --cc=nicolas.ferre@microchip.com \ --cc=robh+dt@kernel.org \ --cc=wim@linux-watchdog.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.