From patchwork Wed Nov 15 07:13:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 118916 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp3976772qgn; Tue, 14 Nov 2017 23:14:42 -0800 (PST) X-Google-Smtp-Source: AGs4zMam+Y48XbdNt1Xcbb0szdTulhwncVPPsKz+d5WIpyIKAyl0gxLCyY8zAj/E8ArkkQjvbsgb X-Received: by 10.84.248.15 with SMTP id p15mr1688041pll.50.1510730082702; Tue, 14 Nov 2017 23:14:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510730082; cv=none; d=google.com; s=arc-20160816; b=ld8Rlp0RQVaJUDzsRJDugC2p+u4oZH0RnZDX9HU9MC0DwSrkV6ig284zw0AOQPkTOd kSxsXzawNVHcKl4f0w3RwMtKENASBLFyOnOxJBU7Gpp115Cek5Gt0upSKm8hBd96q9Jy sGl5uO4CouwJaYZZOk37dqThw3km5wMERnxxEpR8h1JulfFP4d+GPWDQCb0+6zImfWUl wjcF8/hv9WE5COqGpssMWL9CRVGpq+v70K7n+akDDJeMLUS7Wa9rF9aw/q3O0yJd14+w SnCk1drTPfJOv8ogtnHkVSLgn/YlZHXKUdes1J5DkPnW9bMx9yWMvZByUC1RsuTpl19E slKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=gf2bCMEyBoGchjs6dHLdxbaDFPN1LfaJEWKOiy191LQ=; b=XgAbVbmkWBN5m4poiNOfZYvGrbV3NLIkaZRzv7WSQSUDDl0s+opZH0gwbA34YFf6qD mzM7ksyxEvX8AHdpkhEywkN1MDvrUuehwjbjx24KvFCph6SgsZWni2MSZBE8vfhzVtfT EgbrMYjcTSCazAu/w9Yo2k2hS6Up5knVfM80JSr8LAZ60LZHm5ltB7X+Qb4ZQ8Oc6vpS biZ6wIoEyLsU0JB/6VKazPBrLAPEek4I9w3mdUmmSLYf2uR/iwYJurUewPy82b+dRpbx V9gEV1nEHdyDBH9PlgntkTx9z6F/P3SWQOVw+n7yAtdfxWs1mAgAuSo656gOb6zWROiN Kd7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=DNv9SxLk; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e11si3882967plj.660.2017.11.14.23.14.42; Tue, 14 Nov 2017 23:14:42 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-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 header.s=google header.b=DNv9SxLk; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756080AbdKOHOK (ORCPT + 10 others); Wed, 15 Nov 2017 02:14:10 -0500 Received: from mail-pf0-f193.google.com ([209.85.192.193]:43923 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755871AbdKOHNz (ORCPT ); Wed, 15 Nov 2017 02:13:55 -0500 Received: by mail-pf0-f193.google.com with SMTP id a84so11479825pfl.0 for ; Tue, 14 Nov 2017 23:13:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=4//nlNp7llcCjF7Kwazsa8oOVBgHZsjUUruBKCwtigA=; b=DNv9SxLk56/N/ukNCFnSA+P/Tc57bsclQ9f4ae99URUkghQUg35ppgWQGcVXclE7mt 4nwuSCne6DhJxjbfLLgB2Verj1VIL7uXca8WcvJOnqRCLwgnUqYOOQtsD6QF1Q0uMa3w q1C3AhPYT8wos0D/5UscemO6d+oaH/0fKscas= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=4//nlNp7llcCjF7Kwazsa8oOVBgHZsjUUruBKCwtigA=; b=TdJ5PjrX+f2G2/b1VGbLJeBMeFOTlH8Q9hR28PKatOzI/CNryqhyNmlOTEHYwg1i2G 4IQ/PtWMaVMK5TbYzgAu8vbUbpxkcGIpAgBj8NBvdx3rz0Lt4scOfKIinckg8Ci9mx4/ XG1fJ1lp/aLjN9Vlbs9O7NnUrr3imFAiaDBAMawwjh1WGi04meONSG4H82aCoxQiHzeq QdvZkN/PJM5F8lnxpF3M523OhTBMAVJYFsvCDj1AbWP1taw87N6YYjwFjzlE9d3Mz/0d TpS6xQdl53frc9gszXAt1/t7eWtbCwMOo3jzsZh4aYde2WkcUN0A+8sjTj6A96+kcapS MSGw== X-Gm-Message-State: AJaThX4SbVQCZ5rpyLWdOIj1w/DjzU+1HocKwo4Hk6Srblve9aBQeWgT XO3NWZlROUUo+qW5hBsHPuuWIQ== X-Received: by 10.84.218.10 with SMTP id q10mr8465030pli.111.1510730034248; Tue, 14 Nov 2017 23:13:54 -0800 (PST) Received: from localhost.localdomain (ip68-111-217-79.sd.sd.cox.net. [68.111.217.79]) by smtp.gmail.com with ESMTPSA id m6sm22357369pfm.121.2017.11.14.23.13.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 14 Nov 2017 23:13:53 -0800 (PST) From: Bjorn Andersson To: Richard Purdie , Jacek Anaszewski , Pavel Machek , Rob Herring , Mark Rutland Cc: linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, Fenglin Wu Subject: [PATCH v3 3/3] DT: leds: Add Qualcomm Light Pulse Generator binding Date: Tue, 14 Nov 2017 23:13:45 -0800 Message-Id: <20171115071345.24331-4-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20171115071345.24331-1-bjorn.andersson@linaro.org> References: <20171115071345.24331-1-bjorn.andersson@linaro.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org This adds the binding document describing the three hardware blocks related to the Light Pulse Generator found in a wide range of Qualcomm PMICs. Signed-off-by: Bjorn Andersson --- Changes since v2: - Squashed all things into one node - Removed quirks from the binding, compatible implies number of channels, their configuration etc. - Binding describes LEDs connected as child nodes - Support describing multi-channel LEDs - Change style of the binding document, to match other LED bindings Changes since v1: - Dropped custom pattern properties - Renamed cell-index to qcom,lpg-channel to clarify its purpose .../devicetree/bindings/leds/leds-qcom-lpg.txt | 66 ++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 Documentation/devicetree/bindings/leds/leds-qcom-lpg.txt -- 2.15.0 -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" 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-qcom-lpg.txt b/Documentation/devicetree/bindings/leds/leds-qcom-lpg.txt new file mode 100644 index 000000000000..9cee6f9f543c --- /dev/null +++ b/Documentation/devicetree/bindings/leds/leds-qcom-lpg.txt @@ -0,0 +1,66 @@ +Binding for Qualcomm Light Pulse Generator + +The Qualcomm Light Pulse Generator consists of three different hardware blocks; +a ramp generator with lookup table, the light pulse generator and a three +channel current sink. These blocks are found in a wide range of Qualcomm PMICs. + +Required properties: +- compatible: one of: + "qcom,pm8916-pwm", + "qcom,pm8941-lpg", + "qcom,pm8994-lpg", + "qcom,pmi8994-lpg", + "qcom,pmi8998-lpg", + +Optional properties: +- qcom,power-source: power-source used to drive the output, as defined in the + datasheet. Should be specified if the TRILED block is + present +- qcom,dtest: configures the output into an internal test line of the + pmic. Specified by a list of u32 pairs, one pair per channel, + where each pair denotes the test line to drive and the second + configures how the value should be outputed, as defined in the + datasheet +- #pwm-cells: should be 2, see ../pwm/pwm.txt + +LED subnodes: +A set of subnodes can be used to specify LEDs connected to the LPG. Channels +not associated with a LED are available as pwm channels, see ../pwm/pwm.txt. + +Required properties: +- led-sources: list of channels associated with this LED, starting at 1 for the + first LPG channel + +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: +The following example defines a RGB LED attached to the PM8941. + +&spmi_bus { + pm8941@1 { + lpg { + compatible = "qcom,pm8941-lpg"; + qcom,power-source = <1>; + + rgb { + led-sources = <7 6 5>; + }; + }; + }; +}; + +The following example defines the single PWM channel of the PM8916, which can +be muxed by the MPP4 as a current sink. + +&spmi_bus { + pm8916@1 { + pm8916_pwm: pwm { + compatible = "qcom,pm8916-pwm"; + + #pwm-cells = <2>; + }; + }; +};