From: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com> To: <wim@iguana.be> Cc: <devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <linux-watchdog@vger.kernel.org>, <Zubair.Kakakhel@imgtec.com>, <paul@crapouillou.net> Subject: [PATCH_V3 2/2] watchdog: jz4740: Add DT support Date: Tue, 3 Feb 2015 10:25:48 +0000 [thread overview] Message-ID: <1422959148-38075-3-git-send-email-Zubair.Kakakhel@imgtec.com> (raw) In-Reply-To: <1422959148-38075-1-git-send-email-Zubair.Kakakhel@imgtec.com> Add DT support to the jz4740 driver. Simple of_match_ptr. No other modification for probe needed Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> --- V3 Typo in Reviewed-by: Guenter Roeck <linux@roeck-us.net> V2 changes Add module device table. Even though we are moving to non-dt for jz4740. Lets try and not break things while at it. Renamed jz4740_of_match to jz4740_wdt_of_match --- drivers/watchdog/jz4740_wdt.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/watchdog/jz4740_wdt.c b/drivers/watchdog/jz4740_wdt.c index 18e41af..4c2cc09 100644 --- a/drivers/watchdog/jz4740_wdt.c +++ b/drivers/watchdog/jz4740_wdt.c @@ -24,6 +24,7 @@ #include <linux/clk.h> #include <linux/slab.h> #include <linux/err.h> +#include <linux/of.h> #include <asm/mach-jz4740/timer.h> @@ -142,6 +143,14 @@ static const struct watchdog_ops jz4740_wdt_ops = { .set_timeout = jz4740_wdt_set_timeout, }; +#ifdef CONFIG_OF +static const struct of_device_id jz4740_wdt_of_matches[] = { + { .compatible = "ingenic,jz4740-watchdog", }, + { /* sentinel */ } +}; +MODULE_DEVICE_TABLE(of, jz4740_wdt_of_matches) +#endif + static int jz4740_wdt_probe(struct platform_device *pdev) { struct jz4740_wdt_drvdata *drvdata; @@ -211,6 +220,7 @@ static struct platform_driver jz4740_wdt_driver = { .remove = jz4740_wdt_remove, .driver = { .name = "jz4740-wdt", + .of_match_table = of_match_ptr(jz4740_wdt_of_matches), }, }; -- 1.9.1
WARNING: multiple messages have this Message-ID (diff)
From: Zubair Lutfullah Kakakhel <Zubair.Kakakhel-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org> To: wim-IQzOog9fTRqzQB+pC5nmwQ@public.gmane.org Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-watchdog-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Zubair.Kakakhel-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org, paul-icTtO2rgO2OTuSrc4Mpeew@public.gmane.org Subject: [PATCH_V3 2/2] watchdog: jz4740: Add DT support Date: Tue, 3 Feb 2015 10:25:48 +0000 [thread overview] Message-ID: <1422959148-38075-3-git-send-email-Zubair.Kakakhel@imgtec.com> (raw) In-Reply-To: <1422959148-38075-1-git-send-email-Zubair.Kakakhel-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org> Add DT support to the jz4740 driver. Simple of_match_ptr. No other modification for probe needed Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org> Reviewed-by: Guenter Roeck <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org> --- V3 Typo in Reviewed-by: Guenter Roeck <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org> V2 changes Add module device table. Even though we are moving to non-dt for jz4740. Lets try and not break things while at it. Renamed jz4740_of_match to jz4740_wdt_of_match --- drivers/watchdog/jz4740_wdt.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/watchdog/jz4740_wdt.c b/drivers/watchdog/jz4740_wdt.c index 18e41af..4c2cc09 100644 --- a/drivers/watchdog/jz4740_wdt.c +++ b/drivers/watchdog/jz4740_wdt.c @@ -24,6 +24,7 @@ #include <linux/clk.h> #include <linux/slab.h> #include <linux/err.h> +#include <linux/of.h> #include <asm/mach-jz4740/timer.h> @@ -142,6 +143,14 @@ static const struct watchdog_ops jz4740_wdt_ops = { .set_timeout = jz4740_wdt_set_timeout, }; +#ifdef CONFIG_OF +static const struct of_device_id jz4740_wdt_of_matches[] = { + { .compatible = "ingenic,jz4740-watchdog", }, + { /* sentinel */ } +}; +MODULE_DEVICE_TABLE(of, jz4740_wdt_of_matches) +#endif + static int jz4740_wdt_probe(struct platform_device *pdev) { struct jz4740_wdt_drvdata *drvdata; @@ -211,6 +220,7 @@ static struct platform_driver jz4740_wdt_driver = { .remove = jz4740_wdt_remove, .driver = { .name = "jz4740-wdt", + .of_match_table = of_match_ptr(jz4740_wdt_of_matches), }, }; -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2015-02-03 10:26 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-02-03 10:25 [PATCH_V3 0/2] watchdog: jz4740: Add DT support Zubair Lutfullah Kakakhel 2015-02-03 10:25 ` Zubair Lutfullah Kakakhel 2015-02-03 10:25 ` [PATCH_V3 1/2] dt: watchdog: Add DT binding documentation for jz4740 watchdog timer Zubair Lutfullah Kakakhel 2015-02-03 10:25 ` Zubair Lutfullah Kakakhel 2015-02-03 10:25 ` Zubair Lutfullah Kakakhel [this message] 2015-02-03 10:25 ` [PATCH_V3 2/2] watchdog: jz4740: Add DT support Zubair Lutfullah Kakakhel 2015-02-03 19:04 ` [PATCH_V3 0/2] " Wim Van Sebroeck 2015-02-03 19:04 ` Wim Van Sebroeck 2015-02-05 8:54 ` Zubair Lutfullah Kakakhel 2015-02-05 8:54 ` Zubair Lutfullah Kakakhel
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=1422959148-38075-3-git-send-email-Zubair.Kakakhel@imgtec.com \ --to=zubair.kakakhel@imgtec.com \ --cc=devicetree@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-watchdog@vger.kernel.org \ --cc=paul@crapouillou.net \ --cc=wim@iguana.be \ /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.