Back to home page

OSCL-LXR

 
 

    


0001 Qualcomm PM8058 LED driver
0002 
0003 The Qualcomm PM8058 is a multi-functional device which contains
0004 an LED driver block for up to six LEDs: three normal LEDs, two
0005 "flash" LEDs and one "keypad backlight" LED. The names are
0006 quoted because sometimes these LED drivers are used for wildly
0007 different things than flash or keypad backlight: their names
0008 are more of a suggestion than a hard-wired usecase.
0009 
0010 Hardware-wise the different LEDs support slightly different
0011 output currents. The "flash" LEDs do not need to charge nor
0012 do they support external triggers. They are just powerful LED
0013 drivers.
0014 
0015 The LEDs appear as children to the PM8058 device, with the
0016 proper compatible string. For the PM8058 bindings see:
0017 mfd/qcom-pm8xxx.txt.
0018 
0019 Each LED is represented as a sub-node of the syscon device. Each
0020 node's name represents the name of the corresponding LED.
0021 
0022 LED sub-node properties:
0023 
0024 Required properties:
0025 - compatible: one of
0026   "qcom,pm8058-led" (for the normal LEDs at 0x131, 0x132 and 0x133)
0027   "qcom,pm8058-keypad-led" (for the "keypad" LED at 0x48)
0028   "qcom,pm8058-flash-led" (for the "flash" LEDs at 0x49 and 0xFB)
0029 
0030 Optional properties:
0031 - label: see Documentation/devicetree/bindings/leds/common.txt
0032 - default-state: see Documentation/devicetree/bindings/leds/common.txt
0033 - linux,default-trigger: see Documentation/devicetree/bindings/leds/common.txt
0034 
0035 Example:
0036 
0037 qcom,ssbi@500000 {
0038         pmicintc: pmic@0 {
0039                 compatible = "qcom,pm8058";
0040                 led@48 {
0041                         compatible = "qcom,pm8058-keypad-led";
0042                         reg = <0x48>;
0043                         label = "pm8050:white:keypad";
0044                         default-state = "off";
0045                 };
0046                 led@131 {
0047                         compatible = "qcom,pm8058-led";
0048                         reg = <0x131>;
0049                         label = "pm8058:red";
0050                         default-state = "off";
0051                 };
0052                 led@132 {
0053                         compatible = "qcom,pm8058-led";
0054                         reg = <0x132>;
0055                         label = "pm8058:yellow";
0056                         default-state = "off";
0057                         linux,default-trigger = "mmc0";
0058                 };
0059                 led@133 {
0060                         compatible = "qcom,pm8058-led";
0061                         reg = <0x133>;
0062                         label = "pm8058:green";
0063                         default-state = "on";
0064                         linux,default-trigger = "heartbeat";
0065                 };
0066         };
0067 };