Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp451197pxb; Mon, 8 Nov 2021 16:29:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJwwLl1LPGc6RRBiZ9wUnKNyu7NQ71ZvRi8DStKCu5+HPFdFqBW6S/y9I2SOuF6XAMR1LvpO X-Received: by 2002:a17:907:1c15:: with SMTP id nc21mr4214913ejc.260.1636417777246; Mon, 08 Nov 2021 16:29:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636417777; cv=none; d=google.com; s=arc-20160816; b=hbbaThJ+roXuN8LV9hcyOxrAyBh51qEGWvQRx/zod91CyKGlmJB3Hng5DQm/9zeAeM /FhwbO01LN0shYE4C4JjSs9HRrAUIFfsqs/KR8DRD0Pwf2h1alq6skGoUYecRnOr1W2j HR12cXdme98IublwlJXpqT0OkezAUHXYr5VkxJFGFAi+fPoDevreEzq9v5xd+uq+l70U pFVE9ZuIwlNbQp7o+QSijXfP/xWeQkTMu84DMDWMFWh7wt57STlg5dGRyOuIiUcoCYg7 JJnMe4nw3jiLCSKIt0ibp2BdGnvRSYnlY/730XsRt3CLNrG2gniWhkear0+kU/oWlIXg 6FWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=2R57Qwpkh07dE8eoOsm1J3LuorTj9j15lNGMp/vk8+g=; b=wMNrTKGQsaJOeUiyU+6uJ9ADhNiDItb0dkUbJwVziOD1LXVPemwFqntuHVShNDe5fT xeJ0CU0l8g9PXfMSM4iRmnD7euXfYLoMnT4X0X/uP86dJxS9gZkqEAF8LL0qOsThRVGk ealbWM/aTGkWTs3+e3Cy+tnKd1i/ZpYi9LqkwrzuCqPrviqexxx0O1NHsa+hO8QxA4P/ gCuVmSrW6s8BOU5GUmitL3tiWwdiP6Qm29FdAJu9nQ3nPlHuzQtaph9H4msEEpDp/U2X YC/rA38mGxYVrf+H5wIT7uuBMrK2vMkUg36s7zFkXymYzD5N3R5R8tSS0z8d4zcnnAKK 1Jzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ss6sTjuY; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dm17si38327128ejc.456.2021.11.08.16.29.08; Mon, 08 Nov 2021 16:29:37 -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=@kernel.org header.s=k20201202 header.b=ss6sTjuY; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232524AbhKHR72 (ORCPT + 99 others); Mon, 8 Nov 2021 12:59:28 -0500 Received: from mail.kernel.org ([198.145.29.99]:36060 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231793AbhKHR71 (ORCPT ); Mon, 8 Nov 2021 12:59:27 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 75EF06124D; Mon, 8 Nov 2021 17:56:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1636394203; bh=ffbY6XZWZcrefoCiKBER7fEnSzLlGX7KZbC/MIl/IUs=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ss6sTjuYyCQj9plD3aR7WdASaMCXN5fbF08iCYDniDS9PB3OXI9wrPIAF2QRnTG6/ whrkK/PliEpbWR6AqbQYnUPUyCfrA7f3sOWwfLYoEfXgQzsgnWfAutGZWirwy+nTYJ KeK/1QFEkCvZVY51+MR4mJl2NjoEu95mz/nI/SLHF0ImsVAf3e2EKtBsY8q8VeSdh6 B/7raepAFmBkZeHVVWa4xLyToxheKbYn6mh6Z1J32KPP6iS4ojFUsPtcvQjzQOkwY/ u7Rh9TN88WOB1m67cVHsVYjCm4TND+Wfgu48lPObntwvvNzY8nB2j36oTZ6dkT9jEZ OL+aWiZBswwEQ== Date: Mon, 8 Nov 2021 18:56:37 +0100 From: Marek =?UTF-8?B?QmVow7pu?= To: Andrew Lunn 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: <20211108185637.21b63d40@thinkpad> In-Reply-To: References: <20211108002500.19115-1-ansuelsmth@gmail.com> <20211108002500.19115-2-ansuelsmth@gmail.com> <20211108171312.0318b960@thinkpad> X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 8 Nov 2021 18:46:26 +0100 Andrew Lunn wrote: > > 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 Hello Andrew, you are right that this has been taking too long on my side. I am sorry for that. I guess I will have to work on this again ASAP or we will end up with solution that I don't like. Nonetheless, what is your opinion about offloading netdev trigger vs introducing another trigger? Marek