From patchwork Wed Jul 6 21:42:00 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 71491 Delivered-To: patch@linaro.org Received: by 10.140.28.4 with SMTP id 4csp1081513qgy; Wed, 6 Jul 2016 14:42:13 -0700 (PDT) X-Received: by 10.66.232.136 with SMTP id to8mr46441269pac.130.1467841333515; Wed, 06 Jul 2016 14:42:13 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ae6si183458pad.92.2016.07.06.14.42.13; Wed, 06 Jul 2016 14:42:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-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 devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-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 S1755938AbcGFVmL (ORCPT + 7 others); Wed, 6 Jul 2016 17:42:11 -0400 Received: from mail-lf0-f42.google.com ([209.85.215.42]:34966 "EHLO mail-lf0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755877AbcGFVmK (ORCPT ); Wed, 6 Jul 2016 17:42:10 -0400 Received: by mail-lf0-f42.google.com with SMTP id l188so163031120lfe.2 for ; Wed, 06 Jul 2016 14:42:09 -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=uvdJWcyl4y5ERbHJcH+OcR983zSSZ+eOp43ICnikew4=; b=M1oQXWXUNtmf2dQRi1KON9iraLxcJbFYmRBf2OxqlRXSX8zU80melOsuIO8n4z4oyE OQSYzjt5U61oRDbv4Awn5z5EN67qlHKnGEF7GX6fx/vb6jIc2VCnHitAkp5zV8h9txuP Tb+3WofWNzt4AGw7pm4d3Xul4Fk2PpJ+ILrJE= 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=uvdJWcyl4y5ERbHJcH+OcR983zSSZ+eOp43ICnikew4=; b=Mm/nENKY9aCE4U8o7ME+SXwVoWGGSy7l/PQOVjcKZj+WWmM7zyYnyOklFxT8de2N5p GZp2nWH0LqjAv0Uwz9l1j9ugZrV1AwGJyWp2Tk+7ptO+jO/P7tq3tTzMUhhmJRJxiDcd GVCCD5146pR8HCtEUW+6toMAKNwxZejepPVaFNlDJFo7jWzJq90ABMid47pB50IMkvGu zyYniM9FDWksxA91V9Dvp2VfaaWjwBRTqDzvlQD9aiU4URhqMIZOgIlPuoqP2g6zoxV2 FCC9SUfQ++qjSstLawXN4/v+yE/WA6oYsKIwOEJ6iUteiW2eceL8H+CHelvoq9zTzdNL Xa8g== X-Gm-Message-State: ALyK8tIwZnJwXc0P5ZBp4B8Eoh5lyZjdeiJCklUeExsUmSYDljemdixT7fQECZ2hKAAauYYV X-Received: by 10.25.37.200 with SMTP id l191mr6868556lfl.70.1467841328906; Wed, 06 Jul 2016 14:42:08 -0700 (PDT) Received: from localhost.localdomain.localdomain (c-cc7c71d5.014-348-6c756e10.cust.bredbandsbolaget.se. [213.113.124.204]) by smtp.gmail.com with ESMTPSA id s18sm6805435lfd.30.2016.07.06.14.42.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 06 Jul 2016 14:42:08 -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/3 v2] leds: pm8058: add device tree bindings Date: Wed, 6 Jul 2016 23:42:00 +0200 Message-Id: <1467841320-11251-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@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 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 devicetree" 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..ee070e23fe61 --- /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 = "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"; + }; + }; +};