From patchwork Wed Jun 29 14:21:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 71193 Delivered-To: patch@linaro.org Received: by 10.140.28.4 with SMTP id 4csp2179709qgy; Wed, 29 Jun 2016 07:22:10 -0700 (PDT) X-Received: by 10.66.165.71 with SMTP id yw7mr12337107pab.8.1467210129940; Wed, 29 Jun 2016 07:22:09 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h18si4652984pfk.107.2016.06.29.07.22.09; Wed, 29 Jun 2016 07:22:09 -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 S1752254AbcF2OWI (ORCPT + 7 others); Wed, 29 Jun 2016 10:22:08 -0400 Received: from mail-lf0-f54.google.com ([209.85.215.54]:32990 "EHLO mail-lf0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752094AbcF2OWH (ORCPT ); Wed, 29 Jun 2016 10:22:07 -0400 Received: by mail-lf0-f54.google.com with SMTP id f6so34729334lfg.0 for ; Wed, 29 Jun 2016 07:22:06 -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=jeqv7c+CThtMwe7vp/fSxUreHQeK1qwX5ZY5HWzwAo0=; b=REopaTE+yQRgHxspv/Xqb0w/9fweBBfgBeqkF//WJW1izUJAVbx6zEh7zDPSYUGzQy aBrhu4DiXkZ1ri3RySZGGKlZCe75p5oj6l8x7boSzAfVY5nb4u+R58GsU7shsKUarako 2yTVcRZq6gAtd01Apkoy3IbdGdvg0boEE0QN8= 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=jeqv7c+CThtMwe7vp/fSxUreHQeK1qwX5ZY5HWzwAo0=; b=OP3YbWXQ7XWBqTts41dZyoJq87yKFIuJwpwkTaYqCFgd6S2AQaFigoseDBuUFhfDXO R4mQ9PZVuEPLMNDsgjUKah/QC/q7Qcn5Pmi/z9SCLia0yZUM9NB6ohRD9innN7WAf4aI ZcLWoLBZyxfnVNpGBvOnm29LFoH3V9u8IMaysn+oBVLHWGfhNZ8tuFk/q3ci+5f3Ceh/ vC0/v7pqOlg4UyTPLi2eu/eGmNIQ2xqmz1cF1Eja4JY6jTv3TOimJHOEXqjBC+fBfrh9 CnqUyVGkVKCZF+2YmQa5NWpk3NEF2pbJiLK7v/Nvd/lf750kbKE6LHimYRhOgkeQ7c9Y c3UQ== X-Gm-Message-State: ALyK8tIAPMub8GgKhxKPtYwRnjhZzJna4QEWQl7fcKaEdIAXUqr9vqruVIVkU4jZ4MRn8QXd X-Received: by 10.25.139.135 with SMTP id n129mr2900193lfd.209.1467210125548; Wed, 29 Jun 2016 07:22:05 -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 g28sm647329ljg.24.2016.06.29.07.22.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Jun 2016 07:22:04 -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] leds: pm8058: add device tree bindings Date: Wed, 29 Jun 2016 16:21:58 +0200 Message-Id: <1467210120-8829-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 2.4.11 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 --- .../devicetree/bindings/leds/leds-pm8058.txt | 67 ++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 Documentation/devicetree/bindings/leds/leds-pm8058.txt -- 2.4.11 -- 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..5d4e6369b9f6 --- /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 contain +a 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: on 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: descriptive name for the LED see common.txt +- default-state: The initial state of the LED see common.txt +- linux,default-trigger: Linux trigger, see 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"; + }; + }; +};