Skip to contentSkip to conversation

rtc: Add device tree probing to the Gemini driver

PATCH Applied Linus Walleij 3 participants 3 messages Jan 22, 2017 – Jan 24, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 8/22 rtc: Add device tree probing to the Gemini driver

This adds bindings and simple probing for the Cortina Systems Gemini SoC RTC.

Cc Janos Laube <[email protected]>
Cc Paulius Zaleckas <[email protected]>
Cc Hans Ulli Kroll <[email protected]>
Cc Florian Fainelli <[email protected]>
Cc devicetree at vger.kernel.org

---
RTC maintainers: please just apply this to the RTC tree when you are pleased with it. It is functionally orthogonal to the rest of the series and just in a series for context.

---
 Documentation/devicetree/bindings/rtc/cortina,gemini.txt | 14 ++++++++++++++
 drivers/rtc/rtc-gemini.c                                 |  7 +++++++
 2 files changed, 21 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/rtc/cortina,gemini.txt
Documentation/devicetree/bindings/rtc/cortina,gemini.txt new file +14 -0
new file mode 100644
index 000000000000..4ce4e794ddbb
@@ -0,0 +1,14 @@
+* Cortina Systems Gemini RTC
+
+Gemini SoC real-time clock.
+
+Required properties:
+- compatible : Should be "cortina,gemini-rtc"
+
+Examples:
+
+rtc at 45000000 {
+	compatible = "cortina,gemini-rtc";
+	reg = <0x45000000 0x100>;
+	interrupts = <17 IRQ_TYPE_LEVEL_HIGH>;
+};
drivers/rtc/rtc-gemini.c +7 -0
index 688debc14348..ccf0dbadb62d 100644
@@ -159,9 +159,16 @@ static int gemini_rtc_remove(struct platform_device *pdev)
 	return 0;
 }
 
+static const struct of_device_id gemini_rtc_dt_match[] = {
+	{ .compatible = "cortina,gemini-rtc" },
+	{ }
+};
+MODULE_DEVICE_TABLE(of, gemini_rtc_dt_match);
+
 static struct platform_driver gemini_rtc_driver = {
 	.driver		= {
 		.name	= DRV_NAME,
+		.of_match_table = gemini_rtc_dt_match,
 	},
 	.probe		= gemini_rtc_probe,
 	.remove		= gemini_rtc_remove,
Signature · 1 line
2.9.3
maintainer Acked-by on v1 8/22
#1 lore raw
Quoted 13 lines · Linus Walleij

This adds bindings and simple probing for the Cortina Systems Gemini SoC RTC.

Cc Janos Laube <[email protected]>
Cc Paulius Zaleckas <[email protected]>
Cc Hans Ulli Kroll <[email protected]>
Cc Florian Fainelli <[email protected]>
Cc devicetree at vger.kernel.org

---
RTC maintainers: please just apply this to the RTC tree when you are pleased with it. It is functionally orthogonal to the rest of the series and just in a series for context.

Quoted 5 lines
---
 Documentation/devicetree/bindings/rtc/cortina,gemini.txt | 14 ++++++++++++++
 drivers/rtc/rtc-gemini.c                                 |  7 +++++++
 2 files changed, 21 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/rtc/cortina,gemini.txt
#2 lore raw
In reply to Linus Walleij
Quoted 13 lines · Linus Walleij

This adds bindings and simple probing for the Cortina Systems Gemini SoC RTC.

Cc Janos Laube <[email protected]>
Cc Paulius Zaleckas <[email protected]>
Cc Hans Ulli Kroll <[email protected]>
Cc Florian Fainelli <[email protected]>
Cc devicetree at vger.kernel.org

---
RTC maintainers: please just apply this to the RTC tree when you are pleased with it. It is functionally orthogonal to the rest of the series and just in a series for context.

Quoted 6 lines
---
 Documentation/devicetree/bindings/rtc/cortina,gemini.txt | 14 ++++++++++++++
 drivers/rtc/rtc-gemini.c                                 |  7 +++++++
 2 files changed, 21 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/rtc/cortina,gemini.txt

Applied, thanks.

Signature · 3 lines
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com