Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp262765pxx; Mon, 26 Oct 2020 08:05:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyS/SuJXmzR9XQ0qh5OlWLbZ1d0cSAtM9VJZB66QsxDpkCz40t/0cgKd5OSHj6zTDxo647q X-Received: by 2002:a2e:8798:: with SMTP id n24mr5571758lji.317.1603724714222; Mon, 26 Oct 2020 08:05:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603724714; cv=none; d=google.com; s=arc-20160816; b=lscoKjwu8tvmOaUSB3ChYBOqdyKPmP5Q259OHLd9ceSVNau0R6pPc01kH+XJzR8ha3 C44PEbo98IX+yNcK+qcZL5ySBKsTQ6rC3/uAKDYG8pfgIWZMQzRUgxQbbaMPOFzRdpOq QlDYvjx5dMEBylOzANUSWE5lJKSTGAI2Ey614OZV194+YvzHbaLsB2Nh2J1lack1ZmUb ntVIF85+BPhU0ZVsRd/9r+p7Qsu/wL1YHRJX8ms7DRqAB7DwW82g0XgbghqgZRIhbAv8 gc7W5ZybD18tVZ8z/5mulwWHxJeWTpZSSzWOyh+J+eajvpTNaNfMgVYwPDXIanJUvBYB fL5w== 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; bh=2aiLRf1lQzD4dmA+9Qc8/8CVqPN/upZ+zNSr1+Xbbnk=; b=Pmi69gUXYeVlCPdUgphb4zww4HaDw/V8fy0g5VaV1FoLuCOVooWimI3fwVeaSBAygJ 5la0SBcBPzLb8o4212yEdtuSdKv2DRzyRLrx0du3lZVeYs/6gROf41Oqc7qYYlezpugZ CTzFz9uzNEU+vtLf7oqr7YhxmMNnxZn5sSmErWETgkRaj8XrTln02Kf7qu/7Frq0McdS THky3eFUZTRQDSpVukR2w2FAPx9whsw8UQF5IRHJtM/MOMQb636ZL5FJsVpVoWXnjWR3 G2XuZMwCynWnuw2ZPdsyjfzT7PJmNMBKeCxJM34NY92eDxcq5K0slH/4O4i9xpTXmvjb 6iXQ== ARC-Authentication-Results: i=1; mx.google.com; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dm2si7748412ejc.295.2020.10.26.08.04.49; Mon, 26 Oct 2020 08:05:14 -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; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1782104AbgJZPCm (ORCPT + 99 others); Mon, 26 Oct 2020 11:02:42 -0400 Received: from mail-ot1-f65.google.com ([209.85.210.65]:44772 "EHLO mail-ot1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1782749AbgJZPCl (ORCPT ); Mon, 26 Oct 2020 11:02:41 -0400 Received: by mail-ot1-f65.google.com with SMTP id e20so8222409otj.11; Mon, 26 Oct 2020 08:02:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=2aiLRf1lQzD4dmA+9Qc8/8CVqPN/upZ+zNSr1+Xbbnk=; b=jEihGHWA9JCNgqDH4vbBRr1h5JIKXLEiu0zTH/LPUrsH493KGpRFgTUekR91JUl4ZF LmMvWhdthlQRVFTHnJFHgmCk8HRbysnfqFWnjNkLGrgvBQXgMai8eFVi2an95ACkwh3u 3s4o62T91kwrlCLiGMJhgAS5pjLap8JSmA3Se2EB93z1Kqdvq9vjh4z5lEbj+MGN8EeJ 5mcpBzTJ9HHBdD5K1r1AT72zT4+uLIdcb7v2nt4gMNOq2S8uoRDoaFSEL5R/NCFln3fk h2cld9zAhzp9XH0r/3R671yoy8ik1kdqB4+uTUtXvucRoAiOiKsETSVMYUIZ9pX6bJwE j6ug== X-Gm-Message-State: AOAM532Se/Tcq8S7/EHpkYwsfnEzitfwUs/w7VWaHilKMmZpxX3SDpVJ rQmUW7aBAeiCU2uOD7WKHw== X-Received: by 2002:a9d:172f:: with SMTP id i47mr10180077ota.74.1603724557602; Mon, 26 Oct 2020 08:02:37 -0700 (PDT) Received: from xps15 (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.gmail.com with ESMTPSA id h6sm4126286oia.51.2020.10.26.08.02.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Oct 2020 08:02:36 -0700 (PDT) Received: (nullmailer pid 156045 invoked by uid 1000); Mon, 26 Oct 2020 15:02:35 -0000 Date: Mon, 26 Oct 2020 10:02:35 -0500 From: Rob Herring To: Bjorn Andersson Cc: Pavel Machek , Dan Murphy , Andy Gross , Thierry Reding , Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , Lee Jones , Martin Botka , 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 v6 1/4] dt-bindings: leds: Add Qualcomm Light Pulse Generator binding Message-ID: <20201026150235.GA140013@bogus> References: <20201021201224.3430546-1-bjorn.andersson@linaro.org> <20201021201224.3430546-2-bjorn.andersson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201021201224.3430546-2-bjorn.andersson@linaro.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 21, 2020 at 01:12:21PM -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 v5: > - None > > .../bindings/leds/leds-qcom-lpg.yaml | 170 ++++++++++++++++++ > 1 file changed, 170 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..5ccf0f3d8f1b > --- /dev/null > +++ b/Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml > @@ -0,0 +1,170 @@ > +# 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,pm8916-pwm Are the LED properties valid when PWM is used/enabled? The schema suggests yes, the example suggests no. If not, I think this should be 2 schema docs. > + - qcom,pm8941-lpg > + - qcom,pm8994-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 led-sources can't be made to work for this? > + 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 > + > + 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# > + > + properties: > + "qcom,dtest": Don't need quotes. > + $ref: /schemas/types.yaml#definitions/uint32-array The description sounds like a matrix rather than an array. > + description: > > + 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 > + minItems: 2 > + maxItems: 2 If so, then you'd want: items: minItems: 2 maxItems: 2 > + > + required: > + - reg > + > +patternProperties: > + "^led@[0-9a-f]$": > + type: object > + $ref: common.yaml# > + properties: > + "qcom,dtest": > + $ref: /schemas/types.yaml#definitions/uint32-array > + description: > > + 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 > + minItems: 2 > + maxItems: 2 > + > + required: > + - reg > + > +required: > + - compatible > + > +additionalProperties: false > + > +examples: > + - | > + #include > + > + lpg { > + compatible = "qcom,pmi8994-lpg"; > + > + #address-cells = <1>; > + #size-cells = <0>; > + > + qcom,power-source = <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"; > + > + qcom,dtest = <4 1>; > + }; > + }; > + - | > + #include > + > + lpg { > + compatible = "qcom,pmi8994-lpg"; > + > + #address-cells = <1>; > + #size-cells = <0>; > + > + qcom,power-source = <1>; > + > + multi-led { > + color = ; > + label = "rgb:notification"; > + > + #address-cells = <1>; > + #size-cells = <0>; > + > + led@1 { > + reg = <1>; > + color = ; > + }; > + > + led@2 { > + reg = <2>; > + color = ; > + }; > + > + led@3 { > + reg = <3>; > + color = ; > + }; > + }; > + }; > + - | > + lpg { > + compatible = "qcom,pm8916-pwm"; > + #pwm-cells = <2>; > + }; > +... > -- > 2.28.0 >