linux-rtc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 2/8] dt-bindings: rtc: realtek: Convert RTD119x to schema
       [not found] <20191020040817.16882-1-afaerber@suse.de>
@ 2019-10-20  4:08 ` Andreas Färber
  2019-10-25 21:20   ` Rob Herring
  0 siblings, 1 reply; 4+ messages in thread
From: Andreas Färber @ 2019-10-20  4:08 UTC (permalink / raw)
  To: linux-realtek-soc
  Cc: linux-arm-kernel, Andreas Färber, Alessandro Zummo,
	Alexandre Belloni, Rob Herring, Mark Rutland, linux-rtc,
	devicetree, linux-kernel

Convert the RTD119x binding to a YAML schema.

Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 v2: New
 
 .../devicetree/bindings/rtc/realtek,rtd119x.txt    | 16 ---------
 .../devicetree/bindings/rtc/realtek,rtd119x.yaml   | 38 ++++++++++++++++++++++
 2 files changed, 38 insertions(+), 16 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/rtc/realtek,rtd119x.txt
 create mode 100644 Documentation/devicetree/bindings/rtc/realtek,rtd119x.yaml

diff --git a/Documentation/devicetree/bindings/rtc/realtek,rtd119x.txt b/Documentation/devicetree/bindings/rtc/realtek,rtd119x.txt
deleted file mode 100644
index bbf1ccb5df31..000000000000
--- a/Documentation/devicetree/bindings/rtc/realtek,rtd119x.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-Realtek RTD129x Real-Time Clock
-===============================
-
-Required properties:
-- compatible :  Should be "realtek,rtd1295-rtc"
-- reg        :  Specifies the physical base address and size
-- clocks     :  Specifies the clock gate
-
-
-Example:
-
-	rtc@9801b600 {
-		compatible = "realtek,rtd1295-clk";
-		reg = <0x9801b600 0x100>;
-		clocks = <&clkc RTD1295_CLK_EN_MISC_RTC>;
-	};
diff --git a/Documentation/devicetree/bindings/rtc/realtek,rtd119x.yaml b/Documentation/devicetree/bindings/rtc/realtek,rtd119x.yaml
new file mode 100644
index 000000000000..71b7396bd469
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/realtek,rtd119x.yaml
@@ -0,0 +1,38 @@
+# SPDX-License-Identifier: GPL-2.0-or-later OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/rtc/realtek,rtd119x.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Realtek RTD129x Real-Time Clock
+
+allOf:
+  - $ref: "rtc.yaml#"
+
+maintainers:
+  - Andreas Färber <afaerber@suse.de>
+
+properties:
+  compatible:
+    const: realtek,rtd1295-rtc
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+    description: Specifies the clock gate
+
+required:
+  - compatible
+  - reg
+  - clocks
+
+examples:
+  - |
+	rtc@9801b600 {
+		compatible = "realtek,rtd1295-clk";
+		reg = <0x9801b600 0x100>;
+		clocks = <&clkc RTD1295_CLK_EN_MISC_RTC>;
+	};
+...
-- 
2.16.4


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

