Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp1162162imc; Mon, 11 Mar 2019 07:45:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqyW2oF18mojL2PYccXEcRwIoenqCvKrK21yGP9oZskRvPMClSLJIfICGTN83BXWe/GKTyMl X-Received: by 2002:a17:902:1:: with SMTP id 1mr28755544pla.226.1552315551994; Mon, 11 Mar 2019 07:45:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552315551; cv=none; d=google.com; s=arc-20160816; b=D4aZgJl7fSH8BZ9PiKs9jJxuTZZrdfZ6VCQMIZErpxJfyp8qaPAXQR05sSYIA5ftaz mZzkHlrIucnq0vftkD/lgQcgME/k1IdVxbEwWwsNPnvcJLqxIGHLRoq91OX2mkhb+gvA CV0r7XdsZH4ef4GRHikleeuVH3pDgEEdRh42SQR+4eBCZhLtrIfwtuNHLhpxjw/fRmXd hEaxhluTCJWQduve+fflUXnVm8C41WhYf8AqgPcJM4KlWm2iQ2Z/hRFf3U0M1MRz8Oiy iJ/DWfx+B0d4DhgMXy/7UCjpuLWhNKZKcFiNiP616gXtq3N3jV4d2FbECPivHLsxYB91 4UBw== 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=5bm3CtI/ysuvzl2w9H2cru8x63URoC9C0ETKiCd3gQE=; b=N9Of7luxEHQDHQy5EEqz4z6CskaW8g0T8mjRYS3DjGSkyYMuuEpsoG5tAfMeLGShAc yaUwOs3xo+Q3WTH56UEFm91C6twlm+zqD4fy1KpslkEAnhAKEbqSHKW4BJfeZgwprrrr QcShaEKHmwaFs4OUA6aHapQes3mtBU2fizrf864Er+QTrtDipDLOw9N4Po4cbRL0Q2g1 0bcx8038jvsoesTW4CSStw3FWi0fwC/PXt62evJiaE62TiPaSOSn/8o5QZ7b0Acz2/oF V+xlq/WidZ1qNkTz/XbtRrZKbR78sozBvnocPJxVm2MP89QcINIwfrP0xdAmUMnFa+m0 ehZQ== 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 s18si1807291plr.163.2019.03.11.07.45.35; Mon, 11 Mar 2019 07:45:51 -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 S1727433AbfCKOmb (ORCPT + 99 others); Mon, 11 Mar 2019 10:42:31 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:52044 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725943AbfCKOma (ORCPT ); Mon, 11 Mar 2019 10:42:30 -0400 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id 4D5A080615; Mon, 11 Mar 2019 15:42:21 +0100 (CET) Date: Mon, 11 Mar 2019 15:42:28 +0100 From: Pavel Machek To: Rasmus Villemoes Cc: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , Jacek Anaszewski , LKML , "Per N. Christensen" , Thomas Winding Subject: Re: replacement for CAN_LEDS Message-ID: <20190311144227.GA4404@amd> References: <729bdb48-8253-282a-2e0b-860ec5ff345c@prevas.dk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="h31gzZEtNLTqOjlF" Content-Disposition: inline In-Reply-To: <729bdb48-8253-282a-2e0b-860ec5ff345c@prevas.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 --h31gzZEtNLTqOjlF Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > I'm in the process of upgrading an old BSP to a 4.19 kernel, and noticed > that CAN_LEDS has been marked broken. The comments say that the netdev > trigger can do everything, but doesn't provide much guidance on how to > actually do the transition. Seems like something to be improved. > In my case, I used to have a device tree node >=20 > canb { > label =3D "canb:green:activity"; > gpios =3D <&gpio0 5 0>; > default-state =3D "off"; > linux,default-trigger =3D "can1-rxtx"; > }; >=20 > and if I change the default-trigger to netdev, I get sysfs files in > /sys/class/leds/canb:green:activity ; if I then echo can1 to device_name > and 1 to rx,tx, and link, I get the behaviour I used to have. >=20 > Questions: must this setup be done in userspace like this? Is there some > udev rule template I could copy? I can also just hardcode the above > dance in some init script. >=20 > I'd actually prefer keeping the entire setup in device tree. So would it > be possible to have netdev_trig_activate() look for some properties in > the DT node for the led_classdev and populate ->device_name and ->mode > based on them? Sounds like good idea. Patch would be welcome... Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --h31gzZEtNLTqOjlF Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlyGc9MACgkQMOfwapXb+vJ9mgCgu8Nk/irs2oazbXlwdhbJ8tWK jbIAn3YBob59JCCPDWOCuzuFHK6aRsxb =XRTd -----END PGP SIGNATURE----- --h31gzZEtNLTqOjlF--