diff mbox series

[2/2] rtc: m48t86: add DT support for m48t86

Message ID 20230823-m48t86_device_tree-v1-2-240023b435ac@maquefel.me
State Superseded
Headers show
Series device tree support for ST M48T86 | expand

Commit Message

Nikita Shubin via B4 Relay Aug. 23, 2023, 9:03 a.m. UTC
From: Nikita Shubin <nikita.shubin@maquefel.me>

Add OF ID match table.

Acked-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
---
 drivers/rtc/rtc-m48t86.c | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Krzysztof Kozlowski Aug. 23, 2023, 10:14 a.m. UTC | #1
On 23/08/2023 11:03, Nikita Shubin via B4 Relay wrote:
> From: Nikita Shubin <nikita.shubin@maquefel.me>
> 
> Add OF ID match table.
> 
> Acked-by: Arnd Bergmann <arnd@arndb.de>
> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

How did these appear? It's v1, so it is a bit confusing.

> Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>

> 

Best regards,
Krzysztof
Nikita Shubin Aug. 23, 2023, 10:20 a.m. UTC | #2
Hello Krzysztof!

On Wed, 2023-08-23 at 12:14 +0200, Krzysztof Kozlowski wrote:
> On 23/08/2023 11:03, Nikita Shubin via B4 Relay wrote:
> > From: Nikita Shubin <nikita.shubin@maquefel.me>
> > 
> > Add OF ID match table.
> > 
> > Acked-by: Arnd Bergmann <arnd@arndb.de>
> > Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
> 
> How did these appear? It's v1, so it is a bit confusing.

Indeed this is from "ep93xx device tree conversion" series, you asked
to submit these part as a separate.

I don't know the rules for tags in such cases, sorry. It's discouraged
to use tags given elsewhere ?

> 
> > Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
> 
> > 
> 
> Best regards,
> Krzysztof
>
Krzysztof Kozlowski Aug. 23, 2023, 10:21 a.m. UTC | #3
On 23/08/2023 12:20, Nikita Shubin wrote:
> Hello Krzysztof!
> 
> On Wed, 2023-08-23 at 12:14 +0200, Krzysztof Kozlowski wrote:
>> On 23/08/2023 11:03, Nikita Shubin via B4 Relay wrote:
>>> From: Nikita Shubin <nikita.shubin@maquefel.me>
>>>
>>> Add OF ID match table.
>>>
>>> Acked-by: Arnd Bergmann <arnd@arndb.de>
>>> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
>>
>> How did these appear? It's v1, so it is a bit confusing.
> 
> Indeed this is from "ep93xx device tree conversion" series, you asked
> to submit these part as a separate.
> 
> I don't know the rules for tags in such cases, sorry. It's discouraged
> to use tags given elsewhere ?

Ah, no, it's okay, but this patchset should have some history (e.g.
continuing versioning and changelog) or references to previous lore
submission with explanation.

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/drivers/rtc/rtc-m48t86.c b/drivers/rtc/rtc-m48t86.c
index 481c9525b1dd..dd4a62e2d39c 100644
--- a/drivers/rtc/rtc-m48t86.c
+++ b/drivers/rtc/rtc-m48t86.c
@@ -11,6 +11,7 @@ 
  */
 
 #include <linux/module.h>
+#include <linux/mod_devicetable.h>
 #include <linux/rtc.h>
 #include <linux/platform_device.h>
 #include <linux/bcd.h>
@@ -269,9 +270,16 @@  static int m48t86_rtc_probe(struct platform_device *pdev)
 	return 0;
 }
 
+static const struct of_device_id m48t86_rtc_of_ids[] = {
+	{ .compatible = "st,m48t86" },
+	{ /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(of, m48t86_rtc_of_ids);
+
 static struct platform_driver m48t86_rtc_platform_driver = {
 	.driver		= {
 		.name	= "rtc-m48t86",
+		.of_match_table = m48t86_rtc_of_ids,
 	},
 	.probe		= m48t86_rtc_probe,
 };