Received: by 2002:ac0:950e:0:0:0:0:0 with SMTP id f14csp1375302imc; Sun, 17 Mar 2019 12:12:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqzT1hcLd7adfKnfPq2gs46jbtqkAfOQKapgKoycAVYYwvkU9AEtdNjNioUEIowJYOp0XCGg X-Received: by 2002:a65:5cc7:: with SMTP id b7mr14177573pgt.396.1552849965915; Sun, 17 Mar 2019 12:12:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552849965; cv=none; d=google.com; s=arc-20160816; b=dMWmPJfdOm3qDy7yejdbxqbCaAQQDrYz4kDNszwGwPMWPULciLRetdD6d0x7PqNOIN byLadEGz04VKhMOs8jlPcS9Mfi94dHhNDKos4azU7BCObgyuDdD5pVHX0p9NYe4MMkyV kF3wVZiO0ibBRE47d7/Ozy0NTjullVAqM1pSBAXIdJ9AeBntLUs6nB5+zgHVDi0q1kV7 ibPAk9LrEx2F+BEJmliPGYTJlhs2I2UCNx8iGjI3qH+/jtS8Y+zRxcEg5aDtwTY7d5ej YU6D8ZtTFQJsqIkpMYng8a4Dr0cLRYFxYc0yuCR6i5ZhedPohw4JFI49hiCTnh0+jJr3 TVIA== 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=ovbQb6ZNcdWP3eNh+KAum9B5U3hxFctizCu2rt5ORs4=; b=Tb111NWcHV2m9dypGaYiUksDyk4+IX3HeU4cBInMpivthHu8zqxO+h6PadbN1R93MA URiPoWertzXvt5OZQrf63BELjq6e87sIvGt1vingPRC28n3pduXEftILpw6liT2DyfEy mOq1nZRPxBQLyNV9OuVNjhcjfNBT3XnQCEqAIV7v/U8Rsa4o1ELwYWjhS31A94QUtRkG 1KIo4wE+nCfDC3DPnEJWyrO5XkvPPNqcmdasXXjAb16KBF/DHYuA4gfegqFLbEr1UVUl +LHNROqig2Fi7iDxkCw6QMxIJehP4XNGmBWCtOm84kI0On6Dv5kUWh0uCRa99v9++RD4 4qtw== 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 h23si7563887pgb.516.2019.03.17.12.12.30; Sun, 17 Mar 2019 12:12:45 -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 S1727386AbfCQTLy (ORCPT + 99 others); Sun, 17 Mar 2019 15:11:54 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:36421 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726452AbfCQTLx (ORCPT ); Sun, 17 Mar 2019 15:11:53 -0400 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id 9803580744; Sun, 17 Mar 2019 20:11:43 +0100 (CET) Date: Sun, 17 Mar 2019 20:11:50 +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, linux-can@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH 4/4] leds: netdev trigger: allow setting initial values in device tree Message-ID: <20190317191150.GA31285@amd> References: <20190311144227.GA4404@amd> <20190313202615.22883-1-linux@rasmusvillemoes.dk> <20190313202615.22883-5-linux@rasmusvillemoes.dk> <20190314102911.GA15173@amd> <6fb71b90-1ae3-9d93-6e0c-c95e441ced7a@rasmusvillemoes.dk> <20190314120047.GA19072@amd> <2cd9c42c-1056-979f-568e-c7e387bf90c6@rasmusvillemoes.dk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="qMm9M+Fa2AknHoGS" Content-Disposition: inline In-Reply-To: <2cd9c42c-1056-979f-568e-c7e387bf90c6@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 --qMm9M+Fa2AknHoGS Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu 2019-03-14 14:19:42, Rasmus Villemoes wrote: > On 14/03/2019 13.00, Pavel Machek wrote: > linux,default-trigger from > >=20 > > Yeah and now insert the modules for the can devices in different > > order... May not happen in your case but will be fairly common for > > ethernets. >=20 > Unpredictable device names is not a problem I'm trying to solve, nor one > that actually occurs on embedded systems. And even if one has such a > system, one is likely running udev or similar to rename devices to > something sane and predictable, in which case a fixed string _still_ > works fine. Or one uses udev rules to munge the netdev trigger sysfs > files, and has applications dealing with devices appearing as banana457. >=20 > OK, so there's of_find_net_device_by_node, so a phandle solution might > also be possible, and might work just as well for my case. But I still > think initializing with a fixed string is the simplest and sanest thing > to do. Simplest, yes. Mergeable, no. Sorry. Udev will not help with renaming -- it runs after kernel boot, while udev parsing is usually done before userland starts. Plus, device tree should really describe hardware, and be usable with other operating systems. Of course, there are exceptions, but "can0" is unneccessarily linux-specific. Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --qMm9M+Fa2AknHoGS Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlyOm/YACgkQMOfwapXb+vK53QCeIdu8vu9Fai0AxUL3FZQMEO2k r5QAoKxdUdhvcbLSBdfF+dFwQEtFyYK5 =JKhN -----END PGP SIGNATURE----- --qMm9M+Fa2AknHoGS--