[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <zfjj33otyxiamsc7u2uwnvygcuhe7u2tfgiz6txp62emnddbw5@5iozmjg4eugn>
Date: Mon, 30 Dec 2024 08:54:36 +0100
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Xukai Wang <kingxukai@...omail.com>
Cc: Michael Turquette <mturquette@...libre.com>,
Stephen Boyd <sboyd@...nel.org>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>,
Paul Walmsley <paul.walmsley@...ive.com>, Palmer Dabbelt <palmer@...belt.com>,
Albert Ou <aou@...s.berkeley.edu>, linux-clk@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-riscv@...ts.infradead.org,
Troy Mitchell <TroyMitchell988@...il.com>
Subject: Re: [PATCH 1/3] dt-bindings: clock: Add bindings for Canaan K230
clock controller
On Sun, Dec 29, 2024 at 09:21:08PM +0800, Xukai Wang wrote:
> This patch adds the Device Tree binding for the clock controller
> on Canaan k230. The binding defines the new clocks available and
> the required properties to configure them correctly.
>
> Signed-off-by: Xukai Wang <kingxukai@...omail.com>
> ---
> .../devicetree/bindings/clock/canaan,k230-clk.yaml | 41 ++++++++++++++++++
> include/dt-bindings/clock/k230-clk.h | 49 ++++++++++++++++++++++
> 2 files changed, 90 insertions(+)
Please run scripts/checkpatch.pl and fix reported warnings. After that,
run also 'scripts/checkpatch.pl --strict' and (probably) fix more
warnings. Some warnings can be ignored, especially from --strict run,
but the code here looks like it needs a fix. Feel free to get in touch
if the warning is not clear.
>
> diff --git a/Documentation/devicetree/bindings/clock/canaan,k230-clk.yaml b/Documentation/devicetree/bindings/clock/canaan,k230-clk.yaml
> new file mode 100644
> index 0000000000000000000000000000000000000000..ffd4e0b052455bf3dcedd9355d93764119df3d68
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/clock/canaan,k230-clk.yaml
> @@ -0,0 +1,41 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/clock/canaan,k230-clk.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Canaan Kendryte K230 Clock
> +
> +maintainers:
> + - Xukai Wang <kingxukai@...omail.com>
> +
> +properties:
> + compatible:
> + const: canaan,k230-clk
> +
> + clocks:
> + const: 1
> +
> + reg:
> + maxItems: 2
> + minItems: 1
List and describe the items instead.
> +
> + '#clock-cells':
> + const: 1
> +
> +required:
> + - compatible
> + - reg
> + - clocks
> + - '#clock-cells'
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + clock-controller@...02000 {
> + compatible = "canaan,k230-clk";
> + reg = <0x91102000 0x1000>, <0x91100000 0x1000>;
> + #clock-cells = <1>;
> + clocks = <&osc24m>;
> + };
> diff --git a/include/dt-bindings/clock/k230-clk.h b/include/dt-bindings/clock/k230-clk.h
> new file mode 100644
> index 0000000000000000000000000000000000000000..31d1f82fbcff654072ef1a8985a884377d801e72
> --- /dev/null
> +++ b/include/dt-bindings/clock/k230-clk.h
> @@ -0,0 +1,49 @@
> +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
> +/*
> + * Kendryte Canaan K230 Clock Drivers
> + *
> + * Author: Xukai Wang <kingxukai@...omail.com>
> + */
> +
> +#ifndef CLOCK_K230_CLK_H
> +#define CLOCK_K230_CLK_H
> +
> +/* Kendryte K230 SoC clock identifiers (arbitrary values). */
> +#define K230_CPU0_SRC 0
Drop the indentation after '#define'
Best regards,
Krzysztof
Powered by blists - more mailing lists