Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp358101img; Mon, 18 Mar 2019 04:56:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqxwh4QskisN6D8KYVsb1PWgqwjRTAIG4fsqm1aRpX6Y5cFgXrjZ3YySivCiCP8azEueD8cm X-Received: by 2002:a17:902:b708:: with SMTP id d8mr18999872pls.322.1552910164735; Mon, 18 Mar 2019 04:56:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552910164; cv=none; d=google.com; s=arc-20160816; b=mQzVs25ThM+ZEbpFJWNVS/Jkcp8aqcAsmhii7HIa4gozDVGr79wgYaMDQuamocE02z RacEAOzDW7TJtiYLz5LWxUCi2Q+XjMFxq7udj7uFw84jTEF3VHsCLr8VqmDAfMf5Iz/a 8fOaXp2rWuqfXnxtGRKGn10MMIRrrcYhtekCMQ+hVpGv0fp1fhgm0q2asaGV/ttJ9XgD 8/WEumITnNVmoUGGqGumIbB2whTUC/btdckZ+/rGgkPvHb4e0QtDXuFu7NVb3oYvZT4C NUPgWrxCytgfz80CQRBY+sI1u1/oQq7oRNHChlyasYFMkKSf26WkvaX4b27Is8aMErI+ ZgCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=WZ0Nr7KWygt6QWwoqbRGoTlnwYGEAPnKdDSUeZw1STA=; b=FnBbKiUTB+pzIUqW34YkQXp9Xb9vgxxX0TXHBh+P/6Kx20Vi92XGYhHAwloiqM/nwD 45WQf8DrWhx9shNfvbrYAybKPn0A6HxGnUu2SgCUbz+Tt4bwqNa6U0sMSuZqHl29Cbe2 yGu+m29Qp0GX7I8fCBCW+8aNf635IuMAk4XtIjlM4rWWUSt0pDP/dntLOp4EXOnWBGd9 YZWAaOgV0U51pXaYbg01vqy2elsE6+iwHNCIoSXo7cUbAu+vS9EKfRGKba6Y0n258UuU 109mVP1pwLynZr74F5SqTJnTIcpyq7uGw7rslZaOQPxJwspx7PlAkKtyZ0swcv/2atwl yoLg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j4si9021674pfh.14.2019.03.18.04.55.49; Mon, 18 Mar 2019 04:56:04 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727222AbfCRLy4 (ORCPT + 99 others); Mon, 18 Mar 2019 07:54:56 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:35195 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727000AbfCRLyz (ORCPT ); Mon, 18 Mar 2019 07:54:55 -0400 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id A4042804E2; Mon, 18 Mar 2019 12:54:45 +0100 (CET) Date: Mon, 18 Mar 2019 12:54:52 +0100 From: Pavel Machek To: Rasmus Villemoes Cc: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , Jacek Anaszewski , LKML , linux-leds@vger.kernel.org, devicetree@vger.kernel.org Subject: Re: [PATCH v2 6/6] leds: netdev trigger: allow setting initial values in device tree Message-ID: <20190318115452.GE6101@amd> References: <20190313202615.22883-1-linux@rasmusvillemoes.dk> <20190314140619.3309-1-linux@rasmusvillemoes.dk> <20190314140619.3309-7-linux@rasmusvillemoes.dk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="M/SuVGWktc5uNpra" Content-Disposition: inline In-Reply-To: <20190314140619.3309-7-linux@rasmusvillemoes.dk> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --M/SuVGWktc5uNpra Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu 2019-03-14 15:06:19, Rasmus Villemoes wrote: > It can be quite convenient to initialize a netdev-triggered LED with a > device name and setting the rx,tx,link properties from device tree, > instead of having to do that in an init script (or udev rule) in > userspace. >=20 > My main motivation for this is to be able to switch away from the > deprecated CONFIG_CAN_LEDS. The example added to common.txt > corresponds to switching linux,default-trigger =3D "can0-rxtx" to > "netdev" and adding the indicated netdev subnode. >=20 > Signed-off-by: Rasmus Villemoes > --- > .../devicetree/bindings/leds/common.txt | 11 +++++++ > drivers/leds/trigger/ledtrig-netdev.c | 30 +++++++++++++++++++ > 2 files changed, 41 insertions(+) >=20 > diff --git a/Documentation/devicetree/bindings/leds/common.txt b/Document= ation/devicetree/bindings/leds/common.txt > index 7cb88460a47c..f8078c4cf6f8 100644 > --- a/Documentation/devicetree/bindings/leds/common.txt > +++ b/Documentation/devicetree/bindings/leds/common.txt > @@ -43,6 +43,17 @@ Optional properties for child nodes: > Documentation/ABI/testing/sysfs-class-led-trigger-netdev) > to reflect the state and activity of a net device. > =20 > + The optional child node netdev can be used to > + configure initial values for the link, rx, tx and > + device_name properties. For example, > + > + netdev { > + rx; > + tx; > + link; > + device-name =3D "can0"; Well, NAK, as explained before. Use phandle. Alternatively, adding comment why CONFIG_CAN_LEDS can not be removed just yet near the deprecation note would be acceptable. Pavel =09 --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --M/SuVGWktc5uNpra Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlyPhwwACgkQMOfwapXb+vK8nQCePbEAWGZFRuBgSYDvpKSHn2KM DnwAn1L2nTdBbD2v+GKB8OK1hneu+wcI =7BuZ -----END PGP SIGNATURE----- --M/SuVGWktc5uNpra--