diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2017-01-22 07:19:50 -0500 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@free-electrons.com> | 2017-01-24 12:45:05 -0500 |
commit | bc7d8ebf37e725ec028e7699e6b497c96678d63a (patch) | |
tree | 1bfe600260eef5a29e50fab9c351e9f7dcff05a2 | |
parent | 1d70ba3bfb30cf8d151f18f5bf7d7a218ecede57 (diff) |
rtc: gemini: Add device tree probing
This adds bindings and simple probing for the Cortina Systems Gemini
SoC RTC.
Cc: Janos Laube <janos.dev@gmail.com>
Cc: Paulius Zaleckas <paulius.zaleckas@gmail.com>
Cc: Hans Ulli Kroll <ulli.kroll@googlemail.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: devicetree@vger.kernel.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-rw-r--r-- | Documentation/devicetree/bindings/rtc/cortina,gemini.txt | 14 | ||||
-rw-r--r-- | drivers/rtc/rtc-gemini.c | 7 |
2 files changed, 21 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/rtc/cortina,gemini.txt b/Documentation/devicetree/bindings/rtc/cortina,gemini.txt new file mode 100644 index 000000000000..4ce4e794ddbb --- /dev/null +++ b/Documentation/devicetree/bindings/rtc/cortina,gemini.txt | |||
@@ -0,0 +1,14 @@ | |||
1 | * Cortina Systems Gemini RTC | ||
2 | |||
3 | Gemini SoC real-time clock. | ||
4 | |||
5 | Required properties: | ||
6 | - compatible : Should be "cortina,gemini-rtc" | ||
7 | |||
8 | Examples: | ||
9 | |||
10 | rtc@45000000 { | ||
11 | compatible = "cortina,gemini-rtc"; | ||
12 | reg = <0x45000000 0x100>; | ||
13 | interrupts = <17 IRQ_TYPE_LEVEL_HIGH>; | ||
14 | }; | ||
diff --git a/drivers/rtc/rtc-gemini.c b/drivers/rtc/rtc-gemini.c index 688debc14348..ccf0dbadb62d 100644 --- a/drivers/rtc/rtc-gemini.c +++ b/drivers/rtc/rtc-gemini.c | |||
@@ -159,9 +159,16 @@ static int gemini_rtc_remove(struct platform_device *pdev) | |||
159 | return 0; | 159 | return 0; |
160 | } | 160 | } |
161 | 161 | ||
162 | static const struct of_device_id gemini_rtc_dt_match[] = { | ||
163 | { .compatible = "cortina,gemini-rtc" }, | ||
164 | { } | ||
165 | }; | ||
166 | MODULE_DEVICE_TABLE(of, gemini_rtc_dt_match); | ||
167 | |||
162 | static struct platform_driver gemini_rtc_driver = { | 168 | static struct platform_driver gemini_rtc_driver = { |
163 | .driver = { | 169 | .driver = { |
164 | .name = DRV_NAME, | 170 | .name = DRV_NAME, |
171 | .of_match_table = gemini_rtc_dt_match, | ||
165 | }, | 172 | }, |
166 | .probe = gemini_rtc_probe, | 173 | .probe = gemini_rtc_probe, |
167 | .remove = gemini_rtc_remove, | 174 | .remove = gemini_rtc_remove, |