Received: by 2002:a05:6a10:8395:0:0:0:0 with SMTP id n21csp623298pxh; Tue, 9 Nov 2021 16:21:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJwe5fEzEPPp/Ku6T0tVWOOD/YYYveli+X914dQ2q4ZKGAA/jnbydW83FNh83t8dWlLsvrJK X-Received: by 2002:a5e:c707:: with SMTP id f7mr8002908iop.188.1636503683208; Tue, 09 Nov 2021 16:21:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636503683; cv=none; d=google.com; s=arc-20160816; b=oAOcZ34+hTamEGbo05b3KuqZXmB+biF4TiZHL9On7dqXiA8NENw0+rNuWRx4gp/Cg/ vc2dbYHn4Gy0EE6oT6uAuAT7Y+gwFgtRcUEH9pa8Y9zrr6eqOjK22Zv+6iEglcFqphHb irohEivzVbYCuW+bA1c7Bcof62xGMS7RlR6UNSYTE52lIoKoJrfLP6DDDcYHMza2SpdV ZMXaniW3tsvZetK1nO1bVDr7IfqCyESa3OpoARtdPMCjZakJdi1jdoLqFSbllXM2L12z dFOCTNxqzkfv0l+w4GpxOl7y8uyKCNU+eNtAKdi6WT5gqI196ZQFWDbs1bjqdzai3Hlh Xw/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=fqMfvevUL4ukmxtHDYzE4N3EIZqfBJykGBfoMdASPoc=; b=W7W8c3oF8eh7/5vTGiVMkPe/k998lPfOolBSTGcl0D6gyrYCzhIxszNr4sboVGGxRL tDF5kwaNPaR289cwgTKPAjiS8ueXTZuyFBEX1QDPVor1+yhJyfY8srLGR/98h5kpgLvs 1Ekq4ATTFIyP6hWLh3TKdo8uK83jMHuCVakBaiLqR//Bt5/UOkufnm/jxjGLmCeqXzaP io2rFqHsq8/V0NuSFBJiej8EmT3YAvlF2aUrhI66j0qXjI6+bDH/bvKNnkKZFGITGn7i xWJcwLsVJkSS6qC6KqoPW5RJDkZmjqtWbHB0ORUV/JPC3SDMCwMnfWU8UzLDKVcUrA9S 9MOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=EdA5Rkfs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g7si43815017ila.114.2021.11.09.16.21.11; Tue, 09 Nov 2021 16:21:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=EdA5Rkfs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244908AbhKIVMd (ORCPT + 97 others); Tue, 9 Nov 2021 16:12:33 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:53414 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237584AbhKIVMc (ORCPT ); Tue, 9 Nov 2021 16:12:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=fqMfvevUL4ukmxtHDYzE4N3EIZqfBJykGBfoMdASPoc=; b=EdA5Rkfs5/ZsHFfhINZIQ6inmE xr1hE5zxYp/zcr/mb/MlKKxMvBKAMm70zb3zyoSaTLgp9SOqvO0KpwXMF0UY/0RRJESp2k7eXNYkj AyX/Zjkebe7biSqDhYgH9WnC07Rmh9jiajIC5nKERkr+8B2iqgTypBC6Tv5PekdX7bnE=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1mkYNA-00D1Wk-AZ; Tue, 09 Nov 2021 22:09:40 +0100 Date: Tue, 9 Nov 2021 22:09:40 +0100 From: Andrew Lunn To: Marek =?iso-8859-1?Q?Beh=FAn?= Cc: Ansuel Smith , Vivien Didelot , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Jakub Kicinski , Rob Herring , Jonathan Corbet , Pavel Machek , John Crispin , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-leds@vger.kernel.org Subject: Re: [RFC PATCH v3 6/8] leds: trigger: add hardware-phy-activity trigger Message-ID: References: <20211109022608.11109-1-ansuelsmth@gmail.com> <20211109022608.11109-7-ansuelsmth@gmail.com> <20211109042517.03baa809@thinkpad> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211109042517.03baa809@thinkpad> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > +/* Expose sysfs for every blink to be configurable from userspace */ > > +DEFINE_OFFLOAD_TRIGGER(blink_tx, BLINK_TX); > > +DEFINE_OFFLOAD_TRIGGER(blink_rx, BLINK_RX); > > +DEFINE_OFFLOAD_TRIGGER(keep_link_10m, KEEP_LINK_10M); > > +DEFINE_OFFLOAD_TRIGGER(keep_link_100m, KEEP_LINK_100M); > > +DEFINE_OFFLOAD_TRIGGER(keep_link_1000m, KEEP_LINK_1000M); You might get warnings about CamelCase, but i suggest keep_link_10M, keep_link_100M and keep_link_1000M. These are megabits, not millibits. > > +DEFINE_OFFLOAD_TRIGGER(keep_half_duplex, KEEP_HALF_DUPLEX); > > +DEFINE_OFFLOAD_TRIGGER(keep_full_duplex, KEEP_FULL_DUPLEX); What does keep mean in this context? > > +DEFINE_OFFLOAD_TRIGGER(option_linkup_over, OPTION_LINKUP_OVER); > > +DEFINE_OFFLOAD_TRIGGER(option_power_on_reset, OPTION_POWER_ON_RESET); > > +DEFINE_OFFLOAD_TRIGGER(option_blink_2hz, OPTION_BLINK_2HZ); > > +DEFINE_OFFLOAD_TRIGGER(option_blink_4hz, OPTION_BLINK_4HZ); > > +DEFINE_OFFLOAD_TRIGGER(option_blink_8hz, OPTION_BLINK_8HZ); > > This is very strange. Is option_blink_2hz a trigger on itself? Or just > an option for another trigger? It seems that it is an option, so that I > can set something like > blink_tx,option_blink_2hz > and the LED will blink on tx activity with frequency 2 Hz... If that is > so, I think you are misnaming your macros or something, since you are > defining option_blink_2hz as a trigger with > DEFINE_OFFLOAD_TRIGGER Yes, i already said this needs handling differently. The 2Hz, 4Hz and 8Hz naturally fit the delay_on, delay_of sysfs attributes. Andrew