-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge tag 'leds-next-6.6' of git://git.kernel.org/pub/scm/linux/kerne…
…l/git/lee/leds Pull LED updates from Lee Jones: "Core Frameworks: - Add new framework to support Group Multi-Color (GMC) LEDs - Offer an 'optional' API for non-essential LEDs - Support obtaining 'max brightness' values from Device Tree - Provide new led_classdev member 'color' (settable via DT and SYFS) - Stop TTY Trigger from using the old LED_ON constraints - Statically allocate leds_class New Drivers: - Add support for NXP PCA995x I2C Constant Current LED Driver New Device Support: - Add support for Siemens Simatic IPC BX-21 to Simatic IPC Fix-ups: - Some dependency / Kconfig tweaking - Move final probe() functions back over from .probe_new() - Simplify obtaining resources (memory, device data) using unified API helpers - Bunch of Device Tree additions, conversions and adaptions - Fix trivial styling issues; comments - Ensure correct includes are present and remove some that are not required - Omit the use of redundant casts and if relevant replace with better ones - Use purpose-built APIs for various actions; sysfs_emit(), module_led_trigger() - Remove a bunch of superfluous locking Bug Fixes: - Ensure error codes are correctly propagated back up the call chain - Fix incorrect error values from being returned (missing '-') - Ensure get'ed resources are put'ed to prevent leaks - Use correct class when exporting module resources - Fixing rounding (or lack there of) issues - Fix 'always false' LED_COLOR_ID_MULTI BUG() check" * tag 'leds-next-6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/leds: (40 commits) leds: aw2013: Enable pull-up supply for interrupt and I2C dt-bindings: leds: Document pull-up supply for interrupt and I2C dt-bindings: leds: aw2013: Document interrupt leds: uleds: Use module_misc_device macro to simplify the code leds: trigger: netdev: Use module_led_trigger macro to simplify the code dt-bindings: leds: Fix reference to definition of default-state leds: turris-omnia: Drop unnecessary mutex locking leds: turris-omnia: Use sysfs_emit() instead of sprintf() leds: Make leds_class a static const structure leds: Remove redundant of_match_ptr() dt-bindings: leds: Add gpio-line-names to PCA9532 GPIO leds: trigger: tty: Do not use LED_ON/OFF constants, use led_blink_set_oneshot instead dt-bindings: leds: rohm,bd71828: Drop select:false leds: Fix BUG_ON check for LED_COLOR_ID_MULTI that is always false leds: multicolor: Use rounded division when calculating color components leds: rgb: Add a multicolor LED driver to group monochromatic LEDs dt-bindings: leds: Add binding for a multicolor group of LEDs leds: class: Store the color index in struct led_classdev leds: Provide devm_of_led_get_optional() leds: pca995x: Fix MODULE_DEVICE_TABLE for OF ...
- Loading branch information
Showing
54 changed files
with
880 additions
and
176 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 64 additions & 0 deletions
64
Documentation/devicetree/bindings/leds/leds-group-multicolor.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) | ||
%YAML 1.2 | ||
--- | ||
$id: http://devicetree.org/schemas/leds/leds-group-multicolor.yaml# | ||
$schema: http://devicetree.org/meta-schemas/core.yaml# | ||
|
||
title: Multi-color LED built with monochromatic LEDs | ||
|
||
maintainers: | ||
- Jean-Jacques Hiblot <jjhiblot@traphandler.com> | ||
|
||
description: | | ||
This driver combines several monochromatic LEDs into one multi-color | ||
LED using the multicolor LED class. | ||
properties: | ||
compatible: | ||
const: leds-group-multicolor | ||
|
||
leds: | ||
description: | ||
An aray of monochromatic leds | ||
$ref: /schemas/types.yaml#/definitions/phandle-array | ||
|
||
required: | ||
- leds | ||
|
||
allOf: | ||
- $ref: leds-class-multicolor.yaml# | ||
|
||
unevaluatedProperties: false | ||
|
||
examples: | ||
- | | ||
#include <dt-bindings/gpio/gpio.h> | ||
#include <dt-bindings/leds/common.h> | ||
monochromatic-leds { | ||
compatible = "gpio-leds"; | ||
led0: led-0 { | ||
gpios = <&mcu_pio 0 GPIO_ACTIVE_LOW>; | ||
color = <LED_COLOR_ID_RED>; | ||
}; | ||
led1: led-1 { | ||
gpios = <&mcu_pio 1 GPIO_ACTIVE_HIGH>; | ||
color = <LED_COLOR_ID_GREEN>; | ||
}; | ||
led2: led-2 { | ||
gpios = <&mcu_pio 2 GPIO_ACTIVE_HIGH>; | ||
color = <LED_COLOR_ID_BLUE>; | ||
}; | ||
}; | ||
multi-led { | ||
compatible = "leds-group-multicolor"; | ||
color = <LED_COLOR_ID_RGB>; | ||
function = LED_FUNCTION_INDICATOR; | ||
leds = <&led0>, <&led1>, <&led2>; | ||
}; | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause | ||
%YAML 1.2 | ||
--- | ||
$id: http://devicetree.org/schemas/leds/nxp,pca995x.yaml# | ||
$schema: http://devicetree.org/meta-schemas/core.yaml# | ||
|
||
title: NXP PCA995x LED controllers | ||
|
||
maintainers: | ||
- Isai Gaspar <isaiezequiel.gaspar@nxp.com> | ||
- Marek Vasut <marex@denx.de> | ||
|
||
description: | ||
The NXP PCA9952/PCA9955B are programmable LED controllers connected via I2C | ||
that can drive 16 separate lines. Each of them can be individually switched | ||
on and off, and brightness can be controlled via individual PWM. | ||
|
||
Datasheets are available at | ||
https://www.nxp.com/docs/en/data-sheet/PCA9952_PCA9955.pdf | ||
https://www.nxp.com/docs/en/data-sheet/PCA9955B.pdf | ||
|
||
properties: | ||
compatible: | ||
enum: | ||
- nxp,pca9952 | ||
- nxp,pca9955b | ||
|
||
reg: | ||
maxItems: 1 | ||
|
||
"#address-cells": | ||
const: 1 | ||
|
||
"#size-cells": | ||
const: 0 | ||
|
||
patternProperties: | ||
"^led@[0-9a-f]+$": | ||
type: object | ||
$ref: common.yaml# | ||
unevaluatedProperties: false | ||
|
||
properties: | ||
reg: | ||
minimum: 0 | ||
maximum: 15 | ||
|
||
required: | ||
- reg | ||
|
||
additionalProperties: false | ||
|
||
examples: | ||
- | | ||
#include <dt-bindings/leds/common.h> | ||
i2c { | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
led-controller@1 { | ||
compatible = "nxp,pca9955b"; | ||
reg = <0x01>; | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
led@0 { | ||
reg = <0x0>; | ||
color = <LED_COLOR_ID_RED>; | ||
function = LED_FUNCTION_POWER; | ||
}; | ||
led@2 { | ||
reg = <0x2>; | ||
color = <LED_COLOR_ID_WHITE>; | ||
function = LED_FUNCTION_STATUS; | ||
}; | ||
}; | ||
}; | ||
... |
84 changes: 84 additions & 0 deletions
84
Documentation/devicetree/bindings/leds/panasonic,an30259a.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
# SPDX-License-Identifier: GPL-2.0 | ||
%YAML 1.2 | ||
--- | ||
$id: http://devicetree.org/schemas/leds/panasonic,an30259a.yaml# | ||
$schema: http://devicetree.org/meta-schemas/core.yaml# | ||
|
||
title: Panasonic AN30259A 3-channel LED controller | ||
|
||
maintainers: | ||
- Iskren Chernev <me@iskren.info> | ||
|
||
description: | ||
The AN30259A is a LED controller capable of driving three LEDs independently. | ||
It supports constant current output and sloping current output modes. The chip | ||
is connected over I2C. | ||
|
||
properties: | ||
compatible: | ||
const: panasonic,an30259a | ||
|
||
reg: | ||
maxItems: 1 | ||
|
||
interrupts: | ||
maxItems: 1 | ||
|
||
"#address-cells": | ||
const: 1 | ||
|
||
"#size-cells": | ||
const: 0 | ||
|
||
patternProperties: | ||
"^led@[1-3]$": | ||
$ref: common.yaml# | ||
unevaluatedProperties: false | ||
|
||
properties: | ||
reg: | ||
enum: [ 1, 2, 3 ] | ||
|
||
required: | ||
- compatible | ||
- reg | ||
- "#address-cells" | ||
- "#size-cells" | ||
|
||
additionalProperties: false | ||
|
||
examples: | ||
- | | ||
#include <dt-bindings/leds/common.h> | ||
i2c { | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
led-controller@30 { | ||
compatible = "panasonic,an30259a"; | ||
reg = <0x30>; | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
led@1 { | ||
reg = <1>; | ||
linux,default-trigger = "heartbeat"; | ||
function = LED_FUNCTION_INDICATOR; | ||
color = <LED_COLOR_ID_RED>; | ||
}; | ||
led@2 { | ||
reg = <2>; | ||
function = LED_FUNCTION_INDICATOR; | ||
color = <LED_COLOR_ID_GREEN>; | ||
}; | ||
led@3 { | ||
reg = <3>; | ||
function = LED_FUNCTION_INDICATOR; | ||
color = <LED_COLOR_ID_BLUE>; | ||
}; | ||
}; | ||
}; | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.