mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-18 19:43:43 -04:00
json-schema versions draft7 and earlier have a weird behavior in that any keywords combined with a '$ref' are ignored (silently). The correct form was to put a '$ref' under an 'allOf'. This behavior is now changed in the 2019-09 json-schema spec and '$ref' can be mixed with other keywords. The json-schema library doesn't yet support this, but the tooling now does a fixup for this and either way works. This has been a constant source of review comments, so let's change this treewide so everyone copies the simpler syntax. Scripted with ruamel.yaml with some manual fixups. Some minor whitespace changes from the script. Signed-off-by: Rob Herring <robh@kernel.org> Acked-by: Maxime Ripard <mripard@kernel.org> Acked-by: Lee Jones <lee.jones@linaro.org> Acked-By: Vinod Koul <vkoul@kernel.org> Acked-by: Mark Brown <broonie@kernel.org> Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Acked-by: Wolfram Sang <wsa@the-dreams.de> # for I2C Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> #for-iio Reviewed-by: Stephen Boyd <sboyd@kernel.org> # clock Signed-off-by: Rob Herring <robh@kernel.org>
86 lines
2.0 KiB
YAML
86 lines
2.0 KiB
YAML
# SPDX-License-Identifier: GPL-2.0-only
|
|
%YAML 1.2
|
|
---
|
|
$id: http://devicetree.org/schemas/leds/leds-gpio.yaml#
|
|
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
|
|
|
title: LEDs connected to GPIO lines
|
|
|
|
maintainers:
|
|
- Jacek Anaszewski <jacek.anaszewski@gmail.com>
|
|
- Pavel Machek <pavel@ucw.cz>
|
|
|
|
description:
|
|
Each LED is represented as a sub-node of the gpio-leds device. Each
|
|
node's name represents the name of the corresponding LED.
|
|
|
|
properties:
|
|
compatible:
|
|
const: gpio-leds
|
|
|
|
patternProperties:
|
|
# The first form is preferred, but fall back to just 'led' anywhere in the
|
|
# node name to at least catch some child nodes.
|
|
"(^led-[0-9a-f]$|led)":
|
|
type: object
|
|
|
|
$ref: common.yaml#
|
|
|
|
properties:
|
|
gpios:
|
|
maxItems: 1
|
|
|
|
retain-state-suspended:
|
|
description:
|
|
The suspend state can be retained.Such as charge-led gpio.
|
|
type: boolean
|
|
|
|
retain-state-shutdown:
|
|
description:
|
|
Retain the state of the LED on shutdown. Useful in BMC systems, for
|
|
example when the BMC is rebooted while the host remains up.
|
|
type: boolean
|
|
|
|
required:
|
|
- gpios
|
|
|
|
additionalProperties: false
|
|
|
|
examples:
|
|
- |
|
|
|
|
#include <dt-bindings/gpio/gpio.h>
|
|
#include <dt-bindings/leds/common.h>
|
|
|
|
leds {
|
|
compatible = "gpio-leds";
|
|
led-0 {
|
|
gpios = <&mcu_pio 0 GPIO_ACTIVE_LOW>;
|
|
linux,default-trigger = "disk-activity";
|
|
function = LED_FUNCTION_DISK;
|
|
};
|
|
|
|
led-1 {
|
|
gpios = <&mcu_pio 1 GPIO_ACTIVE_HIGH>;
|
|
/* Keep LED on if BIOS detected hardware fault */
|
|
default-state = "keep";
|
|
function = LED_FUNCTION_FAULT;
|
|
};
|
|
};
|
|
|
|
run-control {
|
|
compatible = "gpio-leds";
|
|
led-0 {
|
|
gpios = <&mpc8572 6 GPIO_ACTIVE_HIGH>;
|
|
color = <LED_COLOR_ID_RED>;
|
|
default-state = "off";
|
|
};
|
|
led-1 {
|
|
gpios = <&mpc8572 7 GPIO_ACTIVE_HIGH>;
|
|
color = <LED_COLOR_ID_GREEN>;
|
|
default-state = "on";
|
|
};
|
|
};
|
|
|
|
...
|