devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Sean Anderson <sean.anderson@seco.com>, Nikita Travkin <nikita@trvn.ru>
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, linux-pwm@vger.kernel.org,
	devicetree@vger.kernel.org,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	~postmarketos/upstreaming@lists.sr.ht
Subject: Re: [PATCH v3 2/3] dt-bindings: pwm: Document clk based PWM controller
Date: Sat, 22 Jan 2022 11:13:46 +0100	[thread overview]
Message-ID: <062bd1a9-e89c-cac4-de6e-0934c2d844ff@kernel.org> (raw)
In-Reply-To: <1d9b1db0-981d-f77a-063a-69c8a4d53343@seco.com>

On 21/01/2022 22:34, Sean Anderson wrote:
> 
> 
> On 1/21/22 2:34 AM, Krzysztof Kozlowski wrote:
>> On Thu, 20 Jan 2022 at 17:15, Nikita Travkin <nikita@trvn.ru> wrote:
>>>
>>> Add YAML devicetree binding for clk based PWM controller
>>>
>>> Signed-off-by: Nikita Travkin <nikita@trvn.ru>
>>> --
>>> Changes in v2:
>>>  - fix the file name.
>>> ---
>>>  .../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..4fb2c1baaad4
>>> --- /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 <nikita@trvn.ru>
>>> +
>>> +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:
>>> +  - clocks
>>> +
>>> +examples:
>>> +  - |
>>> +    pwm-flash {
>>
>> Node names should be generic (see devicetree specification), so just "pwm".
> 
> And then what will you do if you have two clock-based pwms?

The same as we do with fixed clocks, keys and so on:
pwm-0
pwm-1
pwm-2

A descriptive suffix also appears, but there is no justification to use
it here. There is only one node in the example.


Best regards,
Krzysztof

  reply	other threads:[~2022-01-22 10:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-20 16:14 [PATCH v3 0/3] Clock based PWM output driver Nikita Travkin
2022-01-20 16:14 ` [PATCH v3 1/3] dt-bindings: pwm: Fix node name pattern Nikita Travkin
2022-01-20 19:15   ` Rob Herring
2022-01-21  6:20     ` Nikita Travkin
2022-01-20 16:14 ` [PATCH v3 2/3] dt-bindings: pwm: Document clk based PWM controller Nikita Travkin
2022-01-21  7:34   ` Krzysztof Kozlowski
2022-01-21 21:34     ` Sean Anderson
2022-01-22 10:13       ` Krzysztof Kozlowski [this message]
2022-01-20 16:14 ` [PATCH v3 3/3] pwm: Add clock based PWM output driver Nikita Travkin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=062bd1a9-e89c-cac4-de6e-0934c2d844ff@kernel.org \
    --to=krzk@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=lee.jones@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=masneyb@onstation.org \
    --cc=nikita@trvn.ru \
    --cc=robh+dt@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=sean.anderson@seco.com \
    --cc=thierry.reding@gmail.com \
    --cc=u.kleine-koenig@pengutronix.de \
    --cc=~postmarketos/upstreaming@lists.sr.ht \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).