From e91a4d5deb96c496ef8e6fd8d7342515d9e64ab5 Mon Sep 17 00:00:00 2001 From: Manivannan Sadhasivam Date: Fri, 3 Mar 2023 17:59:25 +0530 Subject: dt-bindings: leds: Document commonly used LED triggers Document the commonly used LED triggers by the SoCs. Not all triggers are documented as some of them are very application specific. Most of the triggers documented here are currently used in devicetrees of many SoCs. While at it, add missing comments and also place the comment above the triggers (hci, mmc, wlan) to match the rest of the binding. Signed-off-by: Manivannan Sadhasivam Reviewed-by: Rob Herring Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230303122925.6610-1-manivannan.sadhasivam@linaro.org --- Documentation/devicetree/bindings/leds/common.yaml | 33 ++++++++++++++++++++-- 1 file changed, 30 insertions(+), 3 deletions(-) (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/leds/common.yaml b/Documentation/devicetree/bindings/leds/common.yaml index 15e3f6645682..61e63ed81ced 100644 --- a/Documentation/devicetree/bindings/leds/common.yaml +++ b/Documentation/devicetree/bindings/leds/common.yaml @@ -90,22 +90,49 @@ properties: - heartbeat # LED indicates disk activity - disk-activity + # LED indicates disk read activity - disk-read + # LED indicates disk write activity - disk-write # LED flashes at a fixed, configurable rate - timer # LED alters the brightness for the specified duration with one software # timer (requires "led-pattern" property) - pattern + # LED indicates mic mute state + - audio-micmute + # LED indicates audio mute state + - audio-mute + # LED indicates bluetooth power state + - bluetooth-power + # LED indicates activity of all CPUs + - cpu + # LED indicates camera flash state + - flash + # LED indicated keyboard capslock + - kbd-capslock + # LED indicates MTD memory activity + - mtd + # LED indicates NAND memory activity (deprecated), + # in new implementations use "mtd" + - nand-disk + # No trigger assigned to the LED. This is the default mode + # if trigger is absent + - none + # LED indicates camera torch state + - torch + # LED indicates USB gadget activity - usb-gadget + # LED indicates USB host activity - usb-host + # LED is triggered by CPU activity - pattern: "^cpu[0-9]*$" - - pattern: "^hci[0-9]+-power$" # LED is triggered by Bluetooth activity - - pattern: "^mmc[0-9]+$" + - pattern: "^hci[0-9]+-power$" # LED is triggered by SD/MMC activity - - pattern: "^phy[0-9]+tx$" + - pattern: "^mmc[0-9]+$" # LED is triggered by WLAN activity + - pattern: "^phy[0-9]+tx$" led-pattern: description: | -- cgit v1.2.3 From 1aeff621689120db60cb7029e5a0fde7d01f7fb6 Mon Sep 17 00:00:00 2001 From: Fenglin Wu Date: Fri, 3 Mar 2023 17:50:23 +0800 Subject: dt-bindings: leds: Add QCOM flash LED controller Add binding document for flash LED module inside Qualcomm Technologies, Inc. PMICs. Signed-off-by: Fenglin Wu Reviewed-by: Krzysztof Kozlowski Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230303095023.538917-3-quic_fenglinw@quicinc.com --- .../bindings/leds/qcom,spmi-flash-led.yaml | 116 +++++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100644 Documentation/devicetree/bindings/leds/qcom,spmi-flash-led.yaml (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/leds/qcom,spmi-flash-led.yaml b/Documentation/devicetree/bindings/leds/qcom,spmi-flash-led.yaml new file mode 100644 index 000000000000..1b273aecaaec --- /dev/null +++ b/Documentation/devicetree/bindings/leds/qcom,spmi-flash-led.yaml @@ -0,0 +1,116 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/leds/qcom,spmi-flash-led.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Flash LED device inside Qualcomm Technologies, Inc. PMICs + +maintainers: + - Fenglin Wu + +description: | + Flash LED controller is present inside some Qualcomm Technologies, Inc. PMICs. + The flash LED module can have different number of LED channels supported + e.g. 3 or 4. There are some different registers between them but they can + both support maximum current up to 1.5 A per channel and they can also support + ganging 2 channels together to supply maximum current up to 2 A. The current + will be split symmetrically on each channel and they will be enabled and + disabled at the same time. + +properties: + compatible: + items: + - enum: + - qcom,pm8150c-flash-led + - qcom,pm8150l-flash-led + - qcom,pm8350c-flash-led + - const: qcom,spmi-flash-led + + reg: + maxItems: 1 + +patternProperties: + "^led-[0-3]$": + type: object + $ref: common.yaml# + unevaluatedProperties: false + description: + Represents the physical LED components which are connected to the + flash LED channels' output. + + properties: + led-sources: + description: + The HW indices of the flash LED channels that connect to the + physical LED + allOf: + - minItems: 1 + maxItems: 2 + items: + enum: [1, 2, 3, 4] + + led-max-microamp: + anyOf: + - minimum: 5000 + maximum: 500000 + multipleOf: 5000 + - minimum: 10000 + maximum: 1000000 + multipleOf: 10000 + + flash-max-microamp: + anyOf: + - minimum: 12500 + maximum: 1500000 + multipleOf: 12500 + - minimum: 25000 + maximum: 2000000 + multipleOf: 25000 + + flash-max-timeout-us: + minimum: 10000 + maximum: 1280000 + multipleOf: 10000 + + required: + - led-sources + - led-max-microamp + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + #include + spmi { + #address-cells = <1>; + #size-cells = <0>; + led-controller@ee00 { + compatible = "qcom,pm8350c-flash-led", "qcom,spmi-flash-led"; + reg = <0xee00>; + + led-0 { + function = LED_FUNCTION_FLASH; + color = ; + led-sources = <1>, <4>; + led-max-microamp = <300000>; + flash-max-microamp = <2000000>; + flash-max-timeout-us = <1280000>; + function-enumerator = <0>; + }; + + led-1 { + function = LED_FUNCTION_FLASH; + color = ; + led-sources = <2>, <3>; + led-max-microamp = <300000>; + flash-max-microamp = <2000000>; + flash-max-timeout-us = <1280000>; + function-enumerator = <1>; + }; + }; + }; -- cgit v1.2.3 From 820d7550a99cc09bb321fb2b890647e3669ce53f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Thu, 16 Mar 2023 14:55:46 +0100 Subject: dt-bindings: leds: Add "usbport" trigger MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Linux's "usbport" trigger is a bit specific one. It allows LED to follow state of multiple USB ports which have to be selected additionally (there isn't a single trigger for each port). Default list of USB ports to monitor can be specified using "trigger-sources" DT property. Theoretically it should be possible for Linux to deduce applicable trigger based on the references nodes in the "trigger-sources". It hasn't been implemented however (probably due to laziness). Milk spilled - we already have DT files specifying "usbport" manually - allow that value in the binding. This fixes validation of in-kernel and external DT files. Signed-off-by: Rafał Miłecki Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230316135546.9162-1-zajec5@gmail.com --- Documentation/devicetree/bindings/leds/common.yaml | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/leds/common.yaml b/Documentation/devicetree/bindings/leds/common.yaml index 61e63ed81ced..11aedf1650a1 100644 --- a/Documentation/devicetree/bindings/leds/common.yaml +++ b/Documentation/devicetree/bindings/leds/common.yaml @@ -125,6 +125,8 @@ properties: - usb-gadget # LED indicates USB host activity - usb-host + # LED indicates USB port state + - usbport # LED is triggered by CPU activity - pattern: "^cpu[0-9]*$" # LED is triggered by Bluetooth activity -- cgit v1.2.3 From d4856dccdac9cd742a7c8c6dd0ff9de165b62fa2 Mon Sep 17 00:00:00 2001 From: Luca Weiss Date: Fri, 9 Dec 2022 14:54:06 +0100 Subject: dt-bindings: leds: spmi-flash-led: Add pm6150l compatible Add the compatible for the flash-led block found on pm6150l PMIC. Signed-off-by: Luca Weiss Acked-by: Krzysztof Kozlowski Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20221209-fp4-pm6150l-flash-v1-1-531521eb2a72@fairphone.com --- Documentation/devicetree/bindings/leds/qcom,spmi-flash-led.yaml | 1 + 1 file changed, 1 insertion(+) (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/leds/qcom,spmi-flash-led.yaml b/Documentation/devicetree/bindings/leds/qcom,spmi-flash-led.yaml index 1b273aecaaec..ffacf703d9f9 100644 --- a/Documentation/devicetree/bindings/leds/qcom,spmi-flash-led.yaml +++ b/Documentation/devicetree/bindings/leds/qcom,spmi-flash-led.yaml @@ -22,6 +22,7 @@ properties: compatible: items: - enum: + - qcom,pm6150l-flash-led - qcom,pm8150c-flash-led - qcom,pm8150l-flash-led - qcom,pm8350c-flash-led -- cgit v1.2.3 From f797dbf9a1ac1c50de6c1fac7110e7f8213b6848 Mon Sep 17 00:00:00 2001 From: ChiYuan Huang Date: Fri, 10 Mar 2023 14:55:57 +0800 Subject: docs: leds: Add MT6370 RGB LED pattern document Document the MT6370 RGB LED pattern trigger. This simply describe how the pattern works, each timing period, and the pattern diagram for MT6370 RGB LED. Signed-off-by: ChiYuan Huang Signed-off-by: ChiaEn Wu Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/38f1e863b0f099158a63fb6f95056a1cb30d80a0.1678430444.git.chiaen_wu@richtek.com --- Documentation/leds/leds-mt6370-rgb.rst | 64 ++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 Documentation/leds/leds-mt6370-rgb.rst (limited to 'Documentation') diff --git a/Documentation/leds/leds-mt6370-rgb.rst b/Documentation/leds/leds-mt6370-rgb.rst new file mode 100644 index 000000000000..abf739e44842 --- /dev/null +++ b/Documentation/leds/leds-mt6370-rgb.rst @@ -0,0 +1,64 @@ +.. SPDX-License-Identifier: GPL-2.0 + +========================================= +The device for Mediatek MT6370 RGB LED +========================================= + +Description +----------- + +The MT6370 integrates a four-channel RGB LED driver, designed to provide a +variety of lighting effect for mobile device applications. The RGB LED devices +includes a smart LED string controller and it can drive 3 channels of LEDs with +a sink current up to 24mA and a CHG_VIN power good indicator LED with sink +current up to 6mA. It provides three operation modes for RGB LEDs: +PWM Dimming mode, breath pattern mode, and constant current mode. The device +can increase or decrease the brightness of the RGB LED via an I2C interface. + +The breath pattern for a channel can be programmed using the "pattern" trigger, +using the hw_pattern attribute. + +/sys/class/leds//hw_pattern +-------------------------------- + +Specify a hardware breath pattern for a MT6370 RGB LED. + +The breath pattern is a series of timing pairs, with the hold-time expressed in +milliseconds. And the brightness is controlled by +'/sys/class/leds//brightness'. The pattern doesn't include the brightness +setting. Hardware pattern only controls the timing for each pattern stage +depending on the current brightness setting. + +Pattern diagram:: + + "0 Tr1 0 Tr2 0 Tf1 0 Tf2 0 Ton 0 Toff" --> '0' for dummy brightness code + + ^ + | ============ + | / \ / +Icurr | / \ / + | / \ / + | / \ / .....repeat + | / \ / + | --- --- --- + |--- --- --- + +----------------------------------============------------> Time + < Tr1>< Ton >< Toff >< Tr1> + +Timing description:: + +Tr1: First rising time for duty 0 to 30%. +Tr2: Second rising time for duty 31% to 100%. +Ton: On time for duty 100%. +Tf1: First falling time for duty 100% to 31%. +Tf2: Second falling time for duty 30% to 0%. +Toff: Off time for duty 0%. + +Tr1/Tr2/Tf1/Tf2/Ton: 125ms to 3125ms, 200ms per step. +Toff: 250ms to 6250ms, 400ms per step. + +Pattern example:: + + "0 125 0 125 0 125 0 125 0 625 0 1050" + +This Will configure Tr1/Tr2/Tf1/Tf2 to 125m, Ton to 625ms, and Toff to 1050ms. -- cgit v1.2.3 From 1d105d6cddd03f97303fd4cbcf62834d6ed820c3 Mon Sep 17 00:00:00 2001 From: Bagas Sanjaya Date: Sun, 19 Mar 2023 14:49:01 +0700 Subject: Documentation: leds: Add MT6370 doc to the toctree Commit 4ba9df04b7ac66 ("docs: leds: Add MT6370 RGB LED pattern document") adds documentation for Mediatek MT6370 RGB LED device, but forgets to include it to leds toctree index. Add the missing entry. Link: https://lore.kernel.org/oe-kbuild-all/202303182310.tB1mUzU7-lkp@intel.com/ Fixes: 4ba9df04b7ac66 ("docs: leds: Add MT6370 RGB LED pattern document") Reported-by: kernel test robot Signed-off-by: Bagas Sanjaya Acked-by: Pavel Machek Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230319074903.13075-2-bagasdotme@gmail.com --- Documentation/leds/index.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'Documentation') diff --git a/Documentation/leds/index.rst b/Documentation/leds/index.rst index b9ca081fac71..ce57254cb871 100644 --- a/Documentation/leds/index.rst +++ b/Documentation/leds/index.rst @@ -25,5 +25,6 @@ LEDs leds-lp5562 leds-lp55xx leds-mlxcpld + leds-mt6370-rgb leds-sc27xx leds-qcom-lpg -- cgit v1.2.3 From cc087c0b137e9e86457f84a7b5b1416938101a14 Mon Sep 17 00:00:00 2001 From: Bagas Sanjaya Date: Sun, 19 Mar 2023 14:49:02 +0700 Subject: Documentation: leds: mt6370: Properly wrap hw_pattern chart The pattern diagram (chart) of /sys/class/leds//hw_pattern is wrapped in literal code block. However, the block indentation is interrupted by Icurr axis label, hence below warnings: Documentation/leds/leds-mt6370-rgb.rst:39: WARNING: Literal block ends without a blank line; unexpected unindent. Documentation/leds/leds-mt6370-rgb.rst:41: WARNING: Line block ends without a blank line. Documentation/leds/leds-mt6370-rgb.rst:46: WARNING: Unexpected indentation. Documentation/leds/leds-mt6370-rgb.rst:44: WARNING: Inline substitution_reference start-string without end-string. Fix the chart indentation by adding 4 more spaces so that the axis label is in the code block. Link: https://lore.kernel.org/oe-kbuild-all/202303182310.tB1mUzU7-lkp@intel.com/ Fixes: 4ba9df04b7ac66 ("docs: leds: Add MT6370 RGB LED pattern document") Reported-by: kernel test robot Signed-off-by: Bagas Sanjaya Acked-by: Pavel Machek Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230319074903.13075-3-bagasdotme@gmail.com --- Documentation/leds/leds-mt6370-rgb.rst | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'Documentation') diff --git a/Documentation/leds/leds-mt6370-rgb.rst b/Documentation/leds/leds-mt6370-rgb.rst index abf739e44842..ea782797a06d 100644 --- a/Documentation/leds/leds-mt6370-rgb.rst +++ b/Documentation/leds/leds-mt6370-rgb.rst @@ -31,19 +31,19 @@ depending on the current brightness setting. Pattern diagram:: - "0 Tr1 0 Tr2 0 Tf1 0 Tf2 0 Ton 0 Toff" --> '0' for dummy brightness code - - ^ - | ============ - | / \ / -Icurr | / \ / - | / \ / - | / \ / .....repeat - | / \ / - | --- --- --- - |--- --- --- - +----------------------------------============------------> Time - < Tr1>< Ton >< Toff >< Tr1> + "0 Tr1 0 Tr2 0 Tf1 0 Tf2 0 Ton 0 Toff" --> '0' for dummy brightness code + + ^ + | ============ + | / \ / + Icurr | / \ / + | / \ / + | / \ / .....repeat + | / \ / + | --- --- --- + |--- --- --- + +----------------------------------============------------> Time + < Tr1>< Ton >< Toff >< Tr1> Timing description:: -- cgit v1.2.3 From a8fd44cbd283cb9825f9d799da14234148e5a4dd Mon Sep 17 00:00:00 2001 From: Bagas Sanjaya Date: Sun, 19 Mar 2023 14:49:03 +0700 Subject: Documentation: leds: MT6370: Use bullet lists for timing variables The timing description contains list of timing pattern variables, but it uses code block without indentation instead. Switch to bullet list as it is better fit for this purpose. While at it, substitute "load" for "duty" because the variables control timing for current load into the device. Link: https://lore.kernel.org/oe-kbuild-all/202303182310.tB1mUzU7-lkp@intel.com/ Fixes: 4ba9df04b7ac66 ("docs: leds: Add MT6370 RGB LED pattern document") Reported-by: kernel test robot Signed-off-by: Bagas Sanjaya Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230319074903.13075-4-bagasdotme@gmail.com --- Documentation/leds/leds-mt6370-rgb.rst | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'Documentation') diff --git a/Documentation/leds/leds-mt6370-rgb.rst b/Documentation/leds/leds-mt6370-rgb.rst index ea782797a06d..152a2e592172 100644 --- a/Documentation/leds/leds-mt6370-rgb.rst +++ b/Documentation/leds/leds-mt6370-rgb.rst @@ -45,17 +45,17 @@ Pattern diagram:: +----------------------------------============------------> Time < Tr1>< Ton >< Toff >< Tr1> -Timing description:: +Timing description: -Tr1: First rising time for duty 0 to 30%. -Tr2: Second rising time for duty 31% to 100%. -Ton: On time for duty 100%. -Tf1: First falling time for duty 100% to 31%. -Tf2: Second falling time for duty 30% to 0%. -Toff: Off time for duty 0%. + * Tr1: First rising time for 0% - 30% load. + * Tr2: Second rising time for 31% - 100% load. + * Ton: On time for 100% load. + * Tf1: First falling time for 100% - 31% load. + * Tf2: Second falling time for 30% to 0% load. + * Toff: Off time for 0% load. -Tr1/Tr2/Tf1/Tf2/Ton: 125ms to 3125ms, 200ms per step. -Toff: 250ms to 6250ms, 400ms per step. + * Tr1/Tr2/Tf1/Tf2/Ton: 125ms to 3125ms, 200ms per step. + * Toff: 250ms to 6250ms, 400ms per step. Pattern example:: -- cgit v1.2.3 From 03a85ab3ac910bc29e23db744091c40c8ed3d3af Mon Sep 17 00:00:00 2001 From: Anjelique Melendez Date: Fri, 7 Apr 2023 15:38:47 -0700 Subject: dt-bindings: leds-qcom-lpg: Add qcom,pmk8550-pwm compatible string Add qcom,pmk8550-pwm compatible string for the Qualcomm Technologies, Inc. PMK8550 PMIC which has two high resolution PWM channels. Signed-off-by: Anjelique Melendez Acked-by: Krzysztof Kozlowski Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230407223849.17623-2-quic_amelende@quicinc.com --- Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml | 1 + 1 file changed, 1 insertion(+) (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml b/Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml index 1df837798249..6295c91f43e8 100644 --- a/Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml +++ b/Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml @@ -27,6 +27,7 @@ properties: - qcom,pmc8180c-lpg - qcom,pmi8994-lpg - qcom,pmi8998-lpg + - qcom,pmk8550-pwm "#pwm-cells": const: 2 -- cgit v1.2.3 From 9f6ffd0da650f6ed264e124a3d6bb4e11a49f9f1 Mon Sep 17 00:00:00 2001 From: Wadim Egorov Date: Wed, 12 Apr 2023 16:05:51 +0200 Subject: dt-bindings: leds: Convert PCA9532 to dtschema Convert the PCA9532 LED Dimmer to dtschema. While at it, update the example to match recommended node names and the link to the product datasheet. Also add GPIO properties since the driver allows to use unused pins as GPIOs. Signed-off-by: Wadim Egorov Acked-by: Pavel Machek Reviewed-by: Krzysztof Kozlowski Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230412140552.451527-1-w.egorov@phytec.de --- .../devicetree/bindings/leds/leds-pca9532.txt | 49 ------------ .../devicetree/bindings/leds/nxp,pca953x.yaml | 90 ++++++++++++++++++++++ 2 files changed, 90 insertions(+), 49 deletions(-) delete mode 100644 Documentation/devicetree/bindings/leds/leds-pca9532.txt create mode 100644 Documentation/devicetree/bindings/leds/nxp,pca953x.yaml (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/leds/leds-pca9532.txt b/Documentation/devicetree/bindings/leds/leds-pca9532.txt deleted file mode 100644 index f769c52e3643..000000000000 --- a/Documentation/devicetree/bindings/leds/leds-pca9532.txt +++ /dev/null @@ -1,49 +0,0 @@ -*NXP - pca9532 PWM LED Driver - -The PCA9532 family is SMBus I/O expander optimized for dimming LEDs. -The PWM support 256 steps. - -Required properties: - - compatible: - "nxp,pca9530" - "nxp,pca9531" - "nxp,pca9532" - "nxp,pca9533" - - reg - I2C slave address - -Each led is represented as a sub-node of the nxp,pca9530. - -Optional sub-node properties: - - label: see Documentation/devicetree/bindings/leds/common.txt - - type: Output configuration, see dt-bindings/leds/leds-pca9532.h (default NONE) - - linux,default-trigger: see Documentation/devicetree/bindings/leds/common.txt - - default-state: see Documentation/devicetree/bindings/leds/common.txt - This property is only valid for sub-nodes of type . - -Example: - #include - - leds: pca9530@60 { - compatible = "nxp,pca9530"; - reg = <0x60>; - - red-power { - label = "pca:red:power"; - type = ; - }; - green-power { - label = "pca:green:power"; - type = ; - }; - kernel-booting { - type = ; - default-state = "on"; - }; - sys-stat { - type = ; - default-state = "keep"; // don't touch, was set by U-Boot - }; - }; - -For more product information please see the link below: -http://nxp.com/documents/data_sheet/PCA9532.pdf diff --git a/Documentation/devicetree/bindings/leds/nxp,pca953x.yaml b/Documentation/devicetree/bindings/leds/nxp,pca953x.yaml new file mode 100644 index 000000000000..edf6f55df685 --- /dev/null +++ b/Documentation/devicetree/bindings/leds/nxp,pca953x.yaml @@ -0,0 +1,90 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/leds/nxp,pca953x.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NXP PCA9532 LED Dimmer + +maintainers: + - Riku Voipio + +description: | + The PCA9532 family is SMBus I/O expander optimized for dimming LEDs. + The PWM support 256 steps. + + For more product information please see the link below: + https://www.nxp.com/docs/en/data-sheet/PCA9532.pdf + +properties: + compatible: + enum: + - nxp,pca9530 + - nxp,pca9531 + - nxp,pca9532 + - nxp,pca9533 + + reg: + maxItems: 1 + + gpio-controller: true + + '#gpio-cells': + const: 2 + +patternProperties: + "^led-[0-9a-z]+$": + type: object + $ref: common.yaml# + unevaluatedProperties: false + + properties: + type: + description: | + Output configuration, see include/dt-bindings/leds/leds-pca9532.h + $ref: /schemas/types.yaml#/definitions/uint32 + default: 0 + minimum: 0 + maximum: 4 + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + #include + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + led-controller@62 { + compatible = "nxp,pca9533"; + reg = <0x62>; + + led-1 { + label = "pca:red:power"; + type = ; + }; + + led-2 { + label = "pca:green:power"; + type = ; + }; + + led-3 { + type = ; + default-state = "on"; + }; + + led-4 { + type = ; + default-state = "keep"; + }; + }; + }; + +... -- cgit v1.2.3 From 57fbfb3b0b6526c9fd9c32383720ff550ace4919 Mon Sep 17 00:00:00 2001 From: Alexander Dahl Date: Tue, 18 Apr 2023 13:34:02 +0200 Subject: docs: leds: ledtrig-oneshot: Fix spelling mistake It's no comparison, but a "first this, then that" situation. Signed-off-by: Alexander Dahl Acked-by: Pavel Machek Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230418113402.188391-1-ada@thorsis.com --- Documentation/leds/ledtrig-oneshot.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Documentation') diff --git a/Documentation/leds/ledtrig-oneshot.rst b/Documentation/leds/ledtrig-oneshot.rst index 69fa3ea1d554..e044d69e9c0f 100644 --- a/Documentation/leds/ledtrig-oneshot.rst +++ b/Documentation/leds/ledtrig-oneshot.rst @@ -5,7 +5,7 @@ One-shot LED Trigger This is a LED trigger useful for signaling the user of an event where there are no clear trap points to put standard led-on and led-off settings. Using this trigger, the application needs only to signal the trigger when an event has -happened, than the trigger turns the LED on and than keeps it off for a +happened, then the trigger turns the LED on and then keeps it off for a specified amount of time. This trigger is meant to be usable both for sporadic and dense events. In the -- cgit v1.2.3 From 36cd9fb5344675e9b9d9f96eabcb3cdfdbacc841 Mon Sep 17 00:00:00 2001 From: Andreas Kemnade Date: Wed, 19 Apr 2023 13:18:05 +0200 Subject: dt-bindings: leds: Add ROHM BD2606MVV LED Document ROHM BD2606MVV LED driver devicetree bindings. Signed-off-by: Andreas Kemnade Reviewed-by: Matti Vaittinen Reviewed-by: Rob Herring Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20230419111806.1100437-2-andreas@kemnade.info --- .../devicetree/bindings/leds/rohm,bd2606mvv.yaml | 81 ++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 Documentation/devicetree/bindings/leds/rohm,bd2606mvv.yaml (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/leds/rohm,bd2606mvv.yaml b/Documentation/devicetree/bindings/leds/rohm,bd2606mvv.yaml new file mode 100644 index 000000000000..14700a2e5fea --- /dev/null +++ b/Documentation/devicetree/bindings/leds/rohm,bd2606mvv.yaml @@ -0,0 +1,81 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/leds/rohm,bd2606mvv.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: ROHM BD2606MVV LED controller + +maintainers: + - Andreas Kemnade + +description: + The BD2606 MVV is a programmable LED controller connected via I2C that can + drive 6 separate lines. Each of them can be individually switched on and off, + but the brightness setting is shared between pairs of them. + + Datasheet is available at + https://fscdn.rohm.com/en/products/databook/datasheet/ic/power/led_driver/bd2606mvv_1-e.pdf + +properties: + compatible: + const: rohm,bd2606mvv + + reg: + maxItems: 1 + + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + + enable-gpios: + maxItems: 1 + description: GPIO pin to enable/disable the device. + +patternProperties: + "^led@[0-6]$": + type: object + $ref: common.yaml# + unevaluatedProperties: false + + properties: + reg: + minimum: 0 + maximum: 6 + + required: + - reg + +additionalProperties: false + +examples: + - | + #include + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + led-controller@66 { + compatible = "rohm,bd2606mvv"; + reg = <0x66>; + #address-cells = <1>; + #size-cells = <0>; + + led@0 { + reg = <0x0>; + color = ; + function = LED_FUNCTION_POWER; + }; + + led@2 { + reg = <0x2>; + color = ; + function = LED_FUNCTION_STATUS; + }; + }; + }; + +... -- cgit v1.2.3