From patchwork Mon Aug 8 18:11:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 73463 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp102319qga; Mon, 8 Aug 2016 11:12:01 -0700 (PDT) X-Received: by 10.98.64.93 with SMTP id n90mr165697022pfa.29.1470679921078; Mon, 08 Aug 2016 11:12:01 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id yu2si30336384pac.273.2016.08.08.11.12.00 for ; Mon, 08 Aug 2016 11:12:01 -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 S1752168AbcHHSMA (ORCPT ); Mon, 8 Aug 2016 14:12:00 -0400 Received: from mail-wm0-f48.google.com ([74.125.82.48]:38103 "EHLO mail-wm0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751479AbcHHSL7 (ORCPT ); Mon, 8 Aug 2016 14:11:59 -0400 Received: by mail-wm0-f48.google.com with SMTP id o80so156247368wme.1 for ; Mon, 08 Aug 2016 11:11:59 -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=8QYL0McGS0iT/Fxb+6xxIOM60LNf1hEYeHg9OGkpVKo=; b=GbDdQ3oN1fxT1dpx38yCYuRF9yGodD2OmJoccJnVxpfjO6A4Hu4H7hTz0HMK6E4BPn pg5BDO5D8k5hSjsnUeU862sX8Ir5WvJ3OcXwybLqlh0f2nQV3yVxXwJNqtY/6IHqu2ab JwzVewNAucfkE++ukF+020esfUxAtvj2b/LVA= 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=8QYL0McGS0iT/Fxb+6xxIOM60LNf1hEYeHg9OGkpVKo=; b=OZrdILQgwBtY9VR5GQ7x4qJgFMY5mlU88CTE36bxhPSXPwYzk+7XWE3pFfOJ/cA3e8 Hk4J9VaTa3l5hVlOrPadjYxIYxKHdqAY0aPwrfDfIwMpQ9bHAsjYaMo114pQjCV43QgF WTtud8EER4ug7fpGxCpXMIO6pDtQ7FrK/g07yWAOwN0DyeKuNHLXNsF/er1ar8fEDmIM MRB04c7nTP2addDQz/zXfh5G3pWGt+tRPXvlqEwqFjZyWrW27fmRCVxPu+S3Sc0gHqr6 k7ZP2KwCyqQ+BXoMHnanpAP8TZpIu/NjASFjg2sXyuAxRWIEayd1c2JGew4amXiZdy8b tdIQ== X-Gm-Message-State: AEkoouv8txfeMNzW3/KvDf5CiATJDjKuGYcpZEAbG8Gs+aS+cEAq6DMstBwq8yfa49V63u4e X-Received: by 10.46.5.201 with SMTP id 192mr26017717ljf.10.1470679918150; Mon, 08 Aug 2016 11:11:58 -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 f4sm5876925lji.41.2016.08.08.11.11.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 Aug 2016 11:11:57 -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 v3] leds: pm8058: add device tree bindings Date: Mon, 8 Aug 2016 20:11:50 +0200 Message-Id: <1470679911-13669-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 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 Acked-by: Rob Herring 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"; + }; + }; +};