Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4250364imu; Mon, 12 Nov 2018 08:05:56 -0800 (PST) X-Google-Smtp-Source: AJdET5c7zl9jiFCW6af1qxOMwjhEqwDzYX3uRyU+IVeURbpmAhjHitdqsMRVRVqlOgSVV/ghPKUE X-Received: by 2002:a62:1709:: with SMTP id 9mr190843pfx.249.1542038756114; Mon, 12 Nov 2018 08:05:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542038756; cv=none; d=google.com; s=arc-20160816; b=y74ikkgul9MKj8nDcEZ8n+PsEXNnuk320aG94EW6x9b0cIzZZ9+RUlSgfdbHqncw4k yhsgEWkocDOtn7t4NCHQMobYlw32cLIA5dx4pzeMCe8IimkLe5CMzbFirUzNxC9uczx6 T7lGWbFagyY06jg1BmuKPcbART+Rwbj6qsw6wRtqcyDa1rktBSTb+a1aX+VLTg/wQG4P xXYyD4Nirz9ovHu2QcbhWpDSyYKsk2ggZ9spKGHeBLNAkcBLqlDEuOfG+3EkxFG3dhVv jQ0YOpZ+jm/C/B8pZIRaRSlrJ86tSvKZ0JADweVBRSZE5RftNupPjY/hQLL+QWHtc/Tr 9Kwg== 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=ljUbpmfyasg70hjS9I9lQMW6bYKyulqTR3mNIXswgGo=; b=Cjpug3DCCtPlA4lrpWu92cVp/x2wqBrhqY0MGk7hROK/jKuD8Cq4QqjXnJMXp4I/ns fVGgL+wDKU4URILikxlyGW85T0J5hB+3ZKJ4JBgGnQh+6mBoWxhrvkU0V/vtKiOlWWQ2 VKSJDZJ+orvYbUOc2jeUXgQCYB52JGJu4KwbpEoeyCb1ylfpnEo1zMCJYVqCUO3NUdn8 Jsaeo0Nhay0lcJvb+OE/Svpf5yn5D2lx/UUbnYswED+AHXQ6kCISVPhoMjrQi0aCmago CNQ9yfCeri2UYf5T7NaUPAzEbdeS/wJ6xqL9sYaOuycyXxj0R1T6cEfP13eXN6hjE7Ky /E8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=cx9ClFYS; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v14-v6si17391022pgt.78.2018.11.12.08.05.00; Mon, 12 Nov 2018 08:05:56 -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=@gmail.com header.s=20161025 header.b=cx9ClFYS; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729685AbeKMBzU (ORCPT + 99 others); Mon, 12 Nov 2018 20:55:20 -0500 Received: from mail-lj1-f181.google.com ([209.85.208.181]:38398 "EHLO mail-lj1-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729601AbeKMBzT (ORCPT ); Mon, 12 Nov 2018 20:55:19 -0500 Received: by mail-lj1-f181.google.com with SMTP id q186-v6so8079846ljb.5; Mon, 12 Nov 2018 08:01:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=ljUbpmfyasg70hjS9I9lQMW6bYKyulqTR3mNIXswgGo=; b=cx9ClFYSthTnwddNDWasdwdsxE73bQZep4WLqYSpeFo7Peu2FAIK5eNZhgELVxlP/C h+rRzxecz9KdLDTAqukjEHtkTNQTPpYAqN8HVwZOdDTwRI9f4P4G+wWi+9+iWTxuTenh 5t1wRxTURmSltmpwRa9MkaDPTVkZq6wkscYY9yAAmwL3+BgyXwl6Fh1bBIhM4aiJ2UiR /8iB/92tST9pRwG70M7A3zcgHMUBwTmlloL2hKOU+5v/HACdC1tm/jZxtTf4R566krPl xj3VQhJpNHOsntcp9UlMv3rQbgj6uJVS5wD9On4zMCkq09GWMcRhvnE1zAmcXO5PusRi x0Tw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=ljUbpmfyasg70hjS9I9lQMW6bYKyulqTR3mNIXswgGo=; b=NLkWxJkFtlQE+3x/QKkCv/3u9SNr519T1KuA/HmgHTRWZRhOXtZTbt5D8LV84bIFNG nftltUHHY7t16ecF2eeYLUvjgqkem9B3eFbnRQmDAMUYlxDZWOsCR869y8iYgx5wLYQz LP4TwYJQRN1mwfDfEzy5KaEXZBZFLQFPcEUpKjPClY8YRXRxJNWDeL5aLDMO7+GxL6wO SToUC08ngUnMpFGSiw+xGNUcKrtyurEMZ/CNtUFd0XiBVwt7V7gysHcxYLHLgoBMdf4+ OCWzWsuU9mKvlURPphIr6IKQ13DWE2+/6b4kpnl4tpRoLmuG9VlA5Z04MhjlKK5xPb/H FDew== X-Gm-Message-State: AGRZ1gKyXaB9KnD7CXzY7c+mThGrB15Npu2Umuh3dYcsKwNWUpYmUb7I STVSHTeZZJJfwkeO9eTe59g= X-Received: by 2002:a2e:5b1d:: with SMTP id p29-v6mr1049361ljb.176.1542038486727; Mon, 12 Nov 2018 08:01:26 -0800 (PST) Received: from [192.168.1.18] (bgt69.neoplus.adsl.tpnet.pl. [83.28.83.69]) by smtp.gmail.com with ESMTPSA id l3-v6sm3138634ljg.21.2018.11.12.08.01.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Nov 2018 08:01:25 -0800 (PST) Subject: Re: [PATCH 03/24] leds: dt-bindings: Add LED_FUNCTION definitions To: =?UTF-8?B?VmVzYSBKw6TDpHNrZWzDpGluZW4=?= , linux-leds@vger.kernel.org Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, pavel@ucw.cz, robh@kernel.org, Baolin Wang , Daniel Mack , Dan Murphy , Linus Walleij , Oleh Kravchenko , Sakari Ailus , Simon Shields , Xiaotong Lu References: <1541542052-10081-1-git-send-email-jacek.anaszewski@gmail.com> <1541542052-10081-4-git-send-email-jacek.anaszewski@gmail.com> From: Jacek Anaszewski Message-ID: <81853cb3-2a0a-1685-14b9-d5e02b3f5843@gmail.com> Date: Mon, 12 Nov 2018 17:01:23 +0100 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: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Vesa, On 11/12/2018 01:25 AM, Vesa Jääskeläinen wrote: > Hi Jacek, > > On 07/11/2018 0.07, Jacek Anaszewski wrote: >> Add common LED function definitions for use in Device Tree. >> The function names were extracted from existing dts files >> after eliminating oddities. > > Is your intent here is to standardize the function definitions and to > aid in that is to specify list of string defines? The calls for LED names standardization emerged some time go, and this is just a submission of the subject for a discussion. > Without a meaning what all of those mean it does complete the original > goal. > > In your list there are many things that could easily have multiple > meanings for different audiences. > > Some examples: > > #define LED_FUNCTION_2G "2g" > - Does this mean that 2 metric grams has been detected in scale or > cellular 2G connectivity? Most probably the latter. Should we have the generic macro for it is another question. Actually I found it in the leds-tlc591xx.txt bindings. There are also "wlan_2g" occurrences in the armada385-linksys* dts files. > #define LED_FUNCTION_ALL "all" > - This doesn't ring a bell to me what it could be in reality. All leds > on doesn't sound right. Yeah, I must admit I didn't spend too much time assessing how much all of them make sense. I just wanted we had more complete picture of what functions are pre-existing in the bindings and dts files. > #define LED_FUNCTION_AUX "aux" > - There can be many things aux and multiple aux things in one device. > > #define LED_FUNCTION_HD "hd" > - Is there a high definition video playing? Or audio? Or harddisk > failure led? > > You have already come up with long list of items. I am just wondering > what is the logic in order to get to "common" list? > > Can you just add custom items in device tree without being in the list? > > Would it be better to start with a short simple list with meanings > defined properly? This seems to be the most reasonable approach. My first thought was to provide function definitions for as many as possible from the pre-existing ones, but it is not making too much sense as it tunes out. > When do you then remove entries from the list? Let's say 3G networks are > currently getting turned off world wide which kinda deprecates the term > from definitions and probably should be then removed from the list (if > it would be there). > > Is there planned to be some auto connection from function to some other > automated functionality? One proposition was to register the LED for a trigger events basing on the function name, like e.g "heartbeat". > Or why wouldn't the label keyword be enough as > it seems to be exactly the same thing? (without the common list -- which > could be implemented for label too if seen as a good thing) LED_FUNCTION definitions are not meant to be limited for use only with color:name scheme, if that's what you had on mind. -- Best regards, Jacek Anaszewski