Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4209198yba; Wed, 17 Apr 2019 06:57:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqwkJAzoOZJ+q5Q9uz+MZieUzDaHnvWDBO3ebdLROW+VtrVH7jjFseAtVSicERiSM5oaKoEu X-Received: by 2002:a63:a04c:: with SMTP id u12mr83855280pgn.131.1555509445298; Wed, 17 Apr 2019 06:57:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555509445; cv=none; d=google.com; s=arc-20160816; b=m5YkFb1DGSJph45NT/PsTiWWPRdWAG50nhCEZSt9h6PqvBt9LyWLHrIgMNv0P3AdmZ 8TV/JPhpKndbTW+84EUEJ5AjlreSIGIscZjWKaM6rQubKWkhb6AJKagbEMTC6OQp7TFi 3Np6UV8DJ9of0oR9B5P8oCM2sCZzbifi08OBPWMIbC7ygKp83HrTykmTR3oCCKAVm5O/ 2j81iw+px2CrmTY0nQnQDHpB5r1Q1chJlwRP35yQXWtjYZiTG8uo+GYOwI5FljIqp979 rKNkWmL+M4aN5KtwGOxBCdeoTGjO3ZnGcJ6jdC+IxSaniLdVNmN1t2u1royPCyIGWWza kkLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=o7H/549qFR79lp3+//D6vR7hz7oeACU2XOJOJ+cq+KY=; b=O0P/7+ESrNeWPUuks2xbk0AERlVnwxNqdohpGrkMR13gnsokyajzHbTtC9FD3gvM1b QdC9pEc3SFI+8hb1XkvBrkO2WLyJnGjls0lpaPQkKEzstRLPEfDUfLch3qHJFwwBwvTj 7i+XIAlvFElRXNZUV1XCDbzKAilbow3g6Vkiu5ZLk1D5fJdCDcYC9P5xuAE5X1p8t6pZ gAN02UVlbZrNPRIjF7y0W1FDj6z+K+MTWjXJKChlQLy9lrVo+btjn5vvM9lheIiFpAKU 389BsqRkpRT1cgxzpO8waEs7HD0xMfNmjy3Iw0Nuu93LxMVBe8+dxEcUM3YOGne4yuD+ 1Ouw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=AYoMClAz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id 31si51725631plj.345.2019.04.17.06.57.09; Wed, 17 Apr 2019 06:57:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=AYoMClAz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1732304AbfDQNer (ORCPT + 99 others); Wed, 17 Apr 2019 09:34:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:38586 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729633AbfDQNer (ORCPT ); Wed, 17 Apr 2019 09:34:47 -0400 Received: from mail-qt1-f180.google.com (mail-qt1-f180.google.com [209.85.160.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 909952183F; Wed, 17 Apr 2019 13:34:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1555508085; bh=GPsZXYlgzmujoIoxRBTkTeI3SuyxrV3tSUcHjMl7vWY=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=AYoMClAzSK1GwyruDYZBPG/lrSEm7S6dq0to9bkzf6Fu+FPz3O8eEFAren2aa7Jp6 oG8YAotOKiXCUpokHq07SuOJmZPBfrgModikEXC2giyMJ7ga/WnqKmdjgHysFvB/TN cMSliottN7FGbEGsYFtnx9J/x6LvXVyHkk539Fyw= Received: by mail-qt1-f180.google.com with SMTP id x12so27295696qts.7; Wed, 17 Apr 2019 06:34:45 -0700 (PDT) X-Gm-Message-State: APjAAAX4ZFX7+6CiMTHTMUyPGRKKzvLuEgEfp7FCuVFw871rmYY3oYAw AKLthljOj6BPL6UdHYgOgWzIwRPJe18ncsPVhA== X-Received: by 2002:ac8:2cef:: with SMTP id 44mr55726906qtx.178.1555508084691; Wed, 17 Apr 2019 06:34:44 -0700 (PDT) MIME-Version: 1.0 References: <20190416235350.13742-1-masneyb@onstation.org> <20190416235350.13742-3-masneyb@onstation.org> In-Reply-To: <20190416235350.13742-3-masneyb@onstation.org> From: Rob Herring Date: Wed, 17 Apr 2019 08:34:33 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v4 2/3] dt-bindings: backlight: add lm3630a bindings To: Brian Masney Cc: Lee Jones , Daniel Thompson , Jingoo Han , Jacek Anaszewski , Pavel Machek , Mark Rutland , Bartlomiej Zolnierkiewicz , dri-devel , Linux LED Subsystem , devicetree@vger.kernel.org, "linux-kernel@vger.kernel.org" , Linux Fbdev development list , Dan Murphy , Jonathan Marek Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 16, 2019 at 6:54 PM Brian Masney wrote: > > Add new backlight bindings for the TI LM3630A dual-string white LED. > > Signed-off-by: Brian Masney > --- > Rob: Since the common bindings aren't converted to the new JSON schema > yet, I'm not sure how to do led-sources here. I would expect that we'd > have the uint32-array on the common binding once it exists. I had to > add it here to keep 'make dt_binding_check' happy. I left the > description off though for that property since that'll come from common > once its converted. What was the error? '$ref' shouldn't be needed for this. The tooling has no knowledge whether there's common schema or not. So you probably have some pattern the meta-schema doesn't like and we need to fix. > > Changes since v3: > - Add label. I didn't add a description for it since that'll come from > the common properties once its converted. > > Changes since v2: > - Update description of max-brightness > - Add description for reg > - Correct typo: s/tranisiton/transition > - add reg to control banks > - add additionalProperties > > .../leds/backlight/lm3630a-backlight.yaml | 128 ++++++++++++++++++ > 1 file changed, 128 insertions(+) > create mode 100644 Documentation/devicetree/bindings/leds/backlight/lm3630a-backlight.yaml > > diff --git a/Documentation/devicetree/bindings/leds/backlight/lm3630a-backlight.yaml b/Documentation/devicetree/bindings/leds/backlight/lm3630a-backlight.yaml > new file mode 100644 > index 000000000000..5067038ca637 > --- /dev/null > +++ b/Documentation/devicetree/bindings/leds/backlight/lm3630a-backlight.yaml > @@ -0,0 +1,128 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/leds/backlight/lm3630a-backlight.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: TI LM3630A High-Efficiency Dual-String White LED > + > +maintainers: > + - Lee Jones > + - Daniel Thompson > + - Jingoo Han > + > +description: | > + The LM3630A is a current-mode boost converter which supplies the power and > + controls the current in up to two strings of 10 LEDs per string. > + https://www.ti.com/product/LM3630A > + > +properties: > + compatible: > + const: ti,lm3630a > + > + reg: > + description: The I2C address of the device No need to describe a common property if there's nothing specific for this device. > + maxItems: 1 > + > + ti,linear-mapping-mode: > + description: | > + Enable linear mapping mode. If disabled, then it will use exponential > + mapping mode in which the ramp up/down appears to have a more uniform > + transition to the human eye. > + type: boolean > + > +required: > + - compatible > + - reg > + > +patternProperties: > + "^led@[01]$": > + type: object > + description: | > + Properties for a string of connected LEDs. > + > + properties: > + reg: > + description: Control Bank Probably makes sense to have description here since this isn't a standard type of address. > + maxItems: 1 > + minimum: 0 > + maximum: 1 > + > + label: > + maxItems: 1 > + > + led-sources: > + allOf: > + - $ref: /schemas/types.yaml#/definitions/uint32-array > + - minItems: 1 > + maxItems: 2 > + items: > + minimum: 0 > + maximum: 1 > + > + default-brightness: > + description: Default brightness level on boot. > + minimum: 0 > + maximum: 255 > + > + max-brightness: > + description: Maximum brightness that is allowed during runtime. > + minimum: 0 > + maximum: 255 > + > + required: > + - reg > + > + additionalProperties: false > + > +additionalProperties: false > + > +examples: > + - | > + i2c { > + #address-cells = <1>; > + #size-cells = <0>; > + > + lm3630a_bl@38 { led-controller@38 > + compatible = "ti,lm3630a"; > + status = "ok"; Don't show status in examples. > + reg = <0x38>; > + > + #address-cells = <1>; > + #size-cells = <0>; > + > + led@0 { > + reg = <0>; > + led-sources = <0 1>; > + label = "lcd-backlight"; > + default-brightness = <200>; > + max-brightness = <255>; > + }; > + }; > + }; > + - | > + i2c { > + #address-cells = <1>; > + #size-cells = <0>; > + > + lm3630a_bl@38 { > + compatible = "ti,lm3630a"; > + status = "ok"; > + reg = <0x38>; > + > + #address-cells = <1>; > + #size-cells = <0>; > + > + led@0 { > + reg = <0>; > + default-brightness = <150>; > + ti,linear-mapping-mode; > + }; > + > + led@1 { > + reg = <1>; > + default-brightness = <225>; > + ti,linear-mapping-mode; > + }; > + }; > + }; > -- > 2.20.1 >