* Re: [PATCH v2 2/8] dt-bindings: rtc: realtek: Convert RTD119x to schema
  2019-10-20  4:08 ` [PATCH v2 2/8] dt-bindings: rtc: realtek: Convert RTD119x to schema Andreas Färber
@ 2019-10-25 21:20   ` Rob Herring
  2019-10-28 10:46     ` Andreas Färber
  0 siblings, 1 reply; 4+ messages in thread
From: Rob Herring @ 2019-10-25 21:20 UTC (permalink / raw)
  To: Andreas Färber
  Cc: linux-realtek-soc, linux-arm-kernel, Alessandro Zummo,
	Alexandre Belloni, Mark Rutland, linux-rtc, devicetree,
	linux-kernel

On Sun, Oct 20, 2019 at 06:08:11AM +0200, Andreas Färber wrote:
> Convert the RTD119x binding to a YAML schema.
> 
> Signed-off-by: Andreas Färber <afaerber@suse.de>
> ---
>  v2: New
>  
>  .../devicetree/bindings/rtc/realtek,rtd119x.txt    | 16 ---------
>  .../devicetree/bindings/rtc/realtek,rtd119x.yaml   | 38 ++++++++++++++++++++++
>  2 files changed, 38 insertions(+), 16 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/rtc/realtek,rtd119x.txt
>  create mode 100644 Documentation/devicetree/bindings/rtc/realtek,rtd119x.yaml


> diff --git a/Documentation/devicetree/bindings/rtc/realtek,rtd119x.yaml b/Documentation/devicetree/bindings/rtc/realtek,rtd119x.yaml
> new file mode 100644
> index 000000000000..71b7396bd469
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/rtc/realtek,rtd119x.yaml
> @@ -0,0 +1,38 @@
> +# SPDX-License-Identifier: GPL-2.0-or-later OR BSD-2-Clause

Missing ()

Though I'm not sure it matters other than consistency.

> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/rtc/realtek,rtd119x.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Realtek RTD129x Real-Time Clock
> +
> +allOf:
> +  - $ref: "rtc.yaml#"
> +
> +maintainers:
> +  - Andreas Färber <afaerber@suse.de>
> +
> +properties:
> +  compatible:
> +    const: realtek,rtd1295-rtc
> +
> +  reg:
> +    maxItems: 1
> +
> +  clocks:
> +    maxItems: 1
> +    description: Specifies the clock gate
> +
> +required:
> +  - compatible
> +  - reg
> +  - clocks
> +
> +examples:
> +  - |
> +	rtc@9801b600 {
> +		compatible = "realtek,rtd1295-clk";
> +		reg = <0x9801b600 0x100>;
> +		clocks = <&clkc RTD1295_CLK_EN_MISC_RTC>;

You need the include file here or the example won't build (run 'make 
dt_binding_check').

> +	};
> +...
> -- 
> 2.16.4
> 

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

* Re: [PATCH v2 2/8] dt-bindings: rtc: realtek: Convert RTD119x to schema
  2019-10-25 21:20   ` Rob Herring
@ 2019-10-28 10:46     ` Andreas Färber
  2019-10-28 11:29       ` Alexandre Belloni
  0 siblings, 1 reply; 4+ messages in thread
From: Andreas Färber @ 2019-10-28 10:46 UTC (permalink / raw)
  To: Rob Herring
  Cc: linux-realtek-soc, linux-arm-kernel, Alessandro Zummo,
	Alexandre Belloni, Mark Rutland, linux-rtc, devicetree,
	linux-kernel

Am 25.10.19 um 23:20 schrieb Rob Herring:
> On Sun, Oct 20, 2019 at 06:08:11AM +0200, Andreas Färber wrote:
>> Convert the RTD119x binding to a YAML schema.
>>
>> Signed-off-by: Andreas Färber <afaerber@suse.de>
>> ---
>>  v2: New
>>  
>>  .../devicetree/bindings/rtc/realtek,rtd119x.txt    | 16 ---------
>>  .../devicetree/bindings/rtc/realtek,rtd119x.yaml   | 38 ++++++++++++++++++++++
>>  2 files changed, 38 insertions(+), 16 deletions(-)
>>  delete mode 100644 Documentation/devicetree/bindings/rtc/realtek,rtd119x.txt
>>  create mode 100644 Documentation/devicetree/bindings/rtc/realtek,rtd119x.yaml
> 
> 
>> diff --git a/Documentation/devicetree/bindings/rtc/realtek,rtd119x.yaml b/Documentation/devicetree/bindings/rtc/realtek,rtd119x.yaml
>> new file mode 100644
>> index 000000000000..71b7396bd469
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/rtc/realtek,rtd119x.yaml

While renaming the file to .yaml I would like to also rename it to 1195.
It would need to be 1x9x to cover RTD1195 and e.g. RTD1296, and looking
forward the wildcard may need to be 1xxx to cover also RTD1619, which
quickly becomes unrecognizable.

>> @@ -0,0 +1,38 @@
>> +# SPDX-License-Identifier: GPL-2.0-or-later OR BSD-2-Clause
> 
> Missing ()

Fixed.

