1*4882a593SmuzhiyunQualcomm PM8058 LED driver 2*4882a593Smuzhiyun 3*4882a593SmuzhiyunThe Qualcomm PM8058 is a multi-functional device which contains 4*4882a593Smuzhiyunan LED driver block for up to six LEDs: three normal LEDs, two 5*4882a593Smuzhiyun"flash" LEDs and one "keypad backlight" LED. The names are 6*4882a593Smuzhiyunquoted because sometimes these LED drivers are used for wildly 7*4882a593Smuzhiyundifferent things than flash or keypad backlight: their names 8*4882a593Smuzhiyunare more of a suggestion than a hard-wired usecase. 9*4882a593Smuzhiyun 10*4882a593SmuzhiyunHardware-wise the different LEDs support slightly different 11*4882a593Smuzhiyunoutput currents. The "flash" LEDs do not need to charge nor 12*4882a593Smuzhiyundo they support external triggers. They are just powerful LED 13*4882a593Smuzhiyundrivers. 14*4882a593Smuzhiyun 15*4882a593SmuzhiyunThe LEDs appear as children to the PM8058 device, with the 16*4882a593Smuzhiyunproper compatible string. For the PM8058 bindings see: 17*4882a593Smuzhiyunmfd/qcom-pm8xxx.txt. 18*4882a593Smuzhiyun 19*4882a593SmuzhiyunEach LED is represented as a sub-node of the syscon device. Each 20*4882a593Smuzhiyunnode's name represents the name of the corresponding LED. 21*4882a593Smuzhiyun 22*4882a593SmuzhiyunLED sub-node properties: 23*4882a593Smuzhiyun 24*4882a593SmuzhiyunRequired properties: 25*4882a593Smuzhiyun- compatible: one of 26*4882a593Smuzhiyun "qcom,pm8058-led" (for the normal LEDs at 0x131, 0x132 and 0x133) 27*4882a593Smuzhiyun "qcom,pm8058-keypad-led" (for the "keypad" LED at 0x48) 28*4882a593Smuzhiyun "qcom,pm8058-flash-led" (for the "flash" LEDs at 0x49 and 0xFB) 29*4882a593Smuzhiyun 30*4882a593SmuzhiyunOptional properties: 31*4882a593Smuzhiyun- label: see Documentation/devicetree/bindings/leds/common.txt 32*4882a593Smuzhiyun- default-state: see Documentation/devicetree/bindings/leds/common.txt 33*4882a593Smuzhiyun- linux,default-trigger: see Documentation/devicetree/bindings/leds/common.txt 34*4882a593Smuzhiyun 35*4882a593SmuzhiyunExample: 36*4882a593Smuzhiyun 37*4882a593Smuzhiyunqcom,ssbi@500000 { 38*4882a593Smuzhiyun pmicintc: pmic@0 { 39*4882a593Smuzhiyun compatible = "qcom,pm8058"; 40*4882a593Smuzhiyun led@48 { 41*4882a593Smuzhiyun compatible = "qcom,pm8058-keypad-led"; 42*4882a593Smuzhiyun reg = <0x48>; 43*4882a593Smuzhiyun label = "pm8050:white:keypad"; 44*4882a593Smuzhiyun default-state = "off"; 45*4882a593Smuzhiyun }; 46*4882a593Smuzhiyun led@131 { 47*4882a593Smuzhiyun compatible = "qcom,pm8058-led"; 48*4882a593Smuzhiyun reg = <0x131>; 49*4882a593Smuzhiyun label = "pm8058:red"; 50*4882a593Smuzhiyun default-state = "off"; 51*4882a593Smuzhiyun }; 52*4882a593Smuzhiyun led@132 { 53*4882a593Smuzhiyun compatible = "qcom,pm8058-led"; 54*4882a593Smuzhiyun reg = <0x132>; 55*4882a593Smuzhiyun label = "pm8058:yellow"; 56*4882a593Smuzhiyun default-state = "off"; 57*4882a593Smuzhiyun linux,default-trigger = "mmc0"; 58*4882a593Smuzhiyun }; 59*4882a593Smuzhiyun led@133 { 60*4882a593Smuzhiyun compatible = "qcom,pm8058-led"; 61*4882a593Smuzhiyun reg = <0x133>; 62*4882a593Smuzhiyun label = "pm8058:green"; 63*4882a593Smuzhiyun default-state = "on"; 64*4882a593Smuzhiyun linux,default-trigger = "heartbeat"; 65*4882a593Smuzhiyun }; 66*4882a593Smuzhiyun }; 67*4882a593Smuzhiyun}; 68