* [PATCH 1/2] dt-bindings: leds: add cznic,turris-omnia-leds binding
[not found] <20200421171732.8277-1-marek.behun@nic.cz>
@ 2020-04-21 17:17 ` Marek Behún
2020-04-23 6:35 ` Pavel Machek
0 siblings, 1 reply; 4+ messages in thread
From: Marek Behún @ 2020-04-21 17:17 UTC (permalink / raw)
To: linux-leds
Cc: Pavel Machek, Jacek Anaszewski, Marek Behún, Rob Herring,
devicetree
Add device-tree bindings documentation for Turris Omnia RGB LEDs.
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: devicetree@vger.kernel.org
---
.../leds/cznic,turris-omnia-leds.yaml | 113 ++++++++++++++++++
MAINTAINERS | 5 +-
2 files changed, 116 insertions(+), 2 deletions(-)
create mode 100644 Documentation/devicetree/bindings/leds/cznic,turris-omnia-leds.yaml
diff --git a/Documentation/devicetree/bindings/leds/cznic,turris-omnia-leds.yaml b/Documentation/devicetree/bindings/leds/cznic,turris-omnia-leds.yaml
new file mode 100644
index 000000000000..f3d13fa65df2
--- /dev/null
+++ b/Documentation/devicetree/bindings/leds/cznic,turris-omnia-leds.yaml
@@ -0,0 +1,113 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/leds/cznic,turris-omnia-leds.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: CZ.NIC's Turris Omnia LEDs driver
+
+maintainers:
+ - Marek Behún <marek.behun@nic.cz>
+
+description:
+ This module adds support for the RGB LEDs found on the fron panel of the
+ Turris Omnia router. There are 12 RGB LEDs, they are controlled by device's
+ microcontroller with which the system communicates via I2C. Each LED is
+ described as a subnode of this I2C device.
+
+properties:
+ compatible:
+ const: cznic,turris-omnia-leds
+
+ reg:
+ description: I2C slave address of the microcontroller.
+ maxItems: 1
+
+patternProperties:
+ "^led[0-9][0-9]?$":
+ type: object
+ allOf:
+ - $ref: /schemas/leds/common.yaml#
+ description:
+ This node can either represent one channel of a RGB LED or a whole RGB
+ LED.
+
+ properties:
+ led-sources:
+ description:
+ List of device current outputs the LED connects to. If one number is
+ given, the device described by this node will control one channel of a
+ RGB LED. If three numbers are given (one for each channel of a RGB
+ LED), the device described by this node will control one RGB LED. In
+ this case the numbers must increase by one and the first must be a
+ multiple of 3.
+ allOf:
+ - $ref: /schemas/leds/common.yaml#/properties/led-sources
+ - oneOf:
+ - items:
+ minimum: 0
+ maximum: 35
+ minItems: 1
+ maxItems: 1
+ - items:
+ enum: [ [ 0, 1, 2 ], [ 3, 4, 5 ], [ 6, 7, 8 ], [ 9, 10, 11 ],
+ [ 12, 13, 14 ], [ 15, 16, 17 ], [ 18, 19, 20 ],
+ [ 21, 22, 23 ], [ 24, 25, 26 ], [ 27, 28, 29 ],
+ [ 30, 31, 32 ], [ 33, 34, 35] ]
+
+ color:
+ description:
+ Should be one of LED_COLOR_ID_*. Allowed values are red, green or blue
+ if there is one item in led-sources, otherwise white.
+ allOf:
+ - $ref: /schemas/leds/common.yaml#/properties/color
+ - enum: [ 0, 1, 2, 3 ]
+
+ required:
+ - led-sources
+ - color
+
+examples:
+ - |
+
+ #include <dt-bindings/leds/common.h>
+
+ i2c0 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ led-controller@2b {
+ compatible = "cznic,turris-omnia-leds";
+ reg = <0x2b>;
+
+ led0 {
+ led-sources = <33 34 35>;
+ color = <LED_COLOR_ID_WHITE>;
+ function = LED_FUNCTION_POWER;
+ linux,default-trigger = "heartbeat";
+ };
+
+ led1 {
+ led-sources = <3>;
+ color = <LED_COLOR_ID_RED>;
+ function = LED_FUNCTION_INDICATOR;
+ function-enumerator = <1>;
+ };
+
+ led2 {
+ led-sources = <4>;
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_INDICATOR;
+ function-enumerator = <1>;
+ };
+
+ led3 {
+ led-sources = <5>;
+ color = <LED_COLOR_ID_BLUE>;
+ function = LED_FUNCTION_INDICATOR;
+ function-enumerator = <1>;
+ };
+ };
+ };
+
+...
diff --git a/MAINTAINERS b/MAINTAINERS
index e64e5db31497..35c58d0b8fd9 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1751,16 +1751,17 @@ F: drivers/clocksource/timer-prima2.c
X: drivers/gnss
N: [^a-z]sirf
-ARM/CZ.NIC TURRIS MOX SUPPORT
+ARM/CZ.NIC TURRIS ROUTERS SUPPORT
M: Marek Behun <marek.behun@nic.cz>
S: Maintained
-W: http://mox.turris.cz
+W: http://www.turris.cz
F: Documentation/ABI/testing/debugfs-moxtet
F: Documentation/ABI/testing/sysfs-bus-moxtet-devices
F: Documentation/ABI/testing/sysfs-firmware-turris-mox-rwtm
F: Documentation/devicetree/bindings/bus/moxtet.txt
F: Documentation/devicetree/bindings/firmware/cznic,turris-mox-rwtm.txt
F: Documentation/devicetree/bindings/gpio/gpio-moxtet.txt
+F: Documentation/devicetree/bindings/leds/cznic,turris-omnia-leds.yaml
F: drivers/bus/moxtet.c
F: drivers/firmware/turris-mox-rwtm.c
F: drivers/gpio/gpio-moxtet.c
--
2.24.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] dt-bindings: leds: add cznic,turris-omnia-leds binding
2020-04-21 17:17 ` [PATCH 1/2] dt-bindings: leds: add cznic,turris-omnia-leds binding Marek Behún
@ 2020-04-23 6:35 ` Pavel Machek
2020-04-23 6:40 ` Marek Behun
0 siblings, 1 reply; 4+ messages in thread
From: Pavel Machek @ 2020-04-23 6:35 UTC (permalink / raw)
To: Marek Behún; +Cc: linux-leds, Jacek Anaszewski, Rob Herring, devicetree
[-- Attachment #1: Type: text/plain, Size: 707 bytes --]
Hi!
> Add device-tree bindings documentation for Turris Omnia RGB LEDs.
>
> Signed-off-by: Marek Behún <marek.behun@nic.cz>
> Cc: Rob Herring <robh+dt@kernel.org>
Rob already reviewed this one. Is there reason not to have his
reviewed-by here?
https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20190328193428.19273-3-marek.behun@nic.cz/
> MAINTAINERS | 5 +-
Please put MAINTAINERS change into separate patch. I don't think I can
merge it throught the LEDs tree.
Best regards,
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] dt-bindings: leds: add cznic,turris-omnia-leds binding
2020-04-23 6:35 ` Pavel Machek
@ 2020-04-23 6:40 ` Marek Behun
2020-04-23 6:49 ` Pavel Machek
0 siblings, 1 reply; 4+ messages in thread
From: Marek Behun @ 2020-04-23 6:40 UTC (permalink / raw)
To: Pavel Machek; +Cc: linux-leds, Jacek Anaszewski, Rob Herring, devicetree
On Thu, 23 Apr 2020 08:35:52 +0200
Pavel Machek <pavel@ucw.cz> wrote:
> Hi!
>
> > Add device-tree bindings documentation for Turris Omnia RGB LEDs.
> >
> > Signed-off-by: Marek Behún <marek.behun@nic.cz>
> > Cc: Rob Herring <robh+dt@kernel.org>
>
> Rob already reviewed this one. Is there reason not to have his
> reviewed-by here?
This one is written in yaml, the previous was .txt
> https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20190328193428.19273-3-marek.behun@nic.cz/
>
> > MAINTAINERS | 5 +-
>
> Please put MAINTAINERS change into separate patch. I don't think I can
> merge it throught the LEDs tree.
Ok, I shall send it to someone else then, probably Gregory.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] dt-bindings: leds: add cznic,turris-omnia-leds binding
2020-04-23 6:40 ` Marek Behun
@ 2020-04-23 6:49 ` Pavel Machek
0 siblings, 0 replies; 4+ messages in thread
From: Pavel Machek @ 2020-04-23 6:49 UTC (permalink / raw)
To: Marek Behun; +Cc: linux-leds, Jacek Anaszewski, Rob Herring, devicetree
[-- Attachment #1: Type: text/plain, Size: 1245 bytes --]
On Thu 2020-04-23 08:40:46, Marek Behun wrote:
> On Thu, 23 Apr 2020 08:35:52 +0200
> Pavel Machek <pavel@ucw.cz> wrote:
>
> > Hi!
> >
> > > Add device-tree bindings documentation for Turris Omnia RGB LEDs.
> > >
> > > Signed-off-by: Marek Behún <marek.behun@nic.cz>
> > > Cc: Rob Herring <robh+dt@kernel.org>
> >
> > Rob already reviewed this one. Is there reason not to have his
> > reviewed-by here?
>
> This one is written in yaml, the previous was .txt
Aha, ok. I'll need his reviewed-by, then...
Could I ask for license to be gpl-2-or-later or bsd? Forbidding gpl3
while allowing bsd seems strange/wrong.
> > https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20190328193428.19273-3-marek.behun@nic.cz/
> >
> > > MAINTAINERS | 5 +-
> >
> > Please put MAINTAINERS change into separate patch. I don't think I can
> > merge it throught the LEDs tree.
>
> Ok, I shall send it to someone else then, probably Gregory.
Yes. Should be removed from the second patch in the series, too.
Thanks,
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-04-23 6:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20200421171732.8277-1-marek.behun@nic.cz>
2020-04-21 17:17 ` [PATCH 1/2] dt-bindings: leds: add cznic,turris-omnia-leds binding Marek Behún
2020-04-23 6:35 ` Pavel Machek
2020-04-23 6:40 ` Marek Behun
2020-04-23 6:49 ` Pavel Machek
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).