forked from torvalds/linux
-
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.
leds: pca9532: Add device tree support
This patch adds basic device tree support for the pca9532 LEDs. Signed-off-by: Phil Reid <[email protected]> Signed-off-by: Jacek Anaszewski <[email protected]>
- Loading branch information
1 parent
85c9036
commit fa4191a
Showing
4 changed files
with
132 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
*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 | ||
|
||
Example: | ||
#include <dt-bindings/leds/leds-pca9532.h> | ||
|
||
leds: pca9530@60 { | ||
compatible = "nxp,pca9530"; | ||
reg = <0x60>; | ||
|
||
red-power { | ||
label = "pca:red:power"; | ||
type = <PCA9532_TYPE_LED>; | ||
}; | ||
green-power { | ||
label = "pca:green:power"; | ||
type = <PCA9532_TYPE_LED>; | ||
}; | ||
}; | ||
|
||
For more product information please see the link below: | ||
http://nxp.com/documents/data_sheet/PCA9532.pdf |
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,18 @@ | ||
/* | ||
* This header provides constants for pca9532 LED bindings. | ||
* | ||
* This file is licensed under the terms of the GNU General Public | ||
* License version 2. This program is licensed "as is" without any | ||
* warranty of any kind, whether express or implied. | ||
*/ | ||
|
||
#ifndef _DT_BINDINGS_LEDS_PCA9532_H | ||
#define _DT_BINDINGS_LEDS_PCA9532_H | ||
|
||
#define PCA9532_TYPE_NONE 0 | ||
#define PCA9532_TYPE_LED 1 | ||
#define PCA9532_TYPE_N2100_BEEP 2 | ||
#define PCA9532_TYPE_GPIO 3 | ||
#define PCA9532_LED_TIMER2 4 | ||
|
||
#endif /* _DT_BINDINGS_LEDS_PCA9532_H */ |
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