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: 642082 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3rflHP4GKYz9ssM for ; Thu, 30 Jun 2016 00:22:09 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b=REopaTE+; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752254AbcF2OWI (ORCPT ); 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 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"; + }; + }; +};