Linux RTC
 help / color / mirror / Atom feed
* [rtc-linux] [PATCH] rtc: rx8581: adding Device Tree support
@ 2015-11-26  9:58 Piotr Stankiewicz
  2015-11-26 10:16 ` [rtc-linux] " Alexandre Belloni
  0 siblings, 1 reply; 3+ messages in thread
From: Piotr Stankiewicz @ 2015-11-26  9:58 UTC (permalink / raw)
  To: a.zummo, alexandre.belloni; +Cc: rtc-linux, patches, Piotr Stankiewicz

Signed-off-by: Piotr Stankiewicz <piotrs@opensource.wolfsonmicro.com>
---
 drivers/rtc/rtc-rx8581.c |    9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/rtc/rtc-rx8581.c b/drivers/rtc/rtc-rx8581.c
index 161e25d0..a4c86c5 100644
--- a/drivers/rtc/rtc-rx8581.c
+++ b/drivers/rtc/rtc-rx8581.c
@@ -312,9 +312,18 @@ static const struct i2c_device_id rx8581_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, rx8581_id);
 
+#ifdef CONFIG_OF
+static const struct of_device_id rx8581_of_match[] = {
+	{ .compatible = "epson,rx8581"},
+	{}
+};
+MODULE_DEVICE_TABLE(of, rx8581_of_match);
+#endif
+
 static struct i2c_driver rx8581_driver = {
 	.driver		= {
 		.name	= "rtc-rx8581",
+		.of_match_table = of_match_ptr(rx8581_of_match),
 	},
 	.probe		= rx8581_probe,
 	.id_table	= rx8581_id,
-- 
1.7.10.4

-- 
-- 
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
--- 
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [rtc-linux] Re: [PATCH] rtc: rx8581: adding Device Tree support
  2015-11-26  9:58 [rtc-linux] [PATCH] rtc: rx8581: adding Device Tree support Piotr Stankiewicz
@ 2015-11-26 10:16 ` Alexandre Belloni
  2015-11-26 11:28   ` Piotr Stankiewicz
  0 siblings, 1 reply; 3+ messages in thread
From: Alexandre Belloni @ 2015-11-26 10:16 UTC (permalink / raw)
  To: Piotr Stankiewicz; +Cc: a.zummo, rtc-linux, patches

Hi,

On 26/11/2015 at 09:58:37 +0000, Piotr Stankiewicz wrote :
> Signed-off-by: Piotr Stankiewicz <piotrs@opensource.wolfsonmicro.com>
> ---
>  drivers/rtc/rtc-rx8581.c |    9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/drivers/rtc/rtc-rx8581.c b/drivers/rtc/rtc-rx8581.c
> index 161e25d0..a4c86c5 100644
> --- a/drivers/rtc/rtc-rx8581.c
> +++ b/drivers/rtc/rtc-rx8581.c
> @@ -312,9 +312,18 @@ static const struct i2c_device_id rx8581_id[] = {
>  };
>  MODULE_DEVICE_TABLE(i2c, rx8581_id);
>  
> +#ifdef CONFIG_OF
> +static const struct of_device_id rx8581_of_match[] = {
> +	{ .compatible = "epson,rx8581"},
> +	{}
> +};
> +MODULE_DEVICE_TABLE(of, rx8581_of_match);
> +#endif
> +

Is that necessary? epson,rx8581 is already matching the only
i2c_device_id of this driver.

-- 
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

-- 
-- 
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
--- 
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [rtc-linux] Re: [PATCH] rtc: rx8581: adding Device Tree support
  2015-11-26 10:16 ` [rtc-linux] " Alexandre Belloni
@ 2015-11-26 11:28   ` Piotr Stankiewicz
  0 siblings, 0 replies; 3+ messages in thread
From: Piotr Stankiewicz @ 2015-11-26 11:28 UTC (permalink / raw)
  To: Alexandre Belloni; +Cc: a.zummo, rtc-linux, patches

On Thu, Nov 26, 2015 at 11:16:34AM +0100, Alexandre Belloni wrote:
Hi,
> Hi,
> 
> On 26/11/2015 at 09:58:37 +0000, Piotr Stankiewicz wrote :
> > Signed-off-by: Piotr Stankiewicz <piotrs@opensource.wolfsonmicro.com>
> > ---
> >  drivers/rtc/rtc-rx8581.c |    9 +++++++++
> >  1 file changed, 9 insertions(+)
> > 
> > diff --git a/drivers/rtc/rtc-rx8581.c b/drivers/rtc/rtc-rx8581.c
> > index 161e25d0..a4c86c5 100644
> > --- a/drivers/rtc/rtc-rx8581.c
> > +++ b/drivers/rtc/rtc-rx8581.c
> > @@ -312,9 +312,18 @@ static const struct i2c_device_id rx8581_id[] = {
> >  };
> >  MODULE_DEVICE_TABLE(i2c, rx8581_id);
> >  
> > +#ifdef CONFIG_OF
> > +static const struct of_device_id rx8581_of_match[] = {
> > +	{ .compatible = "epson,rx8581"},
> > +	{}
> > +};
> > +MODULE_DEVICE_TABLE(of, rx8581_of_match);
> > +#endif
> > +
> 
> Is that necessary? epson,rx8581 is already matching the only
> i2c_device_id of this driver.

It seems it is not necessary indeed, I just did a full clean build
without my patch and my clock works correctly. I guess my original issue
must have been caused by a dodgy defconfig/device tree.

Sorry for the confusion.

Greetings,
Piotr

-- 
-- 
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
--- 
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-11-26 11:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-26  9:58 [rtc-linux] [PATCH] rtc: rx8581: adding Device Tree support Piotr Stankiewicz
2015-11-26 10:16 ` [rtc-linux] " Alexandre Belloni
2015-11-26 11:28   ` Piotr Stankiewicz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox