From: jhovold@gmail.com (Johan Hovold)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] rtc: rtc-at91sam9.c add DT support
Date: Thu, 4 Apr 2013 10:16:34 +0200 [thread overview]
Message-ID: <20130404081634.GD27151@localhost> (raw)
In-Reply-To: <515CF985.6050009@interlog.com>
On Wed, Apr 03, 2013 at 11:54:45PM -0400, Douglas Gilbert wrote:
> diff --git a/drivers/rtc/rtc-at91sam9.c b/drivers/rtc/rtc-at91sam9.c
> index 39cfd2e..69e9389 100644
> --- a/drivers/rtc/rtc-at91sam9.c
> +++ b/drivers/rtc/rtc-at91sam9.c
> @@ -20,6 +20,8 @@
> #include <linux/ioctl.h>
> #include <linux/slab.h>
> #include <linux/platform_data/atmel.h>
> +#include <linux/of.h>
> +#include <linux/of_device.h>
>
> #include <mach/at91_rtt.h>
> #include <mach/cpu.h>
> @@ -71,6 +73,17 @@ struct sam9_rtc {
> #define gpbr_writel(rtc, val) \
> __raw_writel((val), (rtc)->gpbr)
>
> +#ifdef CONFIG_OF
> +static const struct of_device_id at91sam9_rtc_dt_ids[] = {
> + { .compatible = "atmel,at91sam9-rtc" },
This should probably be "atmel,at91sam9260-rtt".
> + { /* sentinel */ }
> +};
> +MODULE_DEVICE_TABLE(of, at91sam9_rtc_dt_ids);
> +#else
> +#define at91sam9_rtc_dt_ids NULL
> +#endif /* CONFIG_OF */
You don't need the else-clause when you use of_match_ptr below.
> +
> +
> /*
> * Read current time and date in RTC
> */
> @@ -470,6 +483,7 @@ static struct platform_driver at91_rtc_driver = {
> .driver = {
> .name = "rtc-at91sam9",
> .owner = THIS_MODULE,
> + .of_match_table = of_match_ptr(at91sam9_rtc_dt_ids),
> },
> };
Thanks,
Johan
prev parent reply other threads:[~2013-04-04 8:16 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-04 3:54 [PATCH] rtc: rtc-at91sam9.c add DT support Douglas Gilbert
2013-04-04 8:11 ` Nicolas Ferre
2013-04-04 8:11 ` Nicolas Ferre
2013-04-04 13:25 ` Douglas Gilbert
2013-04-04 13:25 ` Douglas Gilbert
2013-04-04 14:08 ` Nicolas Ferre
2013-04-04 14:08 ` Nicolas Ferre
2013-04-04 19:14 ` Douglas Gilbert
2013-04-04 19:14 ` Douglas Gilbert
2013-04-07 15:09 ` Johan Hovold
2013-04-07 15:09 ` Johan Hovold
[not found] ` <1365347572-14972-1-git-send-email-jhovold@gmail.com>
2013-04-08 7:33 ` [RFC 1/5] ARM: at91: add general purpose backup register (GPBR) support Jean-Christophe PLAGNIOL-VILLARD
2013-04-08 7:33 ` Jean-Christophe PLAGNIOL-VILLARD
2013-04-08 8:46 ` Johan Hovold
2013-04-08 8:46 ` Johan Hovold
2013-04-08 10:04 ` Jean-Christophe PLAGNIOL-VILLARD
2013-04-08 10:04 ` Jean-Christophe PLAGNIOL-VILLARD
2013-04-11 12:39 ` Johan Hovold
2013-04-11 12:39 ` Johan Hovold
2013-04-11 14:53 ` Jean-Christophe PLAGNIOL-VILLARD
2013-04-11 14:53 ` Jean-Christophe PLAGNIOL-VILLARD
[not found] ` <1365347572-14972-2-git-send-email-jhovold@gmail.com>
2013-04-08 7:35 ` [RFC 2/5] ARM: at91/dts: " Jean-Christophe PLAGNIOL-VILLARD
2013-04-08 7:35 ` Jean-Christophe PLAGNIOL-VILLARD
[not found] ` <1365347572-14972-4-git-send-email-jhovold@gmail.com>
2013-04-08 7:38 ` [RFC 4/5] RTC: rtc-at91sam9: add device-tree support Jean-Christophe PLAGNIOL-VILLARD
2013-04-08 7:38 ` Jean-Christophe PLAGNIOL-VILLARD
2013-04-08 9:00 ` Johan Hovold
2013-04-08 9:00 ` Johan Hovold
2013-04-08 9:57 ` Nicolas Ferre
2013-04-08 9:57 ` Nicolas Ferre
2013-04-08 10:03 ` Jean-Christophe PLAGNIOL-VILLARD
2013-04-08 10:03 ` Jean-Christophe PLAGNIOL-VILLARD
2013-04-08 10:42 ` Nicolas Ferre
2013-04-08 10:42 ` Nicolas Ferre
2013-04-08 11:02 ` Jean-Christophe PLAGNIOL-VILLARD
2013-04-08 11:02 ` Jean-Christophe PLAGNIOL-VILLARD
2013-04-08 10:48 ` Johan Hovold
2013-04-08 10:48 ` Johan Hovold
2013-04-08 11:08 ` Jean-Christophe PLAGNIOL-VILLARD
2013-04-08 11:08 ` Jean-Christophe PLAGNIOL-VILLARD
2013-04-08 10:38 ` Johan Hovold
2013-04-08 10:38 ` Johan Hovold
2013-04-08 11:11 ` Jean-Christophe PLAGNIOL-VILLARD
2013-04-08 11:11 ` Jean-Christophe PLAGNIOL-VILLARD
2013-04-11 12:57 ` Johan Hovold
2013-04-11 12:57 ` Johan Hovold
2013-04-04 8:16 ` Johan Hovold [this message]
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=20130404081634.GD27151@localhost \
--to=jhovold@gmail.com \
--cc=linux-arm-kernel@lists.infradead.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: link
Be 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.