From patchwork Tue Aug 16 09:25:02 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 73964 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp1892791qga; Tue, 16 Aug 2016 02:27:36 -0700 (PDT) X-Received: by 10.66.164.70 with SMTP id yo6mr2063942pab.47.1471339643238; Tue, 16 Aug 2016 02:27:23 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x190si31380280pfx.280.2016.08.16.02.27.23 for ; Tue, 16 Aug 2016 02:27:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-leds-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-leds-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-leds-owner@vger.kernel.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753320AbcHPJ1W (ORCPT ); Tue, 16 Aug 2016 05:27:22 -0400 Received: from mail-wm0-f52.google.com ([74.125.82.52]:36113 "EHLO mail-wm0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753240AbcHPJ0W (ORCPT ); Tue, 16 Aug 2016 05:26:22 -0400 Received: by mail-wm0-f52.google.com with SMTP id q128so132280897wma.1 for ; Tue, 16 Aug 2016 02:25:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=ybYjDm39tWnKFW2AQGOKlP47tti+6o+jEtlXGypdpjQ=; b=JcEs9GPfV1HOz7rEYtf3ASRdD7y+U2E2mszB2rbc+ni7q4nnOjabmXL1pzwPNxzXD8 y19PR2mT4AgeRVGn6MNsspvvRma0oNSawJAaXzShrcgQkNjSor42UGxQ7TJXbUuSSdlR xDf9pJ+cX4LL4s3cGnEkC6wdWIpT54uK24xrs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=ybYjDm39tWnKFW2AQGOKlP47tti+6o+jEtlXGypdpjQ=; b=lKY8d+myY5PXwIipWivXYAdADdOfIqUYdAkvK7rZapRS/JChGfsDoqh75+1r8Wvn5M mWUly9WzKhqRhyd16NoW/fYRhMmSGW3ug5kUVUApoLhGbCVPty3bHouLMdMijDtOxz9r Rw58DWkFBSK0GiEowakAb7zTzstC+FTcyNo6wSDuPATbmQlx8/F9sDywFwM0LQZpV9Qy qfPU4XW2HusoBEQxJCVFdAKZ5JKCUHiQQZ/j3W7VNiEUufnNUGTEhUR7SOI9VUgHLAeq QsFhhrDXvQ/gsgSuE8r20RpgnF0It8uDB+53qUuzboZnMtW4Pu0ycXRQLYAcQ79rGbr3 l68g== X-Gm-Message-State: AEkoouvaevNm/qrKIKNBCgcrge+79/V9v+vROYqPKmCo8yp/GPqcfRIyJv2QHJxzZF7oGlRA X-Received: by 10.25.82.9 with SMTP id g9mr5444169lfb.228.1471339506944; Tue, 16 Aug 2016 02:25:06 -0700 (PDT) Received: from localhost.localdomain.localdomain (c-357171d5.014-348-6c756e10.cust.bredbandsbolaget.se. [213.113.113.53]) by smtp.gmail.com with ESMTPSA id m62sm4038264lfe.44.2016.08.16.02.25.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Aug 2016 02:25:05 -0700 (PDT) From: Linus Walleij To: Jacek Anaszewski , Richard Purdie Cc: linux-leds@vger.kernel.org, Linus Walleij , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, Andy Gross , Stephen Boyd , Bjorn Andersson Subject: [PATCH 1/2 v4] leds: pm8058: add device tree bindings Date: Tue, 16 Aug 2016 11:25:02 +0200 Message-Id: <1471339502-26123-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: linux-leds-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org This adds the device tree bindings for the PM8058 LEDs. Cc: devicetree@vger.kernel.org Cc: linux-arm-msm@vger.kernel.org Cc: Andy Gross Cc: Stephen Boyd Cc: Bjorn Andersson Signed-off-by: Linus Walleij --- ChangeLog v3->v4: - No changes, just reposting with the series. ChangeLog v2->v3: - Rename the keypad LED in the example from "keypad" to "pm8050:white:keypad" ChangeLog v1->v2: - Fix some spelling mistakes - Reference common bindings directly without any local descriptions --- .../devicetree/bindings/leds/leds-pm8058.txt | 67 ++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 Documentation/devicetree/bindings/leds/leds-pm8058.txt -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-leds" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/Documentation/devicetree/bindings/leds/leds-pm8058.txt b/Documentation/devicetree/bindings/leds/leds-pm8058.txt new file mode 100644 index 000000000000..89584c49aab2 --- /dev/null +++ b/Documentation/devicetree/bindings/leds/leds-pm8058.txt @@ -0,0 +1,67 @@ +Qualcomm PM8058 LED driver + +The Qualcomm PM8058 is a multi-functional device which contains +an LED driver block for up to six LEDs: three normal LEDs, two +"flash" LEDs and one "keypad backlight" LED. The names are +quoted because sometimes these LED drivers are used for wildly +different things than flash or keypad backlight: their names +are more of a suggestion than a hard-wired usecase. + +Hardware-wise the different LEDs support slightly different +output currents. The "flash" LEDs do not need to charge nor +do they support external triggers. They are just powerful LED +drivers. + +The LEDs appear as children to the PM8058 device, with the +proper compatible string. For the PM8058 bindings see: +mfd/qcom-pm8xxx.txt. + +Each LED is represented as a sub-node of the syscon device. Each +node's name represents the name of the corresponding LED. + +LED sub-node properties: + +Required properties: +- compatible: one of + "qcom,pm8058-led" (for the normal LEDs at 0x131, 0x132 and 0x133) + "qcom,pm8058-keypad-led" (for the "keypad" LED at 0x48) + "qcom,pm8058-flash-led" (for the "flash" LEDs at 0x49 and 0xFB) + +Optional properties: +- label: see Documentation/devicetree/bindings/leds/common.txt +- default-state: see Documentation/devicetree/bindings/leds/common.txt +- linux,default-trigger: see Documentation/devicetree/bindings/leds/common.txt + +Example: + +qcom,ssbi@500000 { + pmicintc: pmic@0 { + compatible = "qcom,pm8058"; + led@48 { + compatible = "qcom,pm8058-keypad-led"; + reg = <0x48>; + label = "pm8050:white:keypad"; + default-state = "off"; + }; + led@131 { + compatible = "qcom,pm8058-led"; + reg = <0x131>; + label = "pm8058:red"; + default-state = "off"; + }; + led@132 { + compatible = "qcom,pm8058-led"; + reg = <0x132>; + label = "pm8058:yellow"; + default-state = "off"; + linux,default-trigger = "mmc0"; + }; + led@133 { + compatible = "qcom,pm8058-led"; + reg = <0x133>; + label = "pm8058:green"; + default-state = "on"; + linux,default-trigger = "heartbeat"; + }; + }; +};