Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp1625109rwo; Wed, 2 Aug 2023 18:15:30 -0700 (PDT) X-Google-Smtp-Source: APBJJlHCYJ+Ijcla6S9yHFMSySWzXXjIEhZnPfUldx52DNze5P/w6hol5F2lnS6n8VoJXlCECLq+ X-Received: by 2002:a05:6808:138d:b0:3a3:f1b3:9b8e with SMTP id c13-20020a056808138d00b003a3f1b39b8emr21496834oiw.28.1691025330070; Wed, 02 Aug 2023 18:15:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691025330; cv=none; d=google.com; s=arc-20160816; b=Kjz+CuTFXBFA5AQjGhnFCOPvN5t76pKYxBvHnlHI4rlSSoGk4Xm7xImG+mPd98Ruw2 J9v7mKtohksPJH7gQYQHtuKCKoTWhU2wiHUk2gDw8T1XFnrjDBzvG5Pv2Okg4MJiX4NY 2JYh/divx+U95ZEb1UcHlAWSBQGlUMGac2AYh3C2X31HBvqPdhbGUyel4KL7xKgNYj65 5Of31/RO6LA4OsDxoCTLZ9LQ5Vzjq5d49T6Eqr5PXynEcQS/XTWW5iFDe7FJdppl1cW4 kw1DbxI4kN6FXi/RmBFiqZ91YPvZegCs1k9dW9bnAuyAAqBZhZ//FV3qMYmHW/VyhLtz x2LA== 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=eOeu+0P/E6ur2eC7O+YQdWVFige7DYsRTVtFUJiPYq0=; fh=muDwWxh6XH1id9/8jcoDPuwV8QKb0/bJe8kxDVptuLs=; b=iVFE0wLVmiAnShFalyb+lnvbjfeEUrSwPGZmA+YVOaLJW7Zdw/8NIDQWeV8BuSqxkj t1k8JyLqUsgvx7/LdbL32yuoEZp0x8Pf7eXm+wgPxqKDk1GAOsR+6vEO5/4ymT/vZaPC vcT4M+lws074X7odU3xdQ2HpMcMJSEjaBMJNjE+e+sqYpRXex18gJOIrYJDIc5X1UnuX SRhjrdpQW1OztXRlPpllOx3wjqK0OHUWmC0Z3Z12GJLX6IEAvwMBvWeKbOGZm0Q9gFn5 UkUTGks970IwQ/4ubySGNPCyHRDj+PFwppl0DVSaRcTuw/jOZ8OR/U4Mv6CtQLb4ttXa mz/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oxoeAZAG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c6-20020a633506000000b00563df2ba23fsi11761722pga.845.2023.08.02.18.15.16; Wed, 02 Aug 2023 18:15:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oxoeAZAG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231897AbjHCAZI (ORCPT + 99 others); Wed, 2 Aug 2023 20:25:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33862 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229685AbjHCAZH (ORCPT ); Wed, 2 Aug 2023 20:25:07 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 059BE11D; Wed, 2 Aug 2023 17:25:06 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9597F61B95; Thu, 3 Aug 2023 00:25:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D6861C433C8; Thu, 3 Aug 2023 00:25:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691022304; bh=Ak6kWgpita0ccStQUBSLTHQZ7Qxm2852u+BDrFi7RTQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=oxoeAZAGjuZLO3hoE98/N44RKxRUPG41IhNvI224eG9LzGYuPJ8KxOHPpB05W3om9 5b5TuYFEiAHtFZ2fL7L9JR+ldk+TrfSE0YhaBJJHVmh5mn7nDHfVruAH97TJK9hood gLYnjUG1/u8MMHPdk4BzKhpk3JqQ2dPHz5nvlEqmccwuBMgtJE7TMz5k0WHn5BF7uH +DupCeCicS+5gCblQeAizSgrN0sPOwSEuLBc4GEt/q6nYNtTI3A2/GQ0iBkuL7Glxl RLD0GwnXsX4J71uei464iGVOTgdXaegNN4hvxit/2wWQgS9Y4HiONI/Nkp6+y+fRMA 9wDKyN8IyhgtQ== Received: (nullmailer pid 1580378 invoked by uid 1000); Thu, 03 Aug 2023 00:25:02 -0000 Date: Wed, 2 Aug 2023 18:25:02 -0600 From: Rob Herring To: Anjelique Melendez Cc: pavel@ucw.cz, lee@kernel.org, thierry.reding@gmail.com, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, agross@kernel.org, andersson@kernel.org, luca.weiss@fairphone.com, konrad.dybcio@linaro.org, u.kleine-koenig@pengutronix.de, quic_subbaram@quicinc.com, 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 Subject: Re: [PATCH v2 2/7] dt-bindings: leds: leds-qcom-lpg: Add support for LPG PPG Message-ID: <20230803002502.GA1569972-robh@kernel.org> References: <20230725193423.25047-1-quic_amelende@quicinc.com> <20230725193423.25047-3-quic_amelende@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230725193423.25047-3-quic_amelende@quicinc.com> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 25, 2023 at 12:34:18PM -0700, Anjelique Melendez wrote: > Update leds-qcom-lpg bindings to support LPG PPG. > > Signed-off-by: Anjelique Melendez > --- > .../bindings/leds/leds-qcom-lpg.yaml | 92 ++++++++++++++++++- > 1 file changed, 91 insertions(+), 1 deletion(-) > > diff --git a/Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml b/Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml > index e6f1999cb22f..6feca859fb74 100644 > --- a/Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml > +++ b/Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml > @@ -11,7 +11,7 @@ maintainers: > > 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 > + a ramp generator with lookup table (LUT), the light pulse generator and a three > channel current sink. These blocks are found in a wide range of Qualcomm PMICs. > > properties: > @@ -63,6 +63,27 @@ properties: > - description: dtest line to attach > - description: flags for the attachment > > + nvmem: > + description: > > + This property is required for PMICs that supports PPG, which is when a > + PMIC stores LPG per-channel data and pattern LUT in SDAM modules instead > + of in a LUT peripheral. For PMICs, such as PM8350C, per-channel data > + and pattern LUT is separated into 2 SDAM modules. In that case, phandles > + to both SDAM modules need to be specified. > + minItems: 1 > + maxItems: 2 > + > + nvmem-names: > + minItems: 1 > + maxItems: 2 > + > + qcom,pbs: > + $ref: /schemas/types.yaml#/definitions/phandle > + description: > > + Phandle of the Qualcomm Programmable Boot Sequencer node (PBS). > + PBS node is used to trigger LPG pattern sequences for PMICs that support > + single SDAM PPG. > + > multi-led: > type: object > $ref: leds-class-multicolor.yaml# > @@ -106,6 +127,44 @@ required: > > additionalProperties: false > > +allOf: > + - if: > + properties: > + compatible: > + contains: > + const: qcom,pmi632-lpg > + then: > + properties: > + nvmem: > + maxItems: 1 > + nvmem-names: > + items: > + - const: lpg_chan_sdam > + qcom,pbs: > + maxItems: 1 > + required: > + - nvmem > + - nvmem-names > + - qcom,pbs > + - if: > + properties: > + compatible: > + contains: > + enum: > + - qcom,pm8350c-pwm > + - qcom,pm8550-pwm > + then: > + properties: > + nvmem: > + minItems: 2 > + nvmem-names: > + items: > + - const: lpg_chan_sdam > + - const: lut_sdam This can go into the main section and then here you just say 'minItems: 2'. And similar for the 1st if/then. > + required: > + - nvmem > + - nvmem-names Looks like these are always required. > + > examples: > - | > #include > @@ -191,4 +250,35 @@ examples: > compatible = "qcom,pm8916-pwm"; > #pwm-cells = <2>; > }; > + - | > + #include > + > + led-controller { > + compatible = "qcom,pmi632-lpg"; > + #address-cells = <1>; > + #size-cells = <0>; > + #pwm-cells = <2>; > + nvmem-names = "lpg_chan_sdam"; > + nvmem = <&pmi632_sdam_7>; > + qcom,pbs = <&pmi632_pbs_client3>; > + > + led@1 { > + reg = <1>; > + color = ; > + label = "red"; > + }; > + > + led@2 { > + reg = <2>; > + color = ; > + label = "green"; > + }; > + > + led@3 { > + reg = <3>; > + color = ; > + label = "blue"; > + }; > + }; > + > ... > -- > 2.41.0 >