> 
> Though I'm not sure it matters other than consistency.
> 
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/rtc/realtek,rtd119x.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Realtek RTD129x Real-Time Clock
>> +
>> +allOf:
>> +  - $ref: "rtc.yaml#"
>> +
>> +maintainers:
>> +  - Andreas Färber <afaerber@suse.de>
>> +
>> +properties:
>> +  compatible:
>> +    const: realtek,rtd1295-rtc
>> +
>> +  reg:
>> +    maxItems: 1
>> +
>> +  clocks:
>> +    maxItems: 1
>> +    description: Specifies the clock gate
>> +
>> +required:
>> +  - compatible
>> +  - reg
>> +  - clocks
>> +
>> +examples:
>> +  - |
>> +	rtc@9801b600 {
>> +		compatible = "realtek,rtd1295-clk";

This reveals a bug in the original binding example. Fixed to -rtc.

>> +		reg = <0x9801b600 0x100>;
>> +		clocks = <&clkc RTD1295_CLK_EN_MISC_RTC>;
> 
> You need the include file here or the example won't build (run 'make 
> dt_binding_check').

We can't. You acked the clk binding but the driver never got any review,
so it didn't get merged and cannot be depended on here.

I've changed it to an artificial 42 so that dt_binding_check passes.
I've also needed to fix the indentation to 4 spaces.

Regards,
Andreas

> 
>> +	};
>> +...
>> -- 
>> 2.16.4
>>


-- 
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer
HRB 36809 (AG Nürnberg)

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

* Re: [PATCH v2 2/8] dt-bindings: rtc: realtek: Convert RTD119x to schema
  2019-10-28 10:46     ` Andreas Färber
@ 2019-10-28 11:29       ` Alexandre Belloni
  0 siblings, 0 replies; 4+ messages in thread
From: Alexandre Belloni @ 2019-10-28 11:29 UTC (permalink / raw)
  To: Andreas Färber
  Cc: Rob Herring, linux-realtek-soc, linux-arm-kernel,
	Alessandro Zummo, Mark Rutland, linux-rtc, devicetree,
	linux-kernel

On 28/10/2019 11:46:48+0100, Andreas Färber wrote:
> Am 25.10.19 um 23:20 schrieb Rob Herring:
> > On Sun, Oct 20, 2019 at 06:08:11AM +0200, Andreas Färber wrote:
> >> Convert the RTD119x binding to a YAML schema.
> >>
> >> Signed-off-by: Andreas Färber <afaerber@suse.de>
> >> ---
> >>  v2: New
> >>  
> >>  .../devicetree/bindings/rtc/realtek,rtd119x.txt    | 16 ---------
> >>  .../devicetree/bindings/rtc/realtek,rtd119x.yaml   | 38 ++++++++++++++++++++++
> >>  2 files changed, 38 insertions(+), 16 deletions(-)
> >>  delete mode 100644 Documentation/devicetree/bindings/rtc/realtek,rtd119x.txt
> >>  create mode 100644 Documentation/devicetree/bindings/rtc/realtek,rtd119x.yaml
> > 
> > 
> >> diff --git a/Documentation/devicetree/bindings/rtc/realtek,rtd119x.yaml b/Documentation/devicetree/bindings/rtc/realtek,rtd119x.yaml
> >> new file mode 100644
> >> index 000000000000..71b7396bd469
> >> --- /dev/null
> >> +++ b/Documentation/devicetree/bindings/rtc/realtek,rtd119x.yaml
> 
> While renaming the file to .yaml I would like to also rename it to 1195.
> It would need to be 1x9x to cover RTD1195 and e.g. RTD1296, and looking
> forward the wildcard may need to be 1xxx to cover also RTD1619, which
> quickly becomes unrecognizable.
> 

I'm fine with removing wildcards as much as possible.


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

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

end of thread, other threads:[~2019-10-28 11:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20191020040817.16882-1-afaerber@suse.de>
2019-10-20  4:08 ` [PATCH v2 2/8] dt-bindings: rtc: realtek: Convert RTD119x to schema Andreas Färber
2019-10-25 21:20   ` Rob Herring
2019-10-28 10:46     ` Andreas Färber
2019-10-28 11:29       ` 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).