Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp60575pxb; Mon, 8 Nov 2021 09:44:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJxIuezw/IBNBragbb0XWMR86h9TsFB5LoIbVFwK0waIZdqwKi4xzRnZ8/0kXUK2MsmwVTXt X-Received: by 2002:a05:6e02:1847:: with SMTP id b7mr613930ilv.102.1636393349181; Mon, 08 Nov 2021 09:42:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636393349; cv=none; d=google.com; s=arc-20160816; b=N3lCSuedGuzOltvxQwWB942M6yzcWFaSSYymBi7APpI5SIxFuxxbaDayoEqW3rN+B4 NtskNskQVlE7KjKF3WprTKlR2p/RzVQaMIKIptrviuff9t7IWRmLr27APsErHfnzjZSu LFhlNvqDRoXfcJ4f7ev4wjQyR5QJGFjMWiel2d1zoKGf4xmB//U4NGacBxS3gqEsTzQY w1CP/tHX8+xXqImCpJfbgDQSozXHxHBKUfh+hHmsvlD6XPGp9VM/fsTxCv/vdbhzYHEt bl6RQy1Fn5C5CtWbzK4cd0mEgGRJBidxXuCBQNKWhHLlSxd86+5xBieJc/wFrFbATFyw 2C1w== 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=r0UgxhSO3VS7lE1Qbtzz6PCS/79bXIcN+v+cxY6Q5rY=; b=LLW0SyW0NKTjeTj/1JuOv+kdo00f+45cOBgug6iMIFlfm23DVnmIoWw1YiJ7t76Bsi oK6sSDkyaUtIqLOUIoVyRHdMen8nlMRWs7GtV9acXx/SjO35g17udkpaPRnPQ8RDNcD2 LD3ykdCmhNNrYVKnRnVhwjxz7vHXrK8I3r+KyHnVcO4HNm3TTtBYWvOp9vRlJ1UQcr+R zH5x1qnteTJMSqRFBASvXiBuJl3QQsXurA/wamN00TVHj5GjaUPRsByd23z1GyHcwxaj IIwhTWQF4Rnc1hQCgazMvq8mbPbLCJqLos3RYnZ03qs7CywwQAarLMmhogyLRE9pjKFi woZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=N5ABK3F+; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p1si20611044ilp.54.2021.11.08.09.42.05; Mon, 08 Nov 2021 09:42:29 -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=@gmail.com header.s=20210112 header.b=N5ABK3F+; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238378AbhKHPWC (ORCPT + 99 others); Mon, 8 Nov 2021 10:22:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52508 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231557AbhKHPWB (ORCPT ); Mon, 8 Nov 2021 10:22:01 -0500 Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 91C6CC061570; Mon, 8 Nov 2021 07:19:16 -0800 (PST) Received: by mail-wr1-x436.google.com with SMTP id d24so27536245wra.0; Mon, 08 Nov 2021 07:19:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=r0UgxhSO3VS7lE1Qbtzz6PCS/79bXIcN+v+cxY6Q5rY=; b=N5ABK3F+wUiTUnqjYz/5cQ3pFlpJ4ZWKrIfVL543NKoSYE+u6GEsSTW21HaChwCmzQ MZSycOqdEng49+sTPNdda4tPrs45AimAOyhGUpJL93G86x9nW7I8D7qQC4TI2xeTnBRN LSfm7zDUcysmBizo7rTGzP4Gck+JRNBDBjpFDOIt9rl4XNxbfY+I+3o89Tf7HqZVi/HU MdBTLbATJD2ojiROC/X76x0XIJ4gzkytkSR3sK4ZDfjPhPyfw/cWx47XnjVL8sQWWNa8 FIivBpgav0R90YNFEikDx2XB/lhUMTYWTQ/6mvFeZxq+8bQRBXfFofr1LlBleIv9q+PD CzEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=r0UgxhSO3VS7lE1Qbtzz6PCS/79bXIcN+v+cxY6Q5rY=; b=fodOS3dS7sHN0xGdzJtwNQ/vGUlOctZylD+00mQqHnfv0oA8s82z/4FRxOO5sPBYrx ygTgzvUwX2YOXae5WSH9EQvPGT/3onEa8eIeZPgo+C6GjGl1pHk5fTj06JsZEprjVGNR oOCIG4JWo6Rb2aIvYloJZjmGjWMats5irze28CS8obxnEBTsYjENTWfmOuHKXliaMHBr ADmvbYetJ5udjIHTYOdkd/oCnFdTFcVRLytN+UeyOBRyHoJeKeCU2Bsf4YNxnjy0VEt9 I64a80AWQCq3ysXjqffKGbSVzMyY8UPfdU6SszF07Wnft2I8LR/5ovRdd52WNbm8jCID 8Z8Q== X-Gm-Message-State: AOAM5320qlxcoA42iZjgDPuYVqz72VK8eF1OzxyZJQ30GHCIX4YbgcX5 htoAzGeyjq17r0FRS9JwUMMQDxSlUOo= X-Received: by 2002:adf:dc0e:: with SMTP id t14mr541769wri.277.1636384754971; Mon, 08 Nov 2021 07:19:14 -0800 (PST) Received: from Ansuel-xps.localdomain (93-42-71-246.ip85.fastwebnet.it. [93.42.71.246]) by smtp.gmail.com with ESMTPSA id e18sm16976074wrs.48.2021.11.08.07.19.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Nov 2021 07:19:14 -0800 (PST) Date: Mon, 8 Nov 2021 16:19:12 +0100 From: Ansuel Smith To: Andrew Lunn Cc: 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 3/5] leds: trigger: add offload-phy-activity trigger Message-ID: References: <20211108002500.19115-1-ansuelsmth@gmail.com> <20211108002500.19115-4-ansuelsmth@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 08, 2021 at 03:17:33PM +0100, Andrew Lunn wrote: > On Mon, Nov 08, 2021 at 01:24:58AM +0100, Ansuel Smith wrote: > > Add Offload Trigger for PHY Activity. This special trigger is used to > > configure and expose the different HW trigger that are provided by the > > PHY. Each offload trigger can be configured by sysfs and on trigger > > activation the offload mode is enabled. > > > > This currently implement these hw triggers: > > - blink_tx: Blink LED on tx packet receive > > - blink_rx: Blink LED on rx packet receive > > - blink_collision: Blink LED on collision detection > > When did you last see a collision? Do you really have a 1/2 duplex > link? Just because the PHY can, does not mean we should support > it. Lets restrict this to the most useful modes. > Ok will drop this. In my case (qca8k) I also never see a device using it so I agree on the fact that should be dropped. > > - link_10m: Keep LED on with 10m link speed > > - link_100m: Keep LED on with 100m link speed > > - link_1000m: Keep LED on with 1000m link speed > > - half_duplex: Keep LED on with half duplex link > > - full_duplex: Keep LED on with full duplex link > > - linkup_over: Keep LED on with link speed and blink on rx/tx traffic > > - power_on_reset: Keep LED on with switch reset > > > - blink_2hz: Set blink speed at 2hz for every blink event > > - blink_4hz: Set blink speed at 4hz for every blink event > > - blink_8hz: Set blink speed at 8hz for every blink event > > These seems like attributes, not blink modes. They need to be > specified somehow differently, or not at all. Do we really need them? > Sorry I didn't update the commit. In sysfs they are exposed as option like the power_on_reset and linkup_over. So they are option on how the LED behave on the event. > > - blink_auto: Set blink speed at 2hz for 10m link speed, > > 4hz for 100m and 8hz for 1000m > > Another attribute, and one i've not seen any other PHY do. > Yes we can consider dropping this but I think the other 3 should be keeped. > Andrew -- Ansuel