Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp447574pxb; Mon, 8 Nov 2021 16:25:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJys1kEHpEdqp7FXKMRHXmFDlrxZ2Qx1qk8QsnPH3itR19qkkaezAtjSKMrPzdw1oLEkh04V X-Received: by 2002:a17:907:7601:: with SMTP id jx1mr4108228ejc.69.1636417548500; Mon, 08 Nov 2021 16:25:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636417548; cv=none; d=google.com; s=arc-20160816; b=lRGi57Y/ukyG47FI5LBAakL4ZOv5SZqKX/a+L64NquapWD495Kp+BfloEoy2i7TAq+ M6wF8nXIGKwY24QfRL9h3YdtpwH5wByZqHsBtJ4WKwj3s3u1SIqmz7C3q3IIW4tOqCf7 LoWd0w2gwVtlJnUY53+GcI1s0MDCQw3T7V2jMe+fogB7jDDwfTgr70xCoE7B/HZVoIrs UfUSyQJ29G6aYRtyCM54IhUZwmHSsfv+CkqNDi4WXWgG55zvcPI0D/Dmms6qjKpSH064 l1nWOWtOF8TDOcZYRpjsVrgcqrA/z9heJMCPGyeRQzlWQXj2ApUPVP6a5IuKFJ7o/bG9 ZCTQ== 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=O1qhXOH6kc7/rA2NaHAx4cfa7PFX3+bLtDAKGxMwjVE=; b=dUXbN5ZlBmngEH1u6y05NqjPuXW0LIvi1wx5wZMtLgCWCm/X3+/Kdmm8/Y9c2Cn4CK KoxN3Gq6egFQZBb6V2KbdiCSJIG4ILS5zm74vGCCNBYXDiH2IGODcHLhJkf+E0w6pAHH ob8tuxupHhTDv9yht58qZTuuHjEKyCMkVhdaAaWd7YniT2MdbVEPxyH7cQpnOzTZkjik FZtTJ5r2LrPnTLJWMSsKbIpLE/a40TinSKkOllf0O3TgzqmzvR3bJJZIXNP7/dc8DfqG 2SsnBfcOZIo/zsENQn2t9xw195Zko7SARFFxuU7CQd2GVIAQXJrVOsxgPRuvBC9xFrWI 6xIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=BVnA1qvy; 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 p3si4779271edu.372.2021.11.08.16.25.23; Mon, 08 Nov 2021 16:25:48 -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=BVnA1qvy; 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 S239230AbhKHRtj (ORCPT + 99 others); Mon, 8 Nov 2021 12:49:39 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:51126 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239189AbhKHRtS (ORCPT ); Mon, 8 Nov 2021 12:49:18 -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=O1qhXOH6kc7/rA2NaHAx4cfa7PFX3+bLtDAKGxMwjVE=; b=BVnA1qvy5AIx0qIjP99u6wX5sV XJmRpdnOtI4hv6KrPBGcpIjDWtFACCwRsCirIDaq5weSFUCD2fKkjWwPxgjj43RKsRnHdBdnKOCBj 9+JRgcLRYCoWDGcfhGGWemXmvooyU9Fkhwq5n8DK/Gb9Kx6jFt90flGkiK3WSNoHXdFQ=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1mk8iw-00Cv0v-MX; Mon, 08 Nov 2021 18:46:26 +0100 Date: Mon, 8 Nov 2021 18:46:26 +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 v2 1/5] leds: trigger: add API for HW offloading of triggers Message-ID: References: <20211108002500.19115-1-ansuelsmth@gmail.com> <20211108002500.19115-2-ansuelsmth@gmail.com> <20211108171312.0318b960@thinkpad> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211108171312.0318b960@thinkpad> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > Dear Ansuel, > > what is the purpose of adding trigger_offload() methods to LED, if you > are not going to add support to offload the netdev trigger? That was > the entire purpose when I wrote that patch. > > If you just want to create a new trigger that will make the PHY chip do > the blinking, there is no need at all for the offloading patch. > > And you will also get a NACK from me and also Pavel (LED subsystem > maintainer). > > The current plan is to: > - add support for offloading existing LED triggers to HW (LED > controllers (PHY chips, for example)) > - make netdev trigger try offloading itself to HW via this new API (if > it fails, netdev trigger will blink the LED in SW as it does now) > - create LED classdevices in a PHY driver that have the offload() > methods implemented. The offload method looks at what trigger is > being enabled for the LED, and it if it is a netdev trigger with such > settings that are possible to offload, it will be offloaded. > > This whole thing makes use of the existing sysfs ABI. > So for example if I do > cd /sys/class/net/eth0/phydev/leds/ > echo netdev >trigger > echo eth0 >device_name > echo 1 >rx > echo 1 >tx > The netdev trigger is activated, and it calls the offload() method. > The offload() method is implemented in the PHY driver, and it checks > that it can offload these settings (blink on rx/tx), and will enable > this. > - extend netdev trigger to support more settings: > - indicate link for specific link modes only (for example 1g, 100m) > - ... > - extend PHY drivers to support offloading of these new settings > > Marek Hi Marek The problem here is, you are not making much progress. People are giving up on you ever getting this done, and doing their own implementation. Ansuel code is not mature enough yet, it has problems, but he is responsive, he is dealing with comments, progress is being made. At some point, it is going to be good enough, and it will get merged, unless you actual get your code to a point it can be merged. Andrew