Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp621512pxb; Thu, 9 Sep 2021 08:22:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzUZCm2hAQRPvClkuIgzhJ7S+Us3DsgaPxGN1/gP5rfxXIuKQa9lscOD1gtkiX6JjU7id4y X-Received: by 2002:adf:dd10:: with SMTP id a16mr4331039wrm.281.1631200954010; Thu, 09 Sep 2021 08:22:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631200953; cv=none; d=google.com; s=arc-20160816; b=jp7V+Y6brpT0E2TRobWfuzSElAaX3vApXQO6gjbFcFj3JiGQFYhqwVnRV4WaZQxDiM fLMyZn6EcFZ+ffStN+ZFTgJRXN+k8zr5TwDyZvrLJb4i0r7/8Yi6qZCDNigCI+0IX/Tn IIhDJAHzY0UM3XtQ3mau+m8U9lkMq4ENv2+BDM6BMZZkH2NPUpLZNWZlTCj8aac5YXpV ji/zjmuwjK1QLHs3M72fkd56LXRiimepY/NBV3LK1fiP1dPXfaB/KdQA0p+tyW/qlgbn InsvoeuJ18DjRbZ6XdGw5iFPqCiZMu+GI3JEciMeF7rNbYIOqzheULnSF9FCsMz9XQOP 7bdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=VWNh9d2tUZKG8idZXByBeqTa3/M4oXQ5jM0T9ftLR/I=; b=pIZ4haaMQKYYhQ6w1uqBYdpZBgPAmic8b9/3SgcIHyI7giIljy805/9/Co9PZHHg+K uK9+y8l+5+WISRWVoo3V8qIEYYUV/FRVLYVoT7sKaynGJrz0hWZ9GNsd2iuBEzq3rM5k dqCQvsmtJCq7ibDNXR1/4uotggrxD11iTi57Ooi6kceTl4f9u62oNvPNFmNfuER98fkE Cxu0MdH4x8kGOOGmbqqWDTr5A7FZQ0d1p9G90k9uofDRSc5bqPyxnOl1W2k129rLhJ9R W05zSZ2iJSbhbQ4ociHxSZlOs0iOx/F29udnS02DdXmQgekkwiwUA+mtOqgPpAdJ4AXo BlEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=DnigeVP4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f2si2912280edl.338.2021.09.09.08.22.06; Thu, 09 Sep 2021 08:22:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=DnigeVP4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236918AbhIIPT3 (ORCPT + 99 others); Thu, 9 Sep 2021 11:19:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56018 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236745AbhIIPT2 (ORCPT ); Thu, 9 Sep 2021 11:19:28 -0400 Received: from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com [IPv6:2607:f8b0:4864:20::1032]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58D8DC061757 for ; Thu, 9 Sep 2021 08:18:19 -0700 (PDT) Received: by mail-pj1-x1032.google.com with SMTP id oc9so1603721pjb.4 for ; Thu, 09 Sep 2021 08:18:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=VWNh9d2tUZKG8idZXByBeqTa3/M4oXQ5jM0T9ftLR/I=; b=DnigeVP4cZBoGJUJUi88ziXn1T3CRIWIFPRKrJ3LPoiqoQGG3OigRZ/Nw3AdIecPYQ JnFT/1lTu2E9E04ZwY9ZgZbYhJuhV7JPIB++wzcygMO8hvR2L+50c1wMFfxlYt0hVrYb C/YN8jBK0j7lymZLZEXbML9qB5S5JUq017qmg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=VWNh9d2tUZKG8idZXByBeqTa3/M4oXQ5jM0T9ftLR/I=; b=Y6b/1Bfja9saZGVK7jUX39iNvIFsUWzBlJCKgB0x70FcuSvkxug/Q7NY8eLu5N0y1s r/DfW9FNXD9vXzlS2iaXczHAl/eEXsNd9UEW66bxMyNW75kZAY31RVfQLYqLUbuoj8x0 fYPCgVvSZj5f0M+d+TpBcQk4f4E/oaNrgD13tXTdJ0rrOtOo2fSbsrKSfjCTncuJ8Lkm /oBjPP+x6X+aEoQgPla9nxIj4aKSK33TzNZbmZP5bhFl2TdztrHxF3eTzyiWtRwP9rfR xFBIYKJqYEUexXNN+iE1DBPL2aacdunMOgZdGTZC78cAVgL9eUe6z+FsUE+1xspcT8AS EDgA== X-Gm-Message-State: AOAM531T0ucLrvgm/HMHul7kfR5OrSAxdJ5MsGXqOMDKktcJQybrB78D NoQ46IV71csI4ZmjKmfwAEhgwg== X-Received: by 2002:a17:90a:2ecb:: with SMTP id h11mr4165144pjs.196.1631200698756; Thu, 09 Sep 2021 08:18:18 -0700 (PDT) Received: from localhost ([2620:15c:202:201:27cc:a1d4:ed44:e1de]) by smtp.gmail.com with UTF8SMTPSA id q3sm3032653pgf.18.2021.09.09.08.18.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 09 Sep 2021 08:18:18 -0700 (PDT) Date: Thu, 9 Sep 2021 08:18:16 -0700 From: Matthias Kaehlcke To: Bjorn Andersson Cc: Pavel Machek , Rob Herring , Andy Gross , Thierry Reding , Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= , Lee Jones , linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-pwm@vger.kernel.org, Marijn Suijten , Yassine Oudjana , Luca Weiss , Subbaraman Narayanamurthy Subject: Re: [PATCH v9 1/2] dt-bindings: leds: Add Qualcomm Light Pulse Generator binding Message-ID: References: <20210623035039.772660-1-bjorn.andersson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210623035039.772660-1-bjorn.andersson@linaro.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 22, 2021 at 08:50:38PM -0700, Bjorn Andersson wrote: > 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 v8: > - None > > Changes since v7: > - Added qcom,pmc8180c-lpg > - Defined constraints for qcom,power-source > - Changes qcom,dtest to matrix and added constraints > - Changed example from LED_COLOR_ID_MULTI to LED_COLOR_ID_RGB > > .../bindings/leds/leds-qcom-lpg.yaml | 164 ++++++++++++++++++ > 1 file changed, 164 insertions(+) > create mode 100644 Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml > > diff --git a/Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml b/Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml > new file mode 100644 > index 000000000000..10aee61a7ffc > --- /dev/null > +++ b/Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml > @@ -0,0 +1,164 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/leds/leds-qcom-lpg.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Qualcomm Light Pulse Generator > + > +maintainers: > + - Bjorn Andersson > + > +description: > > + 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. > + > +properties: > + compatible: > + enum: > + - qcom,pm8150b-lpg > + - qcom,pm8150l-lpg > + - qcom,pm8916-pwm > + - qcom,pm8941-lpg > + - qcom,pm8994-lpg > + - qcom,pmc8180c-lpg > + - qcom,pmi8994-lpg > + - qcom,pmi8998-lpg > + > + "#pwm-cells": > + const: 2 > + > + "#address-cells": > + const: 1 > + > + "#size-cells": > + const: 0 > + > + qcom,power-source: > + $ref: /schemas/types.yaml#/definitions/uint32 > + description: > + power-source used to drive the output, as defined in the datasheet. > + Should be specified if the TRILED block is present > + enum: [0, 1, 3] > + > + qcom,dtest: > + $ref: /schemas/types.yaml#/definitions/uint32-matrix > + description: > > + A list of integer pairs, where each pair represent the dtest line the > + particular channel should be connected to and the flags denoting how the > + value should be outputed, as defined in the datasheet. The number of > + pairs should be the same as the number of channels. > + items: > + items: > + - description: dtest line to attach > + - description: flags for the attachment > + > + multi-led: > + type: object > + $ref: leds-class-multicolor.yaml# > + properties: > + "#address-cells": > + const: 1 > + > + "#size-cells": > + const: 0 > + > + "^led@[0-9a-f]$": > + type: object > + $ref: common.yaml# > + > +patternProperties: > + "^led@[0-9a-f]$": > + type: object > + $ref: common.yaml# > + > + properties: > + reg: true > + > + required: > + - reg > + > +required: > + - compatible > + > +additionalProperties: false > + > +examples: > + - | > + #include > + > + lpg { > + compatible = "qcom,pmi8994-lpg"; > + > + #address-cells = <1>; > + #size-cells = <0>; > + > + qcom,power-source = <1>; > + > + qcom,dtest = <0 0>, > + <0 0>, > + <0 0>, > + <4 1>; > + > + led@1 { > + reg = <1>; > + label = "green:user1"; > + }; > + > + led@2 { > + reg = <2>; > + label = "green:user0"; > + default-state = "on"; > + }; > + > + led@3 { > + reg = <3>; > + label = "green:user2"; > + }; > + > + led@4 { > + reg = <4>; > + label = "green:user3"; > + }; > + }; > + - | > + #include > + > + lpg { > + compatible = "qcom,pmi8994-lpg"; > + > + #address-cells = <1>; > + #size-cells = <0>; > + > + qcom,power-source = <1>; > + > + multi-led { > + color = ; > + function = LED_FUNCTION_STATUS; > + > + #address-cells = <1>; > + #size-cells = <0>; > + > + led@1 { > + reg = <1>; > + color = ; > + }; > + > + led@2 { > + reg = <2>; > + color = ; > + }; > + > + led@3 { > + reg = <3>; > + color = ; > + }; > + }; > + }; > + - | > + lpg { nit: should the node be named 'lpg-pwm'? IIUC a PMIC .dtsi could have both a 'lpg' and a 'lpg-pwm' node, even though only one of them can be enabled at any time. > + compatible = "qcom,pm8916-pwm"; > + #pwm-cells = <2>; > + };