From: Rob Herring <robh@kernel.org>
To: "Marek Behún" <marek.behun@nic.cz>
Cc: "Andrew Lunn" <andrew@lunn.ch>,
netdev@vger.kernel.org, linux-leds@vger.kernel.org,
"Pavel Machek" <pavel@ucw.cz>, "Dan Murphy" <dmurphy@ti.com>,
"Ondřej Jirman" <megous@megous.com>,
"Russell King" <linux@armlinux.org.uk>,
linux-kernel@vger.kernel.org,
"Matthias Schiffer" <matthias.schiffer@ew.tq-group.com>,
"David S. Miller" <davem@davemloft.net>,
devicetree@vger.kernel.org
Subject: Re: [PATCH net-next + leds v2 1/7] dt-bindings: leds: document binding for HW controlled LEDs
Date: Wed, 9 Sep 2020 14:59:23 -0600 [thread overview]
Message-ID: <20200909205923.GB3056507@bogus> (raw)
In-Reply-To: <20200909203310.15ca4e42@dellmb.labs.office.nic.cz>
On Wed, Sep 09, 2020 at 08:33:10PM +0200, Marek Behún wrote:
> On Wed, 9 Sep 2020 20:27:30 +0200
> Andrew Lunn <andrew@lunn.ch> wrote:
>
> > On Wed, Sep 09, 2020 at 06:25:46PM +0200, Marek Behún wrote:
> > > Document binding for LEDs connected to and controlled by various
> > > chips (such as ethernet PHY chips).
> > >
> > > Signed-off-by: Marek Behún <marek.behun@nic.cz>
> > > Cc: Rob Herring <robh+dt@kernel.org>
> > > Cc: devicetree@vger.kernel.org
> > > ---
> > > .../leds/linux,hw-controlled-leds.yaml | 99
> > > +++++++++++++++++++ 1 file changed, 99 insertions(+)
> > > create mode 100644
> > > Documentation/devicetree/bindings/leds/linux,hw-controlled-leds.yaml
> > >
> > > diff --git
> > > a/Documentation/devicetree/bindings/leds/linux,hw-controlled-leds.yaml
> > > b/Documentation/devicetree/bindings/leds/linux,hw-controlled-leds.yaml
> > > new file mode 100644 index 0000000000000..eaf6e5d80c5f5 ---
> > > /dev/null +++
> > > b/Documentation/devicetree/bindings/leds/linux,hw-controlled-leds.yaml
> > > @@ -0,0 +1,99 @@ +# SPDX-License-Identifier: GPL-2.0-only OR
> > > BSD-2-Clause +%YAML 1.2
> > > +---
> > > +$id:
> > > http://devicetree.org/schemas/leds/linux,hw-controlled-leds.yaml#
> > > +$schema: http://devicetree.org/meta-schemas/core.yaml# +
> > > +title: LEDs that can be controlled by hardware (eg. by an ethernet
> > > PHY chip) +
> > > +maintainers:
> > > + - Marek Behún <marek.behun@nic.cz>
> > > +
> > > +description:
> > > + Many an ethernet PHY (and other chips) supports various HW
> > > control modes
> > > + for LEDs connected directly to them. With this binding such LEDs
> > > can be
> > > + described.
> > > +
> > > +properties:
> > > + compatible:
> > > + const: linux,hw-controlled-leds
> > > +
> > > + "#address-cells":
> > > + const: 1
> > > +
> > > + "#size-cells":
> > > + const: 0
> > > +
> > > +patternProperties:
> > > + "^led@[0-9a-f]+$":
> > > + type: object
> > > + allOf:
> > > + - $ref: common.yaml#
> > > + description:
> > > + This node represents a LED device connected to a chip that
> > > can control
> > > + the LED in various HW controlled modes.
> > > +
> > > + properties:
> > > + reg:
> > > + maxItems: 1
> > > + description:
> > > + This property identifies the LED to the chip the LED is
> > > connected to
> > > + (eg. an ethernet PHY chip can have multiple LEDs
> > > connected to it). +
> > > + enable-active-high:
> > > + description:
> > > + Polarity of LED is active high. If missing, assumed
> > > default is active
> > > + low.
> > > + type: boolean
> > > +
> > > + led-tristate:
> > > + description:
> > > + LED pin is tristate type. If missing, assumed false.
> > > + type: boolean
> > > +
> > > + linux,default-hw-mode:
> > > + description:
> > > + This parameter, if present, specifies the default HW
> > > triggering mode
> > > + of the LED when LED trigger is set to `dev-hw-mode`.
> > > + Available values are specific per device the LED is
> > > connected to and
> > > + per LED itself.
> > > + $ref: /schemas/types.yaml#definitions/string
> > > +
> > > + required:
> > > + - reg
> >
> > My Yaml foo is not very good. Do you need to list colour, function and
> > linux,default-trigger, or do they automagically get included from the
> > generic LED binding?
They do with the '$ref: common.yaml#'. You need to list them if you want
to say which properties of a common schema you are using (IMO, you
should, but that's a secondary concern) and/or you have additional
constraints on them.
> >
> > Andrew
>
> I don't know :) I copied this from other drivers, I once tried setting
> up environment for doing checking of device trees with YAML schemas,
> and it was a little painful :)
pip3 install dtschema ?
Can you elaborate on the issue.
Rob
next prev parent reply other threads:[~2020-09-09 20:59 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20200909162552.11032-1-marek.behun@nic.cz>
2020-09-09 16:25 ` [PATCH net-next + leds v2 1/7] dt-bindings: leds: document binding for HW controlled LEDs Marek Behún
2020-09-09 18:27 ` Andrew Lunn
2020-09-09 18:33 ` Marek Behún
2020-09-09 20:59 ` Rob Herring [this message]
2020-09-09 21:07 ` Marek Behun
2020-09-09 21:31 ` Rob Herring
2020-09-09 21:43 ` Marek Behun
2020-09-09 20:56 ` Rob Herring
2020-09-09 21:15 ` Rob Herring
2020-09-09 21:58 ` Marek Behun
2020-09-09 16:25 ` [PATCH net-next + leds v2 4/7] dt-bindings: net: ethernet-phy: add description for PHY LEDs Marek Behún
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=20200909205923.GB3056507@bogus \
--to=robh@kernel.org \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=dmurphy@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=marek.behun@nic.cz \
--cc=matthias.schiffer@ew.tq-group.com \
--cc=megous@megous.com \
--cc=netdev@vger.kernel.org \
--cc=pavel@ucw.cz \
/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).