Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1305769yba; Tue, 2 Apr 2019 06:33:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqy9w4JOR9uiL3e+Q+3CJ83epw9qidCf9y4AjuPx0ipR+xnwPIhiZcfdKSE3oDlnTuPZjDRa X-Received: by 2002:a17:902:b602:: with SMTP id b2mr11340414pls.293.1554212028689; Tue, 02 Apr 2019 06:33:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554212028; cv=none; d=google.com; s=arc-20160816; b=fvlRWaMvux77+sSIG3hwXr7Tj1KI2lxvCYsL0zeoercbFywpZQSc2+byjYqlvJRnAd MSn+1C4AVMTYYnWoaKf1sDBw9zYKHB04vEDhQcq+bxBsFvDeMpAjtcwd0J5r/ZD96SUw drXtDzBGAj59pWwLf8Pi3/2CrsdWBDd/1uK6tydKPNDHg+go7Z/KxMGicUDyRyMEJXZz FumUgt6jdzPMTCSInPc2sgbPeOYhRpFBQ8HZM0mPWZR/08jN9tPqgfol5pgOQwsgiXaG 0PpRUW19//NFaxfRiJ7Bx5UboTlQzdRN1z4z0kElqs0pAPcc12Ioyxohcj/NacGxU3+q 9uKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=zw8RfeR9DL3cFUqXxz+KFS09xU7hht+cflVWLrPiDCI=; b=qWyh6Zy4pH3Gmw+wA+8mAyLcgpXqjlYNLQS/6t42ZTdU6CeCq5LgS+JYU3dSZf3Cz8 tQDqC1/jaCeW3+ddEQwmhvooAT1EQOR7iFboYIFJL4jntoHmPsmIs6r6ZiB+QlpU7t0T pzuSPo9J2CofV+FEKZ7DPKGXLgPDGxYqWM8H2IKvYgApD7nEosrmQU8us7Kf1iHavCZg PspyRcabrPfaavHBKBwcv093uwJ5pvMIdmwGaqlRyHo4MYC6KNMM9YYWGWPQM3z/B8xJ Qe3ksrPZQZ3Ixkq305Q0FdZKiN7krLQsgv4dgPktDvJHrRbfpRQ8KJV28FFstQACeZdY KIdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=fvC9B68Y; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 140si11197406pga.460.2019.04.02.06.33.33; Tue, 02 Apr 2019 06:33:48 -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=@ti.com header.s=ti-com-17Q1 header.b=fvC9B68Y; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730964AbfDBM5M (ORCPT + 99 others); Tue, 2 Apr 2019 08:57:12 -0400 Received: from fllv0016.ext.ti.com ([198.47.19.142]:55044 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726732AbfDBM5L (ORCPT ); Tue, 2 Apr 2019 08:57:11 -0400 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id x32Cuuqe006919; Tue, 2 Apr 2019 07:56:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1554209816; bh=zw8RfeR9DL3cFUqXxz+KFS09xU7hht+cflVWLrPiDCI=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=fvC9B68YPODUBW7M/79vrHu5RZm8UkthuxFZOuaiaDYvgdiIY61TKPs7vJ57bE7vd dBeOwXAaqMnkBVD97TcO9wFV+8srvRiHqPE3qclFE0I8E1gSD0aacdOf8q1PhgeNas wA7QkPxLyoNXMIsz9lJIFQknjrpNh8+kj2/J6wno= Received: from DFLE111.ent.ti.com (dfle111.ent.ti.com [10.64.6.32]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x32Cuue8096303 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 2 Apr 2019 07:56:56 -0500 Received: from DFLE101.ent.ti.com (10.64.6.22) by DFLE111.ent.ti.com (10.64.6.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Tue, 2 Apr 2019 07:56:56 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DFLE101.ent.ti.com (10.64.6.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Tue, 2 Apr 2019 07:56:56 -0500 Received: from [172.22.72.122] (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id x32CutAA070466; Tue, 2 Apr 2019 07:56:55 -0500 Subject: Re: [PATCH v2 2/3] dt-bindings: backlight: add lm3630a bindings To: Brian Masney , , , , CC: , , , , , , , , , References: <20190401103034.21062-1-masneyb@onstation.org> <20190401103034.21062-3-masneyb@onstation.org> From: Dan Murphy Message-ID: <68229e7f-4749-cde5-f541-793ab614084d@ti.com> Date: Tue, 2 Apr 2019 07:56:55 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190401103034.21062-3-masneyb@onstation.org> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello On 4/1/19 5:30 AM, Brian Masney wrote: > Add new backlight bindings for the TI LM3630A dual-string white LED. > > Signed-off-by: Brian Masney > --- > .../leds/backlight/lm3630a-backlight.yaml | 112 ++++++++++++++++++ > 1 file changed, 112 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..42a8c59d237a > --- /dev/null > +++ b/Documentation/devicetree/bindings/leds/backlight/lm3630a-backlight.yaml > @@ -0,0 +1,112 @@ > +# 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: > + maxItems: 1 > + No description on the reg here. Assumed to be the i2c address? > + 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 > + tranisiton to the human eye. s/tranisiton/transition > + type: boolean > + > +required: > + - compatible > + - reg > + > +patternProperties: > + "^led*$": > + type: object > + description: | > + Properties for a string of connected LEDs. > + I have written a few of these drivers that have control bank support to control. We have been defining the reg property as the control bank id reg 0 - Control bank A reg 1 - Control bank B Then use the led-sources to define what outputs are associated with which control bank. This way the hardware can just have CB B enabled without CB A. something like below would allow just control bank B to be enabled. led@1 { reg = <1>; label = "main-lcd"; default-brightness = <200>; max-brightness = <255>; }; This would connect control bank B to control bank A. Or just use a flag to denote to connect them and not use led-sources. But led-sources is the property of choice. led@0 { reg = <0>; led-sources = < 0 1 >; label = "main-lcd"; default-brightness = <200>; max-brightness = <255>; }; And just the presence of 2 child nodes would indicate individual bank control led@0 { reg = <0>; label = "main-lcd"; default-brightness = <200>; max-brightness = <255>; }; led@1 { reg = <1>; label = "main-keypad"; default-brightness = <200>; max-brightness = <255>; }; > + properties: > + label: > + description: | > + The label for this LED. If omitted, the label is taken from the node > + name (excluding the unit address). It has to uniquely identify a > + device, i.e. no other LED class device can be assigned the same label. > + > + led-sources: > + description: | > + List of device current outputs the LED is connected to. > + allOf: > + - $ref: /schemas/types.yaml#/definitions/uint32-array > + - minItems: 1 > + maxItems: 2 > + items: > + minimum: 0 > + maximum: 1 > + label and led-sources are already defined in the common.txt no need to redefine them here. > + default-brightness: > + description: Default brightness level on boot. > + minimum: 0 > + maximum: 255 > + > + max-brightness: > + description: Maximum brightness level on boot. This is not the max brightness on boot. This is the max brightness that is allowed during runtime. Dan > + minimum: 0 > + maximum: 255 > + > +examples: > + - | > + i2c { > + #address-cells = <1>; > + #size-cells = <0>; > + > + lm3630a_bl@38 { > + compatible = "ti,lm3630a"; > + status = "ok"; > + reg = <0x38>; > + > + led { > + label = "main-lcd"; > + led-sources = <0 1>; > + default-brightness = <200>; > + max-brightness = <255>; > + }; > + }; > + }; > + - | > + i2c { > + #address-cells = <1>; > + #size-cells = <0>; > + > + lm3630a_bl@38 { > + compatible = "ti,lm3630a"; > + status = "ok"; > + reg = <0x38>; > + > + led-bank-a { > + led-sources = <0>; > + default-brightness = <150>; > + ti,linear-mapping-mode; > + }; > + > + led-bank-b { > + led-sources = <1>; > + default-brightness = <225>; > + ti,linear-mapping-mode; > + }; > + }; > + }; > -- ------------------ Dan Murphy