linux-rtc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2 v2] rtc: x1205: Add DT bindings
@ 2019-03-19  7:40 Linus Walleij
  2019-03-19  7:40 ` [PATCH 2/2 v2] rtc: x1205: Add DT probing support Linus Walleij
  2019-03-22  6:23 ` [PATCH 1/2 v2] rtc: x1205: Add DT bindings Alexandre Belloni
  0 siblings, 2 replies; 3+ messages in thread
From: Linus Walleij @ 2019-03-19  7:40 UTC (permalink / raw)
  To: Alessandro Zummo, Alexandre Belloni; +Cc: linux-rtc, Linus Walleij, devicetree

This adds device tree bindings for the Xircom X1205 RTC found
in the Linksys NSLU2.

Cc: devicetree@vger.kernel.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
ChangeLog v1->v2:
- Rebase on v5.1-rc1
- Resend
---
 .../devicetree/bindings/rtc/xircom,x1205.txt         | 12 ++++++++++++
 1 file changed, 12 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/rtc/xircom,x1205.txt

diff --git a/Documentation/devicetree/bindings/rtc/xircom,x1205.txt b/Documentation/devicetree/bindings/rtc/xircom,x1205.txt
new file mode 100644
index 000000000000..3e3102a32728
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/xircom,x1205.txt
@@ -0,0 +1,12 @@
+* Xircom X1205 I2C RTC
+
+Required properties:
+- compatible: Should be "xircom,x1205"
+- reg: I2C address
+
+Example:
+
+rtc@6f {
+	compatible = "xicor,x1205";
+	reg = <0x6f>;
+};
-- 
2.20.1


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

* [PATCH 2/2 v2] rtc: x1205: Add DT probing support
  2019-03-19  7:40 [PATCH 1/2 v2] rtc: x1205: Add DT bindings Linus Walleij
@ 2019-03-19  7:40 ` Linus Walleij
  2019-03-22  6:23 ` [PATCH 1/2 v2] rtc: x1205: Add DT bindings Alexandre Belloni
  1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2019-03-19  7:40 UTC (permalink / raw)
  To: Alessandro Zummo, Alexandre Belloni; +Cc: linux-rtc, Linus Walleij

This makes it possible to probe the X1205 RTC from the
device tree. This is needed when adding device tree boot
support for the IXP4xx-based NSLU2 which has this RTC.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
ChangeLog v1->v2:
- Add terminating {} to DT compatible list.
- Rebase on v5.1-rc1
- Resend
---
 drivers/rtc/rtc-x1205.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/rtc/rtc-x1205.c b/drivers/rtc/rtc-x1205.c
index f08f18e4fcdf..ad2ae2f0536e 100644
--- a/drivers/rtc/rtc-x1205.c
+++ b/drivers/rtc/rtc-x1205.c
@@ -673,9 +673,16 @@ static const struct i2c_device_id x1205_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, x1205_id);
 
+static const struct of_device_id x1205_dt_ids[] = {
+	{ .compatible = "xircom,x1205", },
+	{},
+};
+MODULE_DEVICE_TABLE(of, x1205_dt_ids);
+
 static struct i2c_driver x1205_driver = {
 	.driver		= {
 		.name	= "rtc-x1205",
+		.of_match_table = x1205_dt_ids,
 	},
 	.probe		= x1205_probe,
 	.remove		= x1205_remove,
-- 
2.20.1


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

* Re: [PATCH 1/2 v2] rtc: x1205: Add DT bindings
  2019-03-19  7:40 [PATCH 1/2 v2] rtc: x1205: Add DT bindings Linus Walleij
  2019-03-19  7:40 ` [PATCH 2/2 v2] rtc: x1205: Add DT probing support Linus Walleij
@ 2019-03-22  6:23 ` Alexandre Belloni
  1 sibling, 0 replies; 3+ messages in thread
From: Alexandre Belloni @ 2019-03-22  6:23 UTC (permalink / raw)
  To: Linus Walleij; +Cc: Alessandro Zummo, linux-rtc, devicetree

On 19/03/2019 08:40:13+0100, Linus Walleij wrote:
> This adds device tree bindings for the Xircom X1205 RTC found
> in the Linksys NSLU2.
> 
> Cc: devicetree@vger.kernel.org
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> ChangeLog v1->v2:
> - Rebase on v5.1-rc1
> - Resend
> ---
>  .../devicetree/bindings/rtc/xircom,x1205.txt         | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/rtc/xircom,x1205.txt
> 

Both applied (this time), thanks!

I've moved the doc to rtc.txt as this is a trivial rtc.

-- 
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

end of thread, other threads:[~2019-03-22  6:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-19  7:40 [PATCH 1/2 v2] rtc: x1205: Add DT bindings Linus Walleij
2019-03-19  7:40 ` [PATCH 2/2 v2] rtc: x1205: Add DT probing support Linus Walleij
2019-03-22  6:23 ` [PATCH 1/2 v2] rtc: x1205: Add DT bindings Alexandre Belloni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).