From: Rob Herring <robh@kernel.org>
To: Krzysztof Kozlowski <krzk@kernel.org>
Cc: "Mark Rutland" <mark.rutland@arm.com>,
"Thierry Reding" <thierry.reding@gmail.com>,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
linux-clk@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
linux-leds@vger.kernel.org, linux-pwm@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-tegra@vger.kernel.org,
bcm-kernel-feedback-list@broadcom.com,
linux-rpi-kernel@lists.infradead.org,
linux-amlogic@lists.infradead.org,
linux-mediatek@lists.infradead.org,
linux-rockchip@lists.infradead.org,
linux-riscv@lists.infradead.org,
linux-stm32@st-md-mailman.stormreply.com
Subject: Re: [PATCH v3 1/2] dt-bindings: pwm: Convert PWM bindings to json-schema
Date: Thu, 10 Oct 2019 13:54:32 -0500 [thread overview]
Message-ID: <20191010185432.GA17457@bogus> (raw)
In-Reply-To: <20191002164047.14499-1-krzk@kernel.org>
On Wed, Oct 02, 2019 at 06:40:46PM +0200, Krzysztof Kozlowski wrote:
> Convert generic PWM bindings to DT schema format using json-schema. The
> consumer bindings are split to separate file.
>
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
>
> ---
>
> Changes since v2:
> 1. Change also pwm-sprd.txt
>
> Changes since v1:
> 1. Indent example with four spaces (more readable),
> 2. Change pattern for pwm nodes,
> 3. Remove $ref from #cells.
> ---
> diff --git a/Documentation/devicetree/bindings/pwm/pwm-consumers.yaml b/Documentation/devicetree/bindings/pwm/pwm-consumers.yaml
> new file mode 100644
> index 000000000000..39c844fe6338
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/pwm/pwm-consumers.yaml
> @@ -0,0 +1,76 @@
> +# SPDX-License-Identifier: GPL-2.0
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/pwm/pwm-consumers.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Specifying PWM information for devices
> +
> +maintainers:
> + - Thierry Reding <thierry.reding@gmail.com>
> +
> +description: |
> + PWM properties should be named "pwms". The exact meaning of each pwms
> + property must be documented in the device tree binding for each device.
> + An optional property "pwm-names" may contain a list of strings to label
> + each of the PWM devices listed in the "pwms" property. If no "pwm-names"
> + property is given, the name of the user node will be used as fallback.
> +
> + Drivers for devices that use more than a single PWM device can use the
> + "pwm-names" property to map the name of the PWM device requested by the
> + pwm_get() call to an index into the list given by the "pwms" property.
> +
> +properties:
> + pwms:
> + $ref: /schemas/types.yaml#/definitions/phandle-array
> + description: |
> + Phandle to PWM controller node and pwm-specifier (controller specific).
> + pwm-specifier typically encodes the chip-relative PWM number and the PWM
> + period in nanoseconds.
> + Optionally, the pwm-specifier can encode a number of flags (defined in
> + <dt-bindings/pwm/pwm.h>) in a third cell:
> + - PWM_POLARITY_INVERTED: invert the PWM signal polarity
> +
> + pwm-names:
> + $ref: /schemas/types.yaml#/definitions/string-array
> + description:
> + A list of strings to label each of the PWM devices listed in the "pwms"
> + property. If no "pwm-names" property is given, the name of the user node
> + will be used as fallback.
> +
> +required:
> + - pwms
This schema is never applied because it has no 'select' which is only
automatic for $nodename or compatible. You could include this from other
schemas, but why? Any consumer still has to list these properties to
define their specific constraints.
We already have a schema in dtschema for consumer side. It's just
missing descriptions which needs relicensing from this.
> +
> +dependencies:
> + pwm-names: [ pwms ]
prev parent reply other threads:[~2019-10-10 18:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-02 16:40 [PATCH v3 1/2] dt-bindings: pwm: Convert PWM bindings to json-schema Krzysztof Kozlowski
2019-10-02 16:40 ` [PATCH v3 2/2] dt-bindings: pwm: Convert Samsung " Krzysztof Kozlowski
2019-10-10 18:58 ` Rob Herring
2019-10-08 23:46 ` [PATCH v3 1/2] dt-bindings: pwm: Convert " Paul Walmsley
2019-10-10 18:54 ` Rob Herring [this message]
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=20191010185432.GA17457@bogus \
--to=robh@kernel.org \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=krzk@kernel.org \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-pwm@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=linux-rpi-kernel@lists.infradead.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=linux-tegra@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=thierry.reding@gmail.com \
--cc=u.kleine-koenig@pengutronix.de \
/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).