Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp5647176rwj; Wed, 21 Dec 2022 05:28:06 -0800 (PST) X-Google-Smtp-Source: AMrXdXs3KkctdGCK3d858P8T7el0UzmGIGFWy/KgrypLNbhjnqPO7yD/SkzHDbVMlpJJ6yyqssyP X-Received: by 2002:a05:6a20:b929:b0:a7:da67:2eb7 with SMTP id fe41-20020a056a20b92900b000a7da672eb7mr1886259pzb.39.1671629286292; Wed, 21 Dec 2022 05:28:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671629286; cv=none; d=google.com; s=arc-20160816; b=PYlOr6NfnpO9eHizJ0MyFy4gixYkwg1k17YeBt87Pxn7W+SUnTseJZQFuVpyZMDoyf biRWa9q5uw1HoD4cVKZiVxnKxzSR7MQ/KG+bsyrKi7pHDZjnFFyNpzLbDkOr8xUJO9Rr ccxwEutVPZ5UbRYY/rw2C3+3sMG+/yNzILKY1w3WkJkhoBGy3ceOByZZ4e3WicyRq40+ Sc6BWo82Ne5zCcG//0DUi8a0fKSEQG268Nc25Eq1wZ+h8UWVjCqKegtLTB+l0VuLmZSb fBpwbBKsoIdM/XwJO20XofcwBwSxPcu7DAi9mhILdvI6IeNAHrVUOugx4Oj0UJrcktH3 Khmw== 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:subject:cc:to:from:date:message-id:dkim-signature; bh=Xv4cGbJ2lw4EoY2EPo5WFdBPvwJO/ifxc5USrYkH2UE=; b=X6FcAL5IsBP9OZVEun51TbL8fe6Gx9rfMdJzuqwKkW/3f4NRuTAiusfxJ0DU3EdRxu PvgfQMekwkHWYTrexM3PN/xouUkuVQnyAqZNMlnRl+2VIi9/9t3PDtOykm2IOPbVmNTk TrTLrVIfJACsY2QGGBSnWfsGS/v92nSVklA5iwR0PSbIgweDf/QAAqUVn1JmYZkfphZV Y7dI6iliQi9ibn5HxkTiyrjjIisl2FDs9CeA+oMVxImeWAGWP+yIeoIfh0byZdHbVJ5e wt14rfT7yPOEh6SpxSxVesaverVMrXCyVm6acXJu3PoneYOAqhxgPUh+OcwqEtHEwBlx rCTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=DU6JbJKL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p11-20020a654bcb000000b0043c0b4f2b68si17139324pgr.318.2022.12.21.05.27.56; Wed, 21 Dec 2022 05:28:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=DU6JbJKL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S233394AbiLUM5G (ORCPT + 69 others); Wed, 21 Dec 2022 07:57:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49770 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229601AbiLUM47 (ORCPT ); Wed, 21 Dec 2022 07:56:59 -0500 Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 29B0A22BEF; Wed, 21 Dec 2022 04:56:58 -0800 (PST) Received: by mail-wm1-x32c.google.com with SMTP id f13-20020a1cc90d000000b003d08c4cf679so1370352wmb.5; Wed, 21 Dec 2022 04:56:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:subject:cc :to:from:date:message-id:from:to:cc:subject:date:message-id:reply-to; bh=Xv4cGbJ2lw4EoY2EPo5WFdBPvwJO/ifxc5USrYkH2UE=; b=DU6JbJKLHO037qvAgdXAWe8AeuTpBvvI4AmJwL1wvwR7aUdvTlouittVr6P/8wNN6M s2b/dnJDodrrsXjKOrMHahLjXLLMnPx2jvuCnCLjtJAO6wM6uG4Mbxgb0Elfw31E9OVw i2stTpATQdXqKn0wqGm5aHprxPmQFjnYfmyYdAPNM5WQVqptTTDixf4QumMz6JmFSQuE 0s0+4DwrBFjyQv1uW0HRWh/QE0WL2LQI0DgTvL6SltUfXGBZMJxXX52dLb5i8G0VS6lz dgOp4UyRsF6PqfCEDqHsW8+4ta4n68rMWgpuAVaxnHycfpVOCPkHOJ5a0nddCKjVr081 NLXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:subject:cc :to:from:date:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Xv4cGbJ2lw4EoY2EPo5WFdBPvwJO/ifxc5USrYkH2UE=; b=HJwcelOJwixfK+mJtuTK4KsZTz8aUeTae14iBvDHA97E9mqmLJMtBHbgsq8SfpjuPa k2VuVMKGIj9AiJq2Z0pyCr3lc8jWR6v+mYwpSRayCvsuMjKyFwI7gh4N97GqRyHTKIuP 8hmcAyHyhniJag7Q4THolCGtMv18je9S7xnyhgeH7jy8R4aF5OnB57qj8YgK81S3ftEE 5q105lxyV0yujUsfvF4YJNUbQsOzX8b7m4RB9yymiwqESvOvvNuRSPMgkBrp6o9+k8MR te6QoGrydmGe3GpLQhgUJ/cll5pqeJ4e5Pq/ZB61EtpfvZ88piCpIybJzAiHVQJWG+6B cihw== X-Gm-Message-State: AFqh2kqvxcIfLmDmrL+vNdcVBLpJaOSB57+mhOEIGMx5wafKJaM+BrvY FIIxzhnX/mvqjw9AVHh1r3U= X-Received: by 2002:a7b:ca4f:0:b0:3c6:edc0:5170 with SMTP id m15-20020a7bca4f000000b003c6edc05170mr1580433wml.25.1671627416435; Wed, 21 Dec 2022 04:56:56 -0800 (PST) Received: from Ansuel-xps. (host-82-55-238-56.retail.telecomitalia.it. [82.55.238.56]) by smtp.gmail.com with ESMTPSA id v15-20020a05600c444f00b003cf54b77bfesm2484377wmn.28.2022.12.21.04.56.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Dec 2022 04:56:55 -0800 (PST) Message-ID: <63a30297.050a0220.46b0f.7533@mx.google.com> X-Google-Original-Message-ID: Date: Wed, 21 Dec 2022 13:56:53 +0100 From: Christian Marangi To: Andrew Lunn Cc: "Russell King (Oracle)" , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , 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, Tim Harvey , Alexander Stein , Rasmus Villemoes Subject: Re: [PATCH v7 09/11] leds: trigger: netdev: add additional hardware only triggers References: <20221214235438.30271-1-ansuelsmth@gmail.com> <20221214235438.30271-10-ansuelsmth@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 21, 2022 at 01:12:16AM +0100, Andrew Lunn wrote: > On Thu, Dec 15, 2022 at 05:35:47PM +0000, Russell King (Oracle) wrote: > > On Thu, Dec 15, 2022 at 12:54:36AM +0100, Christian Marangi wrote: > > > Add additional hardware only triggers commonly supported by switch LEDs. > > > > > > Additional modes: > > > link_10: LED on with link up AND speed 10mbps > > > link_100: LED on with link up AND speed 100mbps > > > link_1000: LED on with link up AND speed 1000mbps > > > half_duplex: LED on with link up AND half_duplex mode > > > full_duplex: LED on with link up AND full duplex mode > > > > Looking at Marvell 88e151x, I don't think this is usable there. > > We have the option of supporting link_1000 on one of the LEDs, > > link_100 on another, and link_10 on the other. It's rather rare > > for all three leds to be wired though. > > The 88e151x will need to enumerate what it actually supports from the > above list, per LED. I also think we can carefully expand the list > above, adding a few more modes. We just need to ensure what is added > is reasonably generic, modes we expect multiple PHY to support. What > we need to avoid is adding every single mode a PHY supports, but no > other PHY has. > > > This is also a PHY where "activity" mode is supported (illuminated > > or blinking if any traffic is transmitted or received) but may not > > support individual directional traffic in hardware. However, it > > does support forcing the LED on or off, so software mode can handle > > those until the user selects a combination of modes that are > > supported in the hardware. > > > > > Additional blink interval modes: > > > blink_2hz: LED blink on any even at 2Hz (250ms) > > > blink_4hz: LED blink on any even at 4Hz (125ms) > > > blink_8hz: LED blink on any even at 8Hz (62ms) > > > > This seems too restrictive. For example, Marvell 88e151x supports > > none of these, but does support 42, 84, 170, 340, 670ms. > > I would actually drop this whole idea of being able to configure the > blink period. It seems like it is going to cause problems. I expect > most PHYs actual share the period across multiple LEDs, which you > cannot easily model here. > > So i would have the driver hard coded to pick a frequency at thats' it. > Yes I think "for now" it's the only way and just drop blink configuration support. -- Ansuel