Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1875627imu; Wed, 12 Dec 2018 05:57:48 -0800 (PST) X-Google-Smtp-Source: AFSGD/Wv5k20P1VsYgkULd8DFoj3bdRuJOEFHVYOYU0vlFOBukvfQz43SmN/94MEu9z1UTFBQ/oU X-Received: by 2002:a62:1a44:: with SMTP id a65mr20705080pfa.30.1544623068830; Wed, 12 Dec 2018 05:57:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544623068; cv=none; d=google.com; s=arc-20160816; b=T5r9TpuJ/iiMDvQAauHzX3kfB28A8hXQ4MUhlFPV2R3shNznq2ukYjdo5aGuCfcn+F tpbxSkFtUBJ7AwCIU4ppmnJYocd0wDpgk2tSA9HMT2CvgBN7sF5igGUgv1khZRj6p9Xg vIamjVfeU03EzZ2u8/piRNmwpvOKdIli3S8M6WbkZczksn9pZjH0LEsu8A/PTcfp2lBD kszXMJXJUy9xv0NjzaShGtlEXRxRkt/WJWI1btNK4JPvObLzyIt5bRVvwvDSY1Y+bTeB WcNcd0Z3F+pmaM0JdRqErzep5irAnm8Wt4gMiVBtS632MzA+rW5l1dfSSonQhR96VDwc MjAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=//1nqrMUjcCAcBQHfchzAcMhbraUTR2KryKaV0Onzv4=; b=R4UWi1aQI3nbAuFSl0O2oZRR6jEp4C7tvSHMFqJqPcJzqlQZKsPzcGfBfoAHfPCnxu c9XBjwHATVie4JrEa9xqrpI8ZumcdK4riIkqD4An3krwsI2uE6ddXM86uvdTO/H1LQBd RD5azXpOjCWLB/d4rsnmqTxFQPRPR53/54TuaSbRdcoudyFmL0amfNHZnwpJ8I941jIt nu19dDnm68asy1RdG9zAhB7Q9qyxMLnkAur+j5ybS/rWX0D2lvhHRjslpbmhxG38Ergh g45q+kNZZrtHlvb7k0qaEbmm+PYmxfQPYMP/Vjfg48d+Nz6aiS9zPBFZc2frsSA5+kRQ Cocw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=VK+qGnJ8; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h3si15186232pgi.391.2018.12.12.05.57.34; Wed, 12 Dec 2018 05:57:48 -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=@kernel.org header.s=default header.b=VK+qGnJ8; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727667AbeLLN4e (ORCPT + 99 others); Wed, 12 Dec 2018 08:56:34 -0500 Received: from mail.kernel.org ([198.145.29.99]:37510 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726232AbeLLN4e (ORCPT ); Wed, 12 Dec 2018 08:56:34 -0500 Received: from mail-qt1-f169.google.com (mail-qt1-f169.google.com [209.85.160.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D4E2D20989; Wed, 12 Dec 2018 13:56:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1544622993; bh=6+Z3IXLJifrp9V+Lf//a+ixZTStvgvOEv8kjSumdBmk=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=VK+qGnJ8OPb7Z0OYpepcjrKAFSTYgT2Dt0GdfXVEy2qup6c/GdbjlVK06wKEXICzC eEp13nNB2XAQLnVPT+xaZkKNd/uSUhjSgVX7SMfvYlmE5R0omLE4LkJNvjh/ndaDBX wM0xKgaPHKEufUc5xeKJOKk6U+egr+hNRzm8gQ2o= Received: by mail-qt1-f169.google.com with SMTP id z16so20528591qtq.4; Wed, 12 Dec 2018 05:56:32 -0800 (PST) X-Gm-Message-State: AA+aEWb3pxV0gQy5O1WDZ6u6L0HKPG3NNgPc4pwy0lBtZZwCACpdV+xL siRIlB8CKh2dzmp/HCC6+eizfxZMv2H0kRr9WQ== X-Received: by 2002:aed:3ecf:: with SMTP id o15mr20337689qtf.26.1544622991925; Wed, 12 Dec 2018 05:56:31 -0800 (PST) MIME-Version: 1.0 References: <1541542052-10081-1-git-send-email-jacek.anaszewski@gmail.com> <1541542052-10081-5-git-send-email-jacek.anaszewski@gmail.com> <5bea0eb8.1c69fb81.6b921.80e6@mx.google.com> <0a0b176c-4eb4-4b0e-6c3c-b3c6c8f5fff5@gmail.com> <20181212095929.GA13437@amd> In-Reply-To: <20181212095929.GA13437@amd> From: Rob Herring Date: Wed, 12 Dec 2018 07:56:20 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 04/24] dt-bindings: leds: Add function and color properties To: Pavel Machek Cc: Jacek Anaszewski , Linux LED Subsystem , devicetree@vger.kernel.org, "linux-kernel@vger.kernel.org" , Baolin Wang , Daniel Mack , Dan Murphy , Linus Walleij , Oleh Kravchenko , Sakari Ailus , Simon Shields Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 12, 2018 at 3:59 AM Pavel Machek wrote: > > Hi! > > > > We would also probably need different DT properties for different > > > types of devices, since e.g. for network case the network interface > > > name would fit better for the LED name, than the phy name, > > > and we would need to know what type of device name we're going > > > to look for. > > > > > > Pavel gave following examples: > > > > > > eth0:green:link > > > adsl0:green:link > > > adsl0:red:error > > > > > > So we would have e.g.: > > > > > > associated-vl42-device = <&camera1>; > > > associated-network-device = <&phy1>; > > > associated-block-device = <&phy1>; > > > > Variable property names are kind of a pain to parse. > > > > Perhaps when LEDs are associated with a device, we shouldn't care > > within the context of the LED subsystem what the name is. The > > association is more important and if you have that exposed, then you > > don't really need to care what the name is. You still have to deal > > with a device with more than 1 LED, but that becomes a problem local > > to that device. > > > > What I'm getting at is following a more standard binding pattern of > > providers and consumers like we have for gpios, clocks, etc. So we'd > > have something like this: > > > > ethernet { > > ... > > leds = <&green_led>, <&red_led>; > > led-names = "link", "err"; > > }; > > > > We can still support defining LED names as we've done, but we don't > > have to come up with some elaborate naming convention that covers > > every single case. > > I see that it would be more consistent with how gpios work, but I'm > afraid this does not fit LEDs properly. > > With power LED, you want to be able to say "this is just on". Some > poeple like heartbeat, and have LED for that. There may be LED for > "disk activity", meaning activity on any harddrive. And there may be > activity LED for specific disk. > > Only in the last case it would be suitable to have LED reference as a > child of an device... Right. For all the other cases, why do you need any link with a device? What we have today is sufficient and can continue to be supported. A link to a device is only used if the led is associated with a particular device. Rob