Received: by 2002:a25:5b86:0:0:0:0:0 with SMTP id p128csp869351ybb; Thu, 28 Mar 2019 13:57:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqylBQp4wH7fTg2yJGqxei5oveH9rY4RQ7zOOAviwNR8ruG+KzRli9fE4HGXEqbBlHRJF7lY X-Received: by 2002:a62:3244:: with SMTP id y65mr11874940pfy.255.1553806637189; Thu, 28 Mar 2019 13:57:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553806637; cv=none; d=google.com; s=arc-20160816; b=uu9oH3RZFqQRfungfQy+hLk1lPVasklKCK+VXIvS++KhmrJ8FKDFcZsuTJd9E8M4yl HEFoJZznmhB6puwx1jKYH54KA0m8OXwV3qosjK+aEtsrk0o2QvakmCCeh1vRuHi4mU8R hACcP+7UVTMf9gq0bH4TuuP71J2TfMtAw60mAI44fxnrMfU6N+skUK4GvCxzefy1lnZn eTbGNf+D1IfZjFzIYbr3DUNdb584OCiY4ByXzaKYHBYwPsz0NCOkh1125p3NWdL2Vq/Y rpKCWhZVS7aS2P7Eh7ViL4tpyY7fsnQZx7tOdOYVRnSiRgHwRlPsmsZlt4Dh2v98zqX3 5Qew== 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=jr4NPlCQ0dB7/OxX6a3n/TlV+U+V8P/4RfcjP08szW8=; b=tsZrhH2EyaKM4IyxY/mWik/MHbj1/TjxHGb0jVLSfHoZAWDyZsfqrfKfhE3K7nSKSo Jci47lV2ZoatksBbT5cShxIb0vugYhNhlIKPKQ/AfcPJ2LYls3HhpzJumBzYdC+Ee08/ IJXlQNNZpVMcyDBVeFtHPUqJUh8azc1uEJAkSWn4BWEAj8q4xaPLJ5HXaF1OGL6kXU8p TxVRHlNBO6g3vXepcVS4jH+yDecZO6ks1qK7DziNdGAM45oEXgnvHcfQQqJr0pEcLVnH 9cl3Ct9VcE0kJYXL3O94hqp33RCfZ/wl+2ddvC1DPgLlM7E6iuRAVOJVmkkKlIGcn6OB nm9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Xw3yv7uo; 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 i24si87848pgh.434.2019.03.28.13.56.52; Thu, 28 Mar 2019 13:57:17 -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=@gmail.com header.s=20161025 header.b=Xw3yv7uo; 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 S1727559AbfC1Uyy (ORCPT + 99 others); Thu, 28 Mar 2019 16:54:54 -0400 Received: from mail-lj1-f193.google.com ([209.85.208.193]:44851 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726290AbfC1Uyy (ORCPT ); Thu, 28 Mar 2019 16:54:54 -0400 Received: by mail-lj1-f193.google.com with SMTP id h16so48875ljg.11; Thu, 28 Mar 2019 13:54:52 -0700 (PDT) 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=jr4NPlCQ0dB7/OxX6a3n/TlV+U+V8P/4RfcjP08szW8=; b=Xw3yv7uoqE2kfIpS42NQRb9iPhzTgx9LF26YLrsJvbkT+nykqNqkHJfLrvK4qhGu/r W1xgbsIE8VR476/L4wrngMkBFPiD7VQqdZHpzKhR6PxTwxhlJ9hvktdXNx1q9P/dh89u 5tWY9vja2O6WYj11Nvq24ArDg1PZZ9owfeSbE0+r6BrzcQFG3gP6XCRNMhfIRfJGvy50 MBdyBfNEFYOLSF4wPPk93+YMe6z2RWhzcbM0y7QRtR8wK6xisx4SA+t2Y1t1gZGbwWXc cHb52telouoPS1FMerYT949HzukbHYn/fghUoumQoqI8p2WG26aXCrhWoLtp5F6bIW+J Uyiw== 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=jr4NPlCQ0dB7/OxX6a3n/TlV+U+V8P/4RfcjP08szW8=; b=r6rLKU2BY4kAc7XrQSs/dIfgrU0Tq0xp2oevwYMXVwRvWyslUCDukBijBqsf0KPGld 5t51pW/jeqH2iEiRu8J5XMbrgLsFd5fbSVPx1fZS+XBdsp//E/0f5qZOlmymeWHe6I1a z+juFKCzT5qm6qnYE5I7rmFrwBFknAHTyqVEV5zs65oRusieW7qNvxjaz10fn77tfi16 M+akmaFM1JDZEIqTMVL7ftva0vhTYMWkQnpjAXR+Gso4zC5JDVDU9vStW0g5hgL2o2tY bwvqGbqSlj9bXOIFWf77hFBWeDh7ViGCU5c8IjH9Uca/5V9xXQDs0LLQqtAMk00WmtG0 S98A== X-Gm-Message-State: APjAAAWBt7n9KTTc4juPj7W4ZTHMArfKPlUXpuspBKevR8kjcGw5WK3c sJaFx3Ftqv8yUPX5BJ3+H08= X-Received: by 2002:a2e:9a49:: with SMTP id k9mr24909058ljj.84.1553806492050; Thu, 28 Mar 2019 13:54:52 -0700 (PDT) Received: from [192.168.1.19] (blb244.neoplus.adsl.tpnet.pl. [83.28.195.244]) by smtp.gmail.com with ESMTPSA id 77sm27532ljc.69.2019.03.28.13.54.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Mar 2019 13:54:51 -0700 (PDT) Subject: Re: [PATCH v2 00/25] Add generic support for composing LED class device name To: Rob Herring Cc: linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, pavel@ucw.cz References: <20190310182836.20841-1-jacek.anaszewski@gmail.com> <20190328001930.GA22901@bogus> From: Jacek Anaszewski Message-ID: <46cf838b-ae41-4c0e-ba73-9a55b0ca03c0@gmail.com> Date: Thu, 28 Mar 2019 21:54:49 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: <20190328001930.GA22901@bogus> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/28/19 1:19 AM, Rob Herring wrote: > On Sun, Mar 10, 2019 at 07:28:11PM +0100, Jacek Anaszewski wrote: >> Changes from v1: >> >> - improved led_parse_properties() to parse label property at first >> and return immediately after parsing succeeds >> - added tool get_led_device_info.sh for retrieving LED class device's >> parent device related information >> - extended LED naming section of Documentation/leds/leds-class.txt >> - adjusted the list of LED_FUNCTION definitions according to the v1 review >> remarks >> - added standard LED_COLOR_NAME definitions >> - removed functions.h and moved both LED_FUNCTION and LED_COLOR_NAME >> definitions to include/dt-bindings/common.h >> - rebased leds-as3645a changes on top of the patch switching to fwnode >> property API >> - updated DT bindings to use new LED_COLOR_NAME definitions >> - improved common LED bindings to not use address unit for sub-nodes >> without reg property >> >> Generally I still insist on deprecating label property and devicename >> section of LED name. The tool I added for obtaining LED device name >> proves availability of the related information in other places in >> the sysfs. Other discussed use cases are covered in the updated >> Documentation/leds/leds-class.txt. >> >> Beside that, I tried also to create macros for automatic composition >> of "-N" suffixed LED functions, so that it would not be necessary >> to pollute common.h with plenty repetitions of the same function, >> differing only with the postfix. Unfortunately, the preprocessor >> of the dtc compiler seems not to accept string concatenetation. >> I.e. it is not possible to to the following assighment: >> >> function = "hdd""-1" >> >> If anyone knows how to obviate this shortocoming please let me know. > > Raise the question on devicetree-compiler list. I've done my share of > dtc patches, but the parsing side is generally not an area I touch. I'll probably come up with additional property function-enumerator. -- Best regards, Jacek Anaszewski