Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1330698rwb; Thu, 1 Dec 2022 16:03:31 -0800 (PST) X-Google-Smtp-Source: AA0mqf4flvF1FP4CvFkr5iJHZbtrYtImZpzDicwKeiXKWCIYa4BDWBAlFUGLLHQ7nWOnlLK8qGBd X-Received: by 2002:a17:906:fcac:b0:7ba:a9cb:8643 with SMTP id qw12-20020a170906fcac00b007baa9cb8643mr33996789ejb.298.1669939410871; Thu, 01 Dec 2022 16:03:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669939410; cv=none; d=google.com; s=arc-20160816; b=a486W8kb7S3bO+LzOhKUyLG5Acf2k/I87/tKBkrQ/r0cxn9DxM5jKr7oTIjLCzCJdG +G9kPAh35No8eBtHayPg4dml5UOlZrYezYXfygF6BpUEMUuTVi3nouFwZcmSEb+xv1/B YU2/J/l3j+drznn6j3oDpvzQMVyiw1F7jcfXTx+atb6bUbF7Taq93wgjjKS9Dk9binLV B/vBvWuNMlFCnxzkfU6fnEqc2wdUkRNi9Hj9Mu+fqbM//3rRTZPkTKpE0mO93XPYuqVM LgCQMgjpMiLimSouiScvZZZOe5WTujzme6OraaQHZd9G/QDe2oE9IXdDwJp5izVop+nc QT4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=tVAl2PUlhRY2y4+Skseue/tW4aAWv4TLrxfM05T5iMw=; b=bJVUDexy4lXbrKP+fZFovHyVYdFNE19nF/liz0sxUtaydGGOdAapxFrGdpOOxoUpW0 /aECq5HwWVRzEPHs66A8xWSesKw6Qf/RWGKj4q8UXAt7v2Qkul733uTf+JwZZRF20KdH WLVD4IAsjUZhjyaNEG6hj0AslJrCfqSY0lYvgYWc2/aG+sVUhL/RskiMryk2D5u8DWMh qWKjgtCcdor+b53aJiTCdi3YmxntiqRDkse1KkEwaDNoLYKVIAkrBLRO9VbDLO040bwU hk2EJJHH2eAfzwhdj3m8TU3q4FnvpsSb1p2On6+qRI2o79+0VFfWSdhtho1pSZ+1nnI5 y7Ow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@denx.de header.s=phobos-20191101 header.b=SXrfF3zm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ne42-20020a1709077baa00b007807e1f3d9dsi4672941ejc.842.2022.12.01.16.03.11; Thu, 01 Dec 2022 16:03:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@denx.de header.s=phobos-20191101 header.b=SXrfF3zm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231946AbiLAXpI (ORCPT + 81 others); Thu, 1 Dec 2022 18:45:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50454 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231308AbiLAXpG (ORCPT ); Thu, 1 Dec 2022 18:45:06 -0500 Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C96F7BE6AE; Thu, 1 Dec 2022 15:45:04 -0800 (PST) Received: from [127.0.0.1] (p578adb1c.dip0.t-ipconnect.de [87.138.219.28]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 589FC84225; Fri, 2 Dec 2022 00:45:01 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1669938302; bh=tVAl2PUlhRY2y4+Skseue/tW4aAWv4TLrxfM05T5iMw=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=SXrfF3zm+8KNwwJqNthoMBvIJSRyAakH1WIH34/TPREIWZnazEI1c7qqH8QgI3fC3 C0Bde4vtUUOCxo0cZRIq9yFBrLXqp69olbZE1DwffNLa5hB1U66N2f4lxfFbHj/Aut WZjUKD+8/Lq9JmoQC1h+mqxeVI2+BGDzey7EHvwSusOOKYDl3sAaoaUotaUC/39BoU NjER95d29KOx5ICkGBfHwb4XWCk3k/d3OxTWNuLR80vawknQ4OGlM0GdASCy6XcYgY dESBVnpiKSe/19hcfnpdS+iW6aSEBHHoDW16qHlDyhxvELI+revZU40zDILVN58YgQ Q5pCevsko/LKw== Message-ID: <4043d693-7739-4709-8551-9f476031db70@denx.de> Date: Fri, 2 Dec 2022 00:41:46 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: Re: [PATCH] dt-bindings: leds: Mark label property as deprecated Content-Language: en-US To: Rob Herring Cc: Pavel Machek , Christoph Niedermaier , linux-kernel@vger.kernel.org, Krzysztof Kozlowski , Jacek Anaszewski , kernel@dh-electronics.com, linux-leds@vger.kernel.org, devicetree@vger.kernel.org References: <20221122111124.6828-1-cniedermaier@dh-electronics.com> <3f4c89a3-8955-ce41-ac2a-cee9b0ed5210@denx.de> <20221130191905.GA2631320-robh@kernel.org> From: Marek Vasut In-Reply-To: <20221130191905.GA2631320-robh@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/30/22 20:19, Rob Herring wrote: > On Fri, Nov 25, 2022 at 10:26:30PM +0100, Marek Vasut wrote: >> On 11/22/22 13:23, Pavel Machek wrote: >>> Hi! >> >> Hi, >> >>>> Mark the label property as deprecated as it is mentioned >>>> in the description. >>> >>> Lets do it the other way around. Functions (etc) don't really provide >>> good enough description of LED, and label is still needed. >> >> Can you please provide a clear explanation which property or approach is the >> correct one for new DTs ? >> >> So far, the documentation states that "label" is deprecated, and users >> should replace it with "function" and "color". > > 'function' is what activity/operation the LED is associated with. It is > a fixed set of strings which s/w may use. It is a replacement for > 'linux,default-trigger'. Isn't this 'function' more of a standardized replacement for 'label' ? $ git grep LED_FUNCTION_ include/ ... include/dt-bindings/leds/common.h:#define LED_FUNCTION_PLAYER5 "player-5" include/dt-bindings/leds/common.h:#define LED_FUNCTION_ACTIVITY "activity" include/dt-bindings/leds/common.h:#define LED_FUNCTION_ALARM "alarm" include/dt-bindings/leds/common.h:#define LED_FUNCTION_BACKLIGHT "backlight" include/dt-bindings/leds/common.h:#define LED_FUNCTION_BLUETOOTH "bluetooth" include/dt-bindings/leds/common.h:#define LED_FUNCTION_BOOT "boot" ... Seems to me that ^ is closer to a "standardized" form of 'label' . The LED subsystem does not infer any behavior of those LEDs based on their 'function' property as far as I can tell, at least not in the way 'linux,default-trigger' behaves. > 'label' is what is printed next to the LED for a human to read. 'label' > can be anything and the OS shouldn't care what it is. This part I understand. What is not clear to me is, why is 'label' being un-deprecated. We newly have 'function', 'function-enumerator' and 'color' DT properties for LEDs, which seem to be standardized forms of describing what the LED is used for, which LED it is (if there are multiple), and color of that LED. This was previously described in the 'label' property, usually in free form of e.g. "beaglebone:green:usr2" . > They serve 2 different purposes. [...]