diff mbox series

[v2,1/4] dt-bindings: clock: Add simple-clock-controller

Message ID 20230416173302.1185683-2-mmyangfl@gmail.com (mailing list archive)
State Superseded, archived
Headers show
Series clk: Add basic register clock controller | expand

Commit Message

David Yang April 16, 2023, 5:32 p.m. UTC
Add DT bindings documentation for simple-clock-controller, mutex
controller for clocks.

Signed-off-by: David Yang <mmyangfl@gmail.com>
---
 .../clock/simple-clock-controller.yaml        | 50 +++++++++++++++++++
 1 file changed, 50 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/simple-clock-controller.yaml

Comments

Krzysztof Kozlowski April 16, 2023, 5:38 p.m. UTC | #1
On 16/04/2023 19:32, David Yang wrote:
> Add DT bindings documentation for simple-clock-controller, mutex
> controller for clocks.
> 
> Signed-off-by: David Yang <mmyangfl@gmail.com>
> ---
>  .../clock/simple-clock-controller.yaml        | 50 +++++++++++++++++++

Where is the changelog?

>  1 file changed, 50 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/clock/simple-clock-controller.yaml
> 
> diff --git a/Documentation/devicetree/bindings/clock/simple-clock-controller.yaml b/Documentation/devicetree/bindings/clock/simple-clock-controller.yaml
> new file mode 100644
> index 000000000000..17835aeddb1d
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/clock/simple-clock-controller.yaml
> @@ -0,0 +1,50 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/clock/simple-clock-controller.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Simple clock controller
> +
> +maintainers:
> +  - David Yang <mmyangfl@gmail.com>
> +
> +description: |
> +  Driver (lock provider) for real clocks.

Drop driver references. Typo: clock, not lock.

What is a real clock? What is an unreal clock?

> +
> +  Usually one register controls more than one clocks. This controller avoids
> +  write conflicts by imposing a write lock, so that two operations on the same
> +  register will not happen at the same time.

Interesting. How the clock controller imposes write locks? Aren't you
now mixing drivers and hardware?


> +
> +properties:
> +  compatible:
> +    items:
> +      - oneOf:
> +          - const: simple-clock-controller
> +          - const: simple-clock-reset-controller

Why two?

> +      - const: syscon
> +      - const: simple-mfd

Why do you need syscon and simple-mfd?

> +
> +  reg:
> +    maxItems: 1
> +
> +  '#reset-cells':
> +    const: 2
> +
> +patternProperties:
> +  "clock@.*":

Use consistent quotes.

Anyway, I don't understand what is happening here and why such changes.
Nothing is explained...


Best regards,
Krzysztof
David Yang April 16, 2023, 6:22 p.m. UTC | #2
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> 于2023年4月17日周一 01:38写道:
>
> On 16/04/2023 19:32, David Yang wrote:
> > Add DT bindings documentation for simple-clock-controller, mutex
> > controller for clocks.
> >
> > Signed-off-by: David Yang <mmyangfl@gmail.com>
> > ---
> >  .../clock/simple-clock-controller.yaml        | 50 +++++++++++++++++++
>
> Where is the changelog?

What changelog? Series changelog already included in series cover.
Krzysztof Kozlowski April 16, 2023, 6:27 p.m. UTC | #3
On 16/04/2023 20:22, Yangfl wrote:
> Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> 于2023年4月17日周一 01:38写道:
>>
>> On 16/04/2023 19:32, David Yang wrote:
>>> Add DT bindings documentation for simple-clock-controller, mutex
>>> controller for clocks.
>>>
>>> Signed-off-by: David Yang <mmyangfl@gmail.com>
>>> ---
>>>  .../clock/simple-clock-controller.yaml        | 50 +++++++++++++++++++
>>
>> Where is the changelog?
> 
> What changelog? Series changelog already included in series cover.

Changelog of each patch, since there is no cover letter. If you skip
some people from CC, then be sure they get cover letter (if such exists).


Best regards,
Krzysztof
David Yang April 17, 2023, 6:08 p.m. UTC | #4
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> 于2023年4月17日周一 01:38写道:
>
> On 16/04/2023 19:32, David Yang wrote:
> > Add DT bindings documentation for simple-clock-controller, mutex
> > controller for clocks.
> >
> > Signed-off-by: David Yang <mmyangfl@gmail.com>
> > ---
> >  .../clock/simple-clock-controller.yaml        | 50 +++++++++++++++++++
>
> Where is the changelog?
>

Cover now send with v3.

> >  1 file changed, 50 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/clock/simple-clock-controller.yaml
> >
> > diff --git a/Documentation/devicetree/bindings/clock/simple-clock-controller.yaml b/Documentation/devicetree/bindings/clock/simple-clock-controller.yaml
> > new file mode 100644
> > index 000000000000..17835aeddb1d
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/clock/simple-clock-controller.yaml
> > @@ -0,0 +1,50 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/clock/simple-clock-controller.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Simple clock controller
> > +
> > +maintainers:
> > +  - David Yang <mmyangfl@gmail.com>
> > +
> > +description: |
> > +  Driver (lock provider) for real clocks.
>
> Drop driver references. Typo: clock, not lock.
>
> What is a real clock? What is an unreal clock?
>

Rewrite description in v3. The controller is kinda unreal since it
does not require any operation to "enable" the controller, but such
description is avoided in v3.

> > +
> > +  Usually one register controls more than one clocks. This controller avoids
> > +  write conflicts by imposing a write lock, so that two operations on the same
> > +  register will not happen at the same time.
>
> Interesting. How the clock controller imposes write locks? Aren't you
> now mixing drivers and hardware?

Avoided driver details in device description in v3.

>
>
> > +
> > +properties:
> > +  compatible:
> > +    items:
> > +      - oneOf:
> > +          - const: simple-clock-controller
> > +          - const: simple-clock-reset-controller
>
> Why two?

It may also handle reset requests. But removed in v3 for further consideration.

>
> > +      - const: syscon
> > +      - const: simple-mfd
>
> Why do you need syscon and simple-mfd?

Kinda typo. Removed in v3.

>
> > +
> > +  reg:
> > +    maxItems: 1
> > +
> > +  '#reset-cells':
> > +    const: 2
> > +
> > +patternProperties:
> > +  "clock@.*":
>
> Use consistent quotes.

Fixed in v3.

>
> Anyway, I don't understand what is happening here and why such changes.
> Nothing is explained...
>
>
> Best regards,
> Krzysztof
>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/clock/simple-clock-controller.yaml b/Documentation/devicetree/bindings/clock/simple-clock-controller.yaml
new file mode 100644
index 000000000000..17835aeddb1d
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/simple-clock-controller.yaml
@@ -0,0 +1,50 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/simple-clock-controller.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Simple clock controller
+
+maintainers:
+  - David Yang <mmyangfl@gmail.com>
+
+description: |
+  Driver (lock provider) for real clocks.
+
+  Usually one register controls more than one clocks. This controller avoids
+  write conflicts by imposing a write lock, so that two operations on the same
+  register will not happen at the same time.
+
+properties:
+  compatible:
+    items:
+      - oneOf:
+          - const: simple-clock-controller
+          - const: simple-clock-reset-controller
+      - const: syscon
+      - const: simple-mfd
+
+  reg:
+    maxItems: 1
+
+  '#reset-cells':
+    const: 2
+
+patternProperties:
+  "clock@.*":
+    type: object
+    description: Clock nodes.
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    clock-controller@ffff000 {
+      compatible = "simple-clock-controller", "syscon", "simple-mfd";
+      reg = <0xffff000 0x1000>;
+    };