Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp5493539pxb; Wed, 26 Jan 2022 13:20:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJxAK301m3wTZTvkHZwVPK1DAuroDfr2SBLUKffR7G9zpYDm9Qrzbca8M3K1HeEFjDaBOBY4 X-Received: by 2002:a65:61ac:: with SMTP id i12mr511643pgv.565.1643232059690; Wed, 26 Jan 2022 13:20:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643232059; cv=none; d=google.com; s=arc-20160816; b=X5E9KjHBG96pGw0wU8f66RTKd8rBXkmNdbsRmfRCutVeuyLH9aieXhS0Lh2CpklkNd Pf6Y8vYzvohxoNtlMLJsBDGI11ZIRGTtJZqOaGhu3tdhRV2inHR5U1wOHPmyvCfgS41c KOnSM3TiAH9hZ07yxYbBIrTGKNxaCfhOx2+FhqVH+bFg2wBUd+GKHtQP22JGBCdmaxeB VlOr1pNemWKZtcQljVaRtuZYM1ruKOqkTk8bYkK4wWD/ysrU0ORmactKhGtGvLSm/ecB lnPUxWQZ3ZdvptKaMK55aGftM1inmRkdwzrBLhL0SH1UK3Gs+ixNf75BNbhCMh4ll5BF fdtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:message-id:references :in-reply-to:subject:cc:to:from:date:mime-version:dkim-signature; bh=plnDpuZ+bo7CJCuV30tQcSoqv0TdK7TfOFTAic4tXEI=; b=MOhBFhMZuSmuB0T/MtjQ2AxRopSOaoIVP6DAAtH0c9+9aHoQb/MYJc09ODUA5JgzvR Lh7TxF1rzJCFxKDTRX/qWGisBBUHMxLOulGY5/qynjekY5XYRQ6+6E7t4ar0x6APRuUu nMITi0Pq0DvyFfyrlHuMSHtiEOPpCkEOp2RJSRZ7K/sBb16hv+sg5/RIj+y1RuTG9p7Z G/8r0i+diumDJ9UYEPZQkkRs8mqesW4w4vbdXjP6W8I6RrPJaxgXVy8BXKcI66Gj13n7 kf28tpjpLC9hRo818Y7AzbxCovKZf8cY9wc6yqYdFcmPtXjzPWy5u16P7FKhxfp4kfAZ 4t9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@trvn.ru header.s=mail header.b=18RXvb27; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=trvn.ru Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d9si320457pgd.841.2022.01.26.13.20.47; Wed, 26 Jan 2022 13:20:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@trvn.ru header.s=mail header.b=18RXvb27; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=trvn.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239145AbiAZNYX (ORCPT + 99 others); Wed, 26 Jan 2022 08:24:23 -0500 Received: from box.trvn.ru ([194.87.146.52]:45461 "EHLO box.trvn.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239136AbiAZNYV (ORCPT ); Wed, 26 Jan 2022 08:24:21 -0500 Received: from authenticated-user (box.trvn.ru [194.87.146.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by box.trvn.ru (Postfix) with ESMTPSA id C6AC7400A0; Wed, 26 Jan 2022 18:24:17 +0500 (+05) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=trvn.ru; s=mail; t=1643203458; bh=TIAqSWeDfTOLeUG3TlRCM5ui07kZfc3DdPbP89AONOo=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=18RXvb27zDUIDkTT35TH84VfaQApu747yNNDxRyp3+VS2UObNXClzo2f08eE0N0ZY vj2bz7JYj+DxEl8i3kQzxjVaXVJjd5oJHNzvzSK5prUIoSOQBzBAjdJ+VTRf3Hw+Fx cgjWoOFuRVLMRgxUE6RQteCwxhoQpw5ivbJ7101Dqt14MxeDeuhPzsK/SrT4AQJeQb P0x+sR8e4XKgxO1tkgEz9Wf/JohOnoyQ+eD7UqcxUi0FIqt7jFEEyEUex6DTWqy4Dq jHAifDlnCa0+K3DSJxSfQNxQw1pw9/KdUkfIDwBWHg7ExGxswOTlJ8Swh8kdxwSbyj 34HhCPakqoZTg== MIME-Version: 1.0 Date: Wed, 26 Jan 2022 18:24:17 +0500 From: Nikita Travkin To: Krzysztof Kozlowski Cc: thierry.reding@gmail.com, lee.jones@linaro.org, u.kleine-koenig@pengutronix.de, robh+dt@kernel.org, sboyd@kernel.org, linus.walleij@linaro.org, masneyb@onstation.org, sean.anderson@seco.com, linux-pwm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht Subject: Re: [PATCH v4 1/2] dt-bindings: pwm: Document clk based PWM controller In-Reply-To: <48350476-605c-0775-7d18-2601d3360241@kernel.org> References: <20220126125849.75572-1-nikita@trvn.ru> <20220126125849.75572-2-nikita@trvn.ru> <48350476-605c-0775-7d18-2601d3360241@kernel.org> Message-ID: X-Sender: nikita@trvn.ru Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Krzysztof Kozlowski писал(а) 26.01.2022 18:14: > On 26/01/2022 13:58, Nikita Travkin wrote: >> Add YAML devicetree binding for clk based PWM controller >> >> Signed-off-by: Nikita Travkin >> -- >> Changes in v2: >> - fix the file name. >> Changes in v4: >> - Use generic node name in the dt bindings example. >> --- >> .../devicetree/bindings/pwm/clk-pwm.yaml | 45 +++++++++++++++++++ >> 1 file changed, 45 insertions(+) >> create mode 100644 Documentation/devicetree/bindings/pwm/clk-pwm.yaml >> >> diff --git a/Documentation/devicetree/bindings/pwm/clk-pwm.yaml b/Documentation/devicetree/bindings/pwm/clk-pwm.yaml >> new file mode 100644 >> index 000000000000..d3416ba549b5 >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/pwm/clk-pwm.yaml >> @@ -0,0 +1,45 @@ >> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause >> +%YAML 1.2 >> +--- >> +$id: http://devicetree.org/schemas/pwm/clk-pwm.yaml# >> +$schema: http://devicetree.org/meta-schemas/core.yaml# >> + >> +title: Clock based PWM controller >> + >> +maintainers: >> + - Nikita Travkin >> + >> +description: | >> + Some systems have clocks that can be exposed to external devices. >> + (e.g. by muxing them to GPIO pins) >> + It's often possible to control duty-cycle of such clocks which makes them >> + suitable for generating PWM signal. >> + >> +allOf: >> + - $ref: pwm.yaml# >> + >> +properties: >> + compatible: >> + const: clk-pwm >> + >> + clocks: >> + description: Clock used to generate the signal. >> + maxItems: 1 >> + >> + "#pwm-cells": >> + const: 2 >> + >> +unevaluatedProperties: false >> + >> +required: > > You need a compatible. pwm-cells can be skipped as pwm.yaml will require > them. > Oops, thanks for noticing that, will add. (Though I'd assume compatible to be implicitly required as the schema wouldn't even match otherwise...) Nikita >> + - clocks >> + >> +examples: >> + - | >> + pwm { >> + compatible = "clk-pwm"; >> + #pwm-cells = <2>; >> + clocks = <&gcc 0>; >> + pinctrl-names = "default"; >> + pinctrl-0 = <&pwm_clk_flash_default>; >> + }; > > > Best regards, > Krzysztof