Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp1632310ybp; Fri, 11 Oct 2019 17:58:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqyHTt5d7jjxmX4AdI8c0CgEIDrZreqDGXsOGwnfppabZNAgvVkcAPl3El9sYu//CB0g/t2L X-Received: by 2002:a05:6402:19bd:: with SMTP id o29mr16142229edz.42.1570841889276; Fri, 11 Oct 2019 17:58:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570841889; cv=none; d=google.com; s=arc-20160816; b=RZ36bsO6UdLI/JWG0faAMsqFl6TsatWxvaJOpumIfiiTklMr1hGB3KAEsx9Lyrz5t5 LVoIWDOGoHTuvsZ+Htgl0vR1TqiX0rnoBNfIb/Bf92E5PMlZOMMpn0rfLU6vcrn5qdUh Pp9fpu2LtObmxhCcT9czG9iES8PedxndOh6aa12tQKjNLwxXE3A13YC+P7b0iBqaUTtk KLCeHR+KEnGNf4IfEDPl28V9TCr1pVy3PRQRwOz4tP2f4kNyF6sWPpux3raJgKxC9EEC 2LhZILkP3dFdhHy7GCIvgA5D54tsAEmttM/KzywnubXLG0uJffA8teBYDO9nSfvyBdcW /fhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=Hz1dvz2jwaSmGjVKqANh2HvbNfWAlay5hxJbMawY5nc=; b=iKPlQJS95HWPaxtMVfq0sjYLWElVOnjp6FLbXx/RwwQ8GJJE98gfXFlHJ8NtJE/bZy oxjDCs6OvgJNcly2MqEXAs5+51XX1SNhsnwDRKMI/pO9yizeiydnH8iuY/TFZASXH+eH muWFlwtzK3W/Y/7Of6qY8dj58HyaCJDSo5x8lYBAj2FJBeeKw+DgpXTKyWcn/LPOEZfj BlQ1sDq5X1EqpAya2d9mz/nODpg9kTtWux2loD1Ljj8NItDevQY1cdGlb9zY1EVSsP8E WVyhF3H5s1vczUWWXLYhiFOIQQJ7x+u/b084yGcTZQnCV/wNOfS0Aa1AZeQSS0KWUUrX 0VeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=DEvFlovb; 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 b17si6259506ejp.326.2019.10.11.17.57.44; Fri, 11 Oct 2019 17:58:09 -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=DEvFlovb; 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 S1727908AbfJLAyl (ORCPT + 99 others); Fri, 11 Oct 2019 20:54:41 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:52460 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726345AbfJLAyl (ORCPT ); Fri, 11 Oct 2019 20:54:41 -0400 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id x9C0sRxU063797; Fri, 11 Oct 2019 19:54:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1570841667; bh=Hz1dvz2jwaSmGjVKqANh2HvbNfWAlay5hxJbMawY5nc=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=DEvFlovbIbEaYERLuSqP2Xs1pfRcGV6b2K9SCzYuAOeBXKvhkB6kWjmTkjMbWMkUx IXKqvZWRqfkNPqi0OCdzWiiBWiO+YbiW+JiXF/LwGGWg50PdHEze6VTanGriAJlKgp WEIF/Ho3la14WtzdptUvhJB3S7XFG0ga5V1M2qOY= Received: from DLEE110.ent.ti.com (dlee110.ent.ti.com [157.170.170.21]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x9C0sRFV087015 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 11 Oct 2019 19:54:27 -0500 Received: from DLEE106.ent.ti.com (157.170.170.36) by DLEE110.ent.ti.com (157.170.170.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Fri, 11 Oct 2019 19:54:26 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE106.ent.ti.com (157.170.170.36) 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; Fri, 11 Oct 2019 19:54:26 -0500 Received: from [10.250.65.13] (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id x9C0sQNE044056; Fri, 11 Oct 2019 19:54:26 -0500 Subject: Re: [PATCH v12 08/16] dt: bindings: lp55xx: Update binding for Multicolor Framework To: Jacek Anaszewski , CC: , , Tony Lindgren , =?UTF-8?Q?Beno=c3=aet_Cousson?= , Linus Walleij , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team References: <20191011130657.4713-1-dmurphy@ti.com> <20191011130657.4713-9-dmurphy@ti.com> <42fb3f20-be4c-8e9e-8035-e4eafbc1e687@gmail.com> From: Dan Murphy Message-ID: <0ab2250d-36ff-390a-04e2-48883a930a9a@ti.com> Date: Fri, 11 Oct 2019 19:54:05 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <42fb3f20-be4c-8e9e-8035-e4eafbc1e687@gmail.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US 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 Jacek On 10/11/19 3:15 PM, Jacek Anaszewski wrote: > Dan, > > On 10/11/19 3:06 PM, Dan Murphy wrote: >> Update the DT binding to include the properties to use the >> multicolor framework for the devices that use the LP55xx >> framework. >> >> Signed-off-by: Dan Murphy >> CC: Tony Lindgren >> CC: "BenoƮt Cousson" >> CC: Linus Walleij >> CC: Shawn Guo >> CC: Sascha Hauer >> CC: Pengutronix Kernel Team >> CC: Fabio Estevam >> CC: NXP Linux Team >> --- >> .../devicetree/bindings/leds/leds-lp55xx.txt | 149 +++++++++++++++--- >> 1 file changed, 124 insertions(+), 25 deletions(-) >> >> diff --git a/Documentation/devicetree/bindings/leds/leds-lp55xx.txt b/Documentation/devicetree/bindings/leds/leds-lp55xx.txt >> index bfe2805c5534..736a2e1538be 100644 >> --- a/Documentation/devicetree/bindings/leds/leds-lp55xx.txt >> +++ b/Documentation/devicetree/bindings/leds/leds-lp55xx.txt >> @@ -1,6 +1,8 @@ >> Binding for TI/National Semiconductor LP55xx LED Drivers >> >> Required properties: >> +- #address-cells: 1 >> +- #size-cells: 0 >> - compatible: one of >> national,lp5521 >> national,lp5523 >> @@ -14,6 +16,18 @@ Required properties: >> Each child has own specific current settings >> - led-cur: Current setting at each LED channel (mA x10, 0 if LED is not connected) >> - max-cur: Maximun current at each LED channel. >> +- reg: Output channel for the LED. This is zero based channel identifier and >> + the data sheet is a one based channel identifier. >> + reg value to output to LED output number >> + D1 = reg value is 0 >> + D2 = reg value is 1 >> + D3 = reg value is 2 >> + D4 = reg value is 3 >> + D5 = reg value is 4 >> + D6 = reg value is 5 >> + D7 = reg value is 6 >> + D8 = reg value is 7 >> + D9 = reg value is 8 >> >> Optional properties: >> - enable-gpio: GPIO attached to the chip's enable pin >> @@ -35,23 +49,28 @@ example 1) LP5521 >> on channel 0. >> >> lp5521@32 { > While at it let's fix node prefix to led-controller. > It will not break anyone and yet it will adapt the node naming > to what is now recommended. I would love to do that but honestly I prefer to fix that in a different patch series and not add more changes to this patch review. > >> + #address-cells = <1>; >> + #size-cells = <0>; >> compatible = "national,lp5521"; >> reg = <0x32>; >> label = "lp5521_pri"; >> clock-mode = /bits/ 8 <2>; >> >> - chan0 { >> + chan@0 { > Similarly in case of every child node: > > s/chan/led/ > >> + reg = <0>; >> led-cur = /bits/ 8 <0x2f>; >> max-cur = /bits/ 8 <0x5f>; >> linux,default-trigger = "heartbeat"; >> }; >> >> - chan1 { >> + chan@1 { >> + reg = <1>; >> led-cur = /bits/ 8 <0x2f>; >> max-cur = /bits/ 8 <0x5f>; >> }; >> >> - chan2 { >> + chan@2 { >> + reg = <2>; >> led-cur = /bits/ 8 <0x2f>; >> max-cur = /bits/ 8 <0x5f>; >> }; >> @@ -70,59 +89,70 @@ ASEL1 ASEL0 Address >> VEN VEN 35h >> >> lp5523@32 { > s/lp5523/led-controller/ > >> + #address-cells = <1>; >> + #size-cells = <0>; >> compatible = "national,lp5523"; >> reg = <0x32>; >> clock-mode = /bits/ 8 <1>; >> >> - chan0 { >> + chan@0 { >> + reg = <0>; >> chan-name = "d1"; >> led-cur = /bits/ 8 <0x14>; >> max-cur = /bits/ 8 <0x20>; >> }; >> >> - chan1 { >> + chan@1 { >> + reg = <1>; >> chan-name = "d2"; >> led-cur = /bits/ 8 <0x14>; >> max-cur = /bits/ 8 <0x20>; >> }; >> >> - chan2 { >> + chan@2 { >> + reg = <2>; >> chan-name = "d3"; >> led-cur = /bits/ 8 <0x14>; >> max-cur = /bits/ 8 <0x20>; >> }; >> >> - chan3 { >> + chan@3 { >> + reg = <3>; >> chan-name = "d4"; >> led-cur = /bits/ 8 <0x14>; >> max-cur = /bits/ 8 <0x20>; >> }; >> >> - chan4 { >> + chan@4 { >> + reg = <4>; >> chan-name = "d5"; >> led-cur = /bits/ 8 <0x14>; >> max-cur = /bits/ 8 <0x20>; >> }; >> >> - chan5 { >> + chan@5 { >> + reg = <5>; >> chan-name = "d6"; >> led-cur = /bits/ 8 <0x14>; >> max-cur = /bits/ 8 <0x20>; >> }; >> >> - chan6 { >> + chan@6 { >> + reg = <6>; >> chan-name = "d7"; >> led-cur = /bits/ 8 <0x14>; >> max-cur = /bits/ 8 <0x20>; >> }; >> >> - chan7 { >> + chan@7 { >> + reg = <7>; >> chan-name = "d8"; >> led-cur = /bits/ 8 <0x14>; >> max-cur = /bits/ 8 <0x20>; >> }; >> >> - chan8 { >> + chan@8 { >> + reg = <8>; >> chan-name = "d9"; >> led-cur = /bits/ 8 <0x14>; >> max-cur = /bits/ 8 <0x20>; >> @@ -133,29 +163,35 @@ example 3) LP5562 >> 4 channels are defined. >> >> lp5562@30 { > s/lp5562/led-controller/ > >> + #address-cells = <1>; >> + #size-cells = <0>; >> compatible = "ti,lp5562"; >> reg = <0x30>; >> clock-mode = /bits/8 <2>; >> >> - chan0 { >> + chan@0 { >> + reg = <0>; >> chan-name = "R"; >> led-cur = /bits/ 8 <0x20>; >> max-cur = /bits/ 8 <0x60>; >> }; >> >> - chan1 { >> + chan@1 { >> + reg = <1>; >> chan-name = "G"; >> led-cur = /bits/ 8 <0x20>; >> max-cur = /bits/ 8 <0x60>; >> }; >> >> - chan2 { >> + chan@2 { >> + reg = <2>; >> chan-name = "B"; >> led-cur = /bits/ 8 <0x20>; >> max-cur = /bits/ 8 <0x60>; >> }; >> >> - chan3 { >> + chan@3 { >> + reg = <3>; >> chan-name = "W"; >> led-cur = /bits/ 8 <0x20>; >> max-cur = /bits/ 8 <0x60>; >> @@ -167,62 +203,125 @@ example 4) LP8501 >> Others are same as LP5523. >> >> lp8501@32 { > s/lp8501/led-controller/ > >> + #address-cells = <1>; >> + #size-cells = <0>; >> compatible = "ti,lp8501"; >> reg = <0x32>; >> clock-mode = /bits/ 8 <2>; >> pwr-sel = /bits/ 8 <3>; /* D1~9 connected to VOUT */ >> >> - chan0 { >> + chan@0 { >> + reg = <0>; >> chan-name = "d1"; >> led-cur = /bits/ 8 <0x14>; >> max-cur = /bits/ 8 <0x20>; >> }; >> >> - chan1 { >> + chan@1 { >> + reg = <1>; >> chan-name = "d2"; >> led-cur = /bits/ 8 <0x14>; >> max-cur = /bits/ 8 <0x20>; >> }; >> >> - chan2 { >> + chan@2 { >> + reg = <2>; >> chan-name = "d3"; >> led-cur = /bits/ 8 <0x14>; >> max-cur = /bits/ 8 <0x20>; >> }; >> >> - chan3 { >> + chan@3 { >> + reg = <3>; >> chan-name = "d4"; >> led-cur = /bits/ 8 <0x14>; >> max-cur = /bits/ 8 <0x20>; >> }; >> >> - chan4 { >> + chan@4 { >> + reg = <4>; >> chan-name = "d5"; >> led-cur = /bits/ 8 <0x14>; >> max-cur = /bits/ 8 <0x20>; >> }; >> >> - chan5 { >> + chan@5 { >> + reg = <5>; >> chan-name = "d6"; >> led-cur = /bits/ 8 <0x14>; >> max-cur = /bits/ 8 <0x20>; >> }; >> >> - chan6 { >> + chan@6 { >> + reg = <6>; >> chan-name = "d7"; >> led-cur = /bits/ 8 <0x14>; >> max-cur = /bits/ 8 <0x20>; >> }; >> >> - chan7 { >> + chan@7 { >> + reg = <7>; >> chan-name = "d8"; >> led-cur = /bits/ 8 <0x14>; >> max-cur = /bits/ 8 <0x20>; >> }; >> >> - chan8 { >> + chan@8 { >> + reg = <8>; >> chan-name = "d9"; >> led-cur = /bits/ 8 <0x14>; >> max-cur = /bits/ 8 <0x20>; >> }; >> }; >> + >> +Multicolor Framework Support >> +In addition to the nodes and properties defined above for device support the >> +properties below are needed for multicolor framework support as defined in >> +Documentation/devicetree/bindings/leds/leds-class-multicolor.txt >> + >> +Required child properties for multicolor framework >> + - color : Must be LED_COLOR_ID_MULTI >> + - function : see Documentation/devicetree/bindings/leds/common.txt >> + >> +Required grandchildren properties >> + - reg : This is the LED output of the device >> + - color : see Documentation/devicetree/bindings/leds/common.txt >> + >> +Multicolor LED example: >> +lp5523: lp5523@32 { > Do you really need "lp5523:" node label ? > > Besides: > > s/lp5523@32/led-controller@32/ This change I will make since I added this. Dan