forked from openbmc/linux
-
Notifications
You must be signed in to change notification settings - Fork 5
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_for_4.14' of git://git.kernel.org/pub/scm/linux/kerne…
…l/git/j.anaszewski/linux-leds Pull LED updates from Jacek Anaszewski: "LED class drivers improvements: leds-pca955x: - add Device Tree support and bindings - use devm_led_classdev_register() - add GPIO support - prevent crippled LED class device name - check for I2C errors leds-gpio: - add optional retain-state-shutdown DT property - allow LED to retain state at shutdown leds-tlc591xx: - merge conditional tests - add missing of_node_put leds-powernv: - delete an error message for a failed memory allocation in powernv_led_create() leds-is31fl32xx.c - convert to using custom %pOF printf format specifier Constify attribute_group structures in: - leds-blinkm - leds-lm3533 Make several arrays static const in: - leds-aat1290 - leds-lp5521 - leds-lp5562 - leds-lp8501" * tag 'leds_for_4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds: leds: pca955x: check for I2C errors leds: gpio: Allow LED to retain state at shutdown dt-bindings: leds: gpio: Add optional retain-state-shutdown property leds: powernv: Delete an error message for a failed memory allocation in powernv_led_create() leds: lp8501: make several arrays static const leds: lp5562: make several arrays static const leds: lp5521: make several arrays static const leds: aat1290: make array max_mm_current_percent static const leds: pca955x: Prevent crippled LED device name leds: lm3533: constify attribute_group structure dt-bindings: leds: add pca955x leds: pca955x: add GPIO support leds: pca955x: use devm_led_classdev_register leds: pca955x: add device tree support leds: Convert to using %pOF instead of full_name leds: blinkm: constify attribute_group structures. leds: tlc591xx: add missing of_node_put leds: tlc591xx: merge conditional tests
- Loading branch information
Showing
16 changed files
with
438 additions
and
94 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
* 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" | ||
"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 | ||
PCA9532_TYPE_NONE | ||
PCA9532_TYPE_LED | ||
PCA9532_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>; | ||
}; | ||
}; |
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 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 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 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 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.