Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp414711imu; Thu, 8 Nov 2018 10:01:15 -0800 (PST) X-Google-Smtp-Source: AJdET5cLYbolQ0iPslpNPca9tliNeTZpvVY8rtUr+3zRqngggfYfRVA3z87Tz52fHGfpkW0rPNFh X-Received: by 2002:a62:fc52:: with SMTP id e79-v6mr5398633pfh.167.1541700075252; Thu, 08 Nov 2018 10:01:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541700075; cv=none; d=google.com; s=arc-20160816; b=NBawTPnEDEASoa75BaR/NyKcoKHYcDw2YDiYng9LmU5Ki9hOzx44RVp0dLFuZ/4WSm P+ovhukwbbtJyyQwsnqaTDz5novRWPJiGVzxAFS6TQigVOmWPK+oJOEpa8y78Onvi0xl nWZYlhHcVceUQYigis6Wjoj4GSVDud20rAVCQ11wD2xj7wVW9n+5x6BpqFiM8GuFiawB fEz39E/OHVloO9QQaa+njg1nUh7spE2xPOcHOBDswI5u5L+reXY6YvIZS4u8lAeGKvjy Kb7koIppagUo0ZdJSpAKVLsogD1uL+RB3Irl23rMRegkWnVSW1Xoq5oZjYTM01BgYjQJ 8/kA== 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=nGkUEE3U00RiOrTXp61Xn/QktaC1mM2VBZMKG4OkLGM=; b=KNVOydYb7J7/TdZKO1dHkn30UTtVo5VGrGuUq9NeJE7cGd4qRsO7tghYUr+872MdOM gQSf67INYtrbrn2edi7YzbXXDlDWCQNEvJR7ctbNEKFphPmRFs0qV3hTZYenCfOXzQUw evyJLPKHdUZHTnLv3R2UH/10OjT2KYEydFUSz9pEj1n29oLzxxCfQqyaEPQ57MmJE+CV QQ8zBGWhrdFvgW4ttNCMjRo1r38jFRPO6Di/EmRfNYRPiSJB4lhglTWgk0oXwqA+S0gV 1z2N1tYltEKhS2OE0jk8CxRowrXkNKUd+w0LOF4akEmZ/HPhSB1526TvHYEW5l+F9yvV RN2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=okSIkPap; 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 o22-v6si4827223pfk.50.2018.11.08.10.00.59; Thu, 08 Nov 2018 10:01:15 -0800 (PST) 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=okSIkPap; 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 S1727082AbeKIDhJ (ORCPT + 99 others); Thu, 8 Nov 2018 22:37:09 -0500 Received: from lelv0143.ext.ti.com ([198.47.23.248]:52068 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726634AbeKIDhI (ORCPT ); Thu, 8 Nov 2018 22:37:08 -0500 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id wA8I0GKO045668; Thu, 8 Nov 2018 12:00:16 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1541700016; bh=nGkUEE3U00RiOrTXp61Xn/QktaC1mM2VBZMKG4OkLGM=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=okSIkPap0Jr+5xZ1I4olnAjGa5/MMWFQ392ll6nqKangYeO5TzSiPsUxbtAR99ZKA OMJQedCAFKSAu13+cuJqRHX0SW19Veqx9hzI4RXvibYEroQJE5d6jYIZzJFC1IugzE /uRsBW0lF0ufc3LKMLZSR3yPVu3V9hM0tdyUVXUk= Received: from DLEE103.ent.ti.com (dlee103.ent.ti.com [157.170.170.33]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id wA8I0Gwj049475 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 8 Nov 2018 12:00:16 -0600 Received: from DLEE107.ent.ti.com (157.170.170.37) by DLEE103.ent.ti.com (157.170.170.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Thu, 8 Nov 2018 12:00:16 -0600 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE107.ent.ti.com (157.170.170.37) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1466.3 via Frontend Transport; Thu, 8 Nov 2018 12:00:16 -0600 Received: from [172.22.151.38] (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id wA8I0F5T015320; Thu, 8 Nov 2018 12:00:15 -0600 Subject: Re: [PATCH 04/24] dt-bindings: leds: Add function and color properties To: Jacek Anaszewski , CC: , , , , Baolin Wang , Daniel Mack , Linus Walleij , Oleh Kravchenko , Sakari Ailus , Simon Shields , Xiaotong Lu References: <1541542052-10081-1-git-send-email-jacek.anaszewski@gmail.com> <1541542052-10081-5-git-send-email-jacek.anaszewski@gmail.com> From: Dan Murphy Message-ID: <26714494-06f8-163d-1ef8-75f75c25a467@ti.com> Date: Thu, 8 Nov 2018 12:00:15 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <1541542052-10081-5-git-send-email-jacek.anaszewski@gmail.com> 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 Jacek On 11/06/2018 04:07 PM, Jacek Anaszewski wrote: > Introduce dedicated properties for conveying information about > LED function and color. Mark old "label" property as deprecated. > > Signed-off-by: Jacek Anaszewski > Cc: Baolin Wang > Cc: Daniel Mack > Cc: Dan Murphy > Cc: Linus Walleij > Cc: Oleh Kravchenko > Cc: Sakari Ailus > Cc: Simon Shields > Cc: Xiaotong Lu > --- > Documentation/devicetree/bindings/leds/common.txt | 52 +++++++++++++++++++---- > 1 file changed, 44 insertions(+), 8 deletions(-) > > diff --git a/Documentation/devicetree/bindings/leds/common.txt b/Documentation/devicetree/bindings/leds/common.txt > index aa13998..3efc826 100644 > --- a/Documentation/devicetree/bindings/leds/common.txt > +++ b/Documentation/devicetree/bindings/leds/common.txt > @@ -10,14 +10,20 @@ can influence the way of the LED device initialization, the LED components > have to be tightly coupled with the LED device binding. They are represented > by child nodes of the parent LED device binding. > > + > Optional properties for child nodes: > - led-sources : List of device current outputs the LED is connected to. The > outputs are identified by the numbers that must be defined > in the LED device binding documentation. > +- function: LED functon. Use one of the LED_FUNCTION_* prefixed definitions > + from the header include/dt-bindings/leds/functions.h. > + If there is no matching LED_FUNCTION available, add a new one. > +- color : Color of the LED. Should we define the colors too? There are only really 4. Red, green, blue and white. Generally varying colors are created base on the primary colors. Even the amber color Dan > - label : 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. > + label. This property is deprecated - use 'function' and 'color' > + properties instead. > > - default-state : The initial state of the LED. Valid values are "on", "off", > and "keep". If the LED is already on or off and the default-state property is > @@ -87,29 +93,59 @@ Required properties for trigger source: > > * Examples > > -gpio-leds { > +#include > + > +led-controller@0 { > compatible = "gpio-leds"; > > - system-status { > - label = "Status"; > + led0 { > + function = LED_FUNCTION_STATUS; > linux,default-trigger = "heartbeat"; > gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>; > }; > > - usb { > + led1 { > + function = LED_FUNCTION_USB; > gpios = <&gpio0 1 GPIO_ACTIVE_HIGH>; > trigger-sources = <&ohci_port1>, <&ehci_port1>; > }; > }; > > -max77693-led { > +led-controller@0 { > compatible = "maxim,max77693-led"; > > - camera-flash { > - label = "Flash"; > + led { > + function = LED_FUNCTION_FLASH; > + color = "white"; > led-sources = <0>, <1>; > led-max-microamp = <50000>; > flash-max-microamp = <320000>; > flash-max-timeout-us = <500000>; > }; > }; > + > +led-controller@68 { > + compatible = "ti,tlc59116"; > + reg = <0x68>; > + #address-cells = <1>; > + #size-cells = <0>; > + > + led@0 { > + function = LED_FUNCTION_WAN; > + color = "amber"; > + reg = <0x0>; > + }; > + > + led@2 { > + function = LED_FUNCTION_2G; > + color = "white"; > + reg = <0x2>; > + }; > + > + led@9 { > + function = LED_FUNCTION_ALIVE; > + color = "green"; > + reg = <0x9>; > + linux,default_trigger = "heartbeat"; > + }; > +}; > -- ------------------ Dan Murphy