diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2024-11-22 16:25:20 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2024-11-22 16:25:20 -0800 |
commit | 93251bdf7a771c4eeb0f95fa38ded92e95154ef7 (patch) | |
tree | a88c203830489df41b85b986f8e9ed6b8d0dd2c4 /Documentation | |
parent | 80739fd00c7ea1315d362ce889bef499452913ef (diff) | |
parent | e8501858035b1f95468da525e7357c8c33811b88 (diff) | |
download | linux-93251bdf7a771c4eeb0f95fa38ded92e95154ef7.tar.gz linux-93251bdf7a771c4eeb0f95fa38ded92e95154ef7.tar.bz2 linux-93251bdf7a771c4eeb0f95fa38ded92e95154ef7.zip |
Merge tag 'leds-next-6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/leds
PULL LED updates from Lee Jones:
- Remove unused local header files from various drivers
- Revert platform driver removal to the original method for consistency
- Introduce ordered workqueues for LED events, replacing the less
efficient system_wq
- Switch to a safer iteration macro in several drivers to prevent
potential memory leaks
- Fix a refcounting bug in the mt6360 flash LED driver
- Fix an uninitialized variable in the mt6370_mc_pattern_clear()
function
- Resolve Smatch warnings in the leds-bcm6328 driver
- Address a potential NULL pointer dereference in the brightness_show()
function
- Fix an incorrect format specifier in the ss4200 driver
- Prevent a resource leak in the max5970 driver's probe function
- Add support for specifying the number of serial shift bits in the
device tree for the BCM63138 family
- Implement multicolor brightness control in the lp5562 driver
- Add a device tree property to override the default LED pin polarity
- Add a property to specify the default brightness value when the LED
is initially on
- Set missing timing properties for the ktd2692 driver
- Document the "rc-feedback" trigger for controlling LEDs based on
remote control activity
- Convert text bindings to YAML for the pca955x driver to enable device
tree validation
- Remove redundant checks for invalid channel numbers in the lp55xx
driver
- Update the MAINTAINERS file with current contact information
* tag 'leds-next-6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/leds: (46 commits)
leds: ss4200: Fix the wrong format specifier for 'blinking'
leds: pwm: Add optional DT property default-brightness
dt-bindings: leds: pwm: Add default-brightness property
leds: class: Protect brightness_show() with led_cdev->led_access mutex
leds: ktd2692: Set missing timing properties
leds: max5970: Fix unreleased fwnode_handle in probe function
leds: Introduce ordered workqueue for LEDs events instead of system_wq
MAINTAINERS: Replace Siemens IPC related bouncing maintainers
leds: bcm6328: Replace divide condition with comparison for shift value
leds: lp55xx: Remove redundant test for invalid channel number
dt-bindings: leds: pca955x: Convert text bindings to YAML
leds: rgb: leds-mt6370-rgb: Fix uninitialized variable 'ret' in mt6370_mc_pattern_clear
leds: lp5562: Add multicolor brightness control
dt-bindings: leds: Add 'active-high' property
leds: Switch back to struct platform_driver::remove()
leds: bcm63138: Add some register defines
leds: bcm63138: Handle shift register config
leds: bcm63138: Use scopes and guards
dt-bindings: leds: bcm63138: Add shift register bits
leds: leds-gpio-register: Reorganize kerneldoc parameter names
...
Diffstat (limited to 'Documentation')
5 files changed, 191 insertions, 89 deletions
diff --git a/Documentation/devicetree/bindings/leds/common.yaml b/Documentation/devicetree/bindings/leds/common.yaml index bf9a101e4d42..3e8319e44339 100644 --- a/Documentation/devicetree/bindings/leds/common.yaml +++ b/Documentation/devicetree/bindings/leds/common.yaml @@ -118,6 +118,8 @@ properties: # No trigger assigned to the LED. This is the default mode # if trigger is absent - none + # LED indicates remote control feedback + - rc-feedback # LED indicates camera torch state - torch # LED indicates USB gadget activity @@ -202,6 +204,12 @@ properties: #trigger-source-cells property in the source node. $ref: /schemas/types.yaml#/definitions/phandle-array + active-high: + type: boolean + description: + Makes LED active high. To turn the LED ON, line needs to be + set to high voltage instead of low. + active-low: type: boolean description: @@ -225,6 +233,14 @@ properties: Maximum timeout in microseconds after which the flash LED is turned off. Required for flash LED nodes with configurable timeout. +allOf: + - if: + required: + - active-low + then: + properties: + active-high: false + additionalProperties: true examples: diff --git a/Documentation/devicetree/bindings/leds/leds-bcm63138.yaml b/Documentation/devicetree/bindings/leds/leds-bcm63138.yaml index bb20394fca5c..62326507c1aa 100644 --- a/Documentation/devicetree/bindings/leds/leds-bcm63138.yaml +++ b/Documentation/devicetree/bindings/leds/leds-bcm63138.yaml @@ -41,6 +41,16 @@ properties: "#size-cells": const: 0 + brcm,serial-shift-bits: + minimum: 1 + maximum: 32 + description: + This describes the number of 8-bit serial shifters connected to the LED + controller block. The hardware is typically using 8-bit shift registers + with 8 LEDs per shift register, so 4 shifters results in 32 LEDs or 2 + shifters give 16 LEDs etc, but the hardware supports any odd number of + registers. If left unspecified, the hardware boot-time default is used. + patternProperties: "^led@[a-f0-9]+$": type: object @@ -71,6 +81,7 @@ examples: leds@ff800800 { compatible = "brcm,bcm4908-leds", "brcm,bcm63138-leds"; reg = <0xff800800 0xdc>; + brcm,serial-shift-bits = <16>; #address-cells = <1>; #size-cells = <0>; diff --git a/Documentation/devicetree/bindings/leds/leds-pca955x.txt b/Documentation/devicetree/bindings/leds/leds-pca955x.txt deleted file mode 100644 index 817f460f3a72..000000000000 --- a/Documentation/devicetree/bindings/leds/leds-pca955x.txt +++ /dev/null @@ -1,89 +0,0 @@ -* NXP - pca955x LED driver - -The PCA955x family of chips are I2C LED blinkers whose pins not used -to control LEDs can be used as general purpose I/Os. The GPIO pins can -be input or output, and output pins can also be pulse-width controlled. - -Required properties: -- compatible : should be one of : - "nxp,pca9550" - "nxp,pca9551" - "nxp,pca9552" - "ibm,pca9552" - "nxp,pca9553" -- #address-cells: must be 1 -- #size-cells: must be 0 -- reg: I2C slave address. depends on the model. - -Optional properties: -- gpio-controller: allows pins to be used as GPIOs. -- #gpio-cells: must be 2. -- gpio-line-names: define the names of the GPIO lines - -LED sub-node properties: -- reg : number of LED line. - from 0 to 1 for the pca9550 - from 0 to 7 for the pca9551 - from 0 to 15 for the pca9552 - from 0 to 3 for the pca9553 -- type: (optional) either - PCA955X_TYPE_NONE - PCA955X_TYPE_LED - PCA955X_TYPE_GPIO - see dt-bindings/leds/leds-pca955x.h (default to LED) -- label : (optional) - see Documentation/devicetree/bindings/leds/common.txt -- linux,default-trigger : (optional) - see Documentation/devicetree/bindings/leds/common.txt - -Examples: - -pca9552: pca9552@60 { - compatible = "nxp,pca9552"; - #address-cells = <1>; - #size-cells = <0>; - reg = <0x60>; - - gpio-controller; - #gpio-cells = <2>; - gpio-line-names = "GPIO12", "GPIO13", "GPIO14", "GPIO15"; - - gpio@12 { - reg = <12>; - type = <PCA955X_TYPE_GPIO>; - }; - gpio@13 { - reg = <13>; - type = <PCA955X_TYPE_GPIO>; - }; - gpio@14 { - reg = <14>; - type = <PCA955X_TYPE_GPIO>; - }; - gpio@15 { - reg = <15>; - type = <PCA955X_TYPE_GPIO>; - }; - - led@0 { - label = "red:power"; - linux,default-trigger = "default-on"; - reg = <0>; - type = <PCA955X_TYPE_LED>; - }; - led@1 { - label = "green:power"; - reg = <1>; - type = <PCA955X_TYPE_LED>; - }; - led@2 { - label = "pca9552:yellow"; - reg = <2>; - type = <PCA955X_TYPE_LED>; - }; - led@3 { - label = "pca9552:white"; - reg = <3>; - type = <PCA955X_TYPE_LED>; - }; -}; diff --git a/Documentation/devicetree/bindings/leds/leds-pwm.yaml b/Documentation/devicetree/bindings/leds/leds-pwm.yaml index 113b7c218303..61b97e8bc36d 100644 --- a/Documentation/devicetree/bindings/leds/leds-pwm.yaml +++ b/Documentation/devicetree/bindings/leds/leds-pwm.yaml @@ -34,6 +34,12 @@ patternProperties: Maximum brightness possible for the LED $ref: /schemas/types.yaml#/definitions/uint32 + default-brightness: + description: + Brightness to be set if LED's default state is on. Used only during + initialization. If the option is not set then max brightness is used. + $ref: /schemas/types.yaml#/definitions/uint32 + required: - pwms - max-brightness diff --git a/Documentation/devicetree/bindings/leds/nxp,pca955x.yaml b/Documentation/devicetree/bindings/leds/nxp,pca955x.yaml new file mode 100644 index 000000000000..ae7384cc760c --- /dev/null +++ b/Documentation/devicetree/bindings/leds/nxp,pca955x.yaml @@ -0,0 +1,158 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/leds/nxp,pca955x.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NXP PCA955X LED controllers + +maintainers: + - Nate Case <ncase@xes-inc.com> + +description: | + The PCA955x family of chips are I2C LED blinkers whose pins not used + to control LEDs can be used as general purpose I/Os. The GPIO pins can + be input or output, and output pins can also be pulse-width controlled. + + For more product information please see the link below: + - https://www.nxp.com/docs/en/data-sheet/PCA9552.pdf + +properties: + compatible: + enum: + - nxp,pca9550 + - nxp,pca9551 + - nxp,pca9552 + - ibm,pca9552 + - nxp,pca9553 + + reg: + maxItems: 1 + + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + + gpio-controller: true + + gpio-line-names: + minItems: 1 + maxItems: 16 + + "#gpio-cells": + const: 2 + +patternProperties: + "^led@[0-9a-f]$": + type: object + $ref: common.yaml# + unevaluatedProperties: false + + properties: + reg: + maxItems: 1 + type: + description: | + Output configuration, see include/dt-bindings/leds/leds-pca955x.h + $ref: /schemas/types.yaml#/definitions/uint32 + default: 0 + minimum: 0 + maximum: 2 + + required: + - reg + +allOf: + - if: + properties: + compatible: + contains: + enum: + - nxp,pca9550 + then: + patternProperties: + "^led@[0-9a-f]$": + properties: + reg: + maximum: 1 + - if: + properties: + compatible: + contains: + enum: + - nxp,pca9551 + then: + patternProperties: + "^led@[0-9a-f]$": + properties: + reg: + maximum: 7 + - if: + properties: + compatible: + contains: + enum: + - nxp,pca9552 + - ibm,pca9552 + then: + patternProperties: + "^led@[0-9a-f]$": + properties: + reg: + maximum: 15 + - if: + properties: + compatible: + contains: + enum: + - nxp,pca9553 + then: + patternProperties: + "^led@[0-9a-f]$": + properties: + reg: + maximum: 3 + +additionalProperties: false + +examples: + - | + #include <dt-bindings/leds/leds-pca955x.h> + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + led-controller@60 { + compatible = "nxp,pca9552"; + reg = <0x60>; + #address-cells = <1>; + #size-cells = <0>; + + led@0 { + reg = <0>; + label = "red:power"; + linux,default-trigger = "default-on"; + type = <PCA955X_TYPE_LED>; + }; + led@1 { + reg = <1>; + label = "green:power"; + type = <PCA955X_TYPE_LED>; + }; + led@2 { + reg = <2>; + label = "pca9552:yellow"; + type = <PCA955X_TYPE_LED>; + }; + led@3 { + reg = <3>; + label = "pca9552:white"; + type = <PCA955X_TYPE_LED>; + }; + }; + }; + +